Skip to content

Commit affba5b

Browse files
committed
tests/ci: use bhyve for arm64 host and guest
Signed-off-by: Siva Mahadevan <[email protected]> Sponsored by: The FreeBSD Foundation
1 parent 5c84b3f commit affba5b

File tree

1 file changed

+27
-5
lines changed

1 file changed

+27
-5
lines changed

tests/ci/Makefile.aarch64

Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,6 @@ QEMU_EXTRA_PARAM=-bios /usr/local/share/u-boot/u-boot-qemu-arm64/u-boot.bin -cpu
1313
QEMU_MAX_CPU_COUNT=64
1414
QEMU_MAX_MEM_SIZE=64
1515

16-
portinstall-aarch64: portinstall-pkg .PHONY
17-
.if !exists(/usr/local/share/u-boot/u-boot-qemu-arm64/u-boot.bin)
18-
env ASSUME_ALWAYS_YES=yes pkg install sysutils/u-boot-qemu-arm64
19-
.endif
20-
2116
# NOTE: Nothing should be changed below this line unless explicitly required.
2217

2318
ci-buildworld-aarch64: ci-buildworld .PHONY
@@ -26,4 +21,31 @@ ci-buildkernel-aarch64: ci-buildkernel .PHONY
2621

2722
ci-buildimage-aarch64: ci-buildimage .PHONY
2823

24+
.if ${MACHINE} == "arm64" && ( !defined(USE_QEMU) || empty(USE_QEMU) )
25+
portinstall-aarch64: portinstall-pkg .PHONY
26+
.if !exists(/usr/local/share/u-boot/u-boot-bhyve-arm64/u-boot.bin)
27+
env ASSUME_ALWAYS_YES=yes pkg install sysutils/u-boot-bhyve-arm64
28+
.endif
29+
30+
ci-runtest-aarch64: ci-buildimage-aarch64 .PHONY
31+
/usr/sbin/bhyvectl --vm=${TEST_VM_NAME} --destroy || true
32+
expect -c "set timeout ${TIMEOUT_EXPECT}; \
33+
spawn /usr/bin/timeout -k 60 ${TIMEOUT_VM} /usr/sbin/bhyve \
34+
-c ${PARALLEL_JOBS} -m ${VM_MEM_SIZE} \
35+
-s 0:0,hostbridge \
36+
-s 2:0,virtio-blk,${CIDISK} \
37+
-s 3:0,virtio-blk,${META_TAR} \
38+
${BHYVE_EXTRA_DISK_PARAM} \
39+
-o console=stdio \
40+
-o bootrom=/usr/local/share/u-boot/u-boot-bhyve-arm64/u-boot.bin \
41+
${TEST_VM_NAME}; \
42+
expect { eof }"
43+
/usr/sbin/bhyvectl --vm=${TEST_VM_NAME} --destroy
44+
.else
45+
portinstall-aarch64: portinstall-pkg .PHONY
46+
.if !exists(/usr/local/share/u-boot/u-boot-qemu-arm64/u-boot.bin)
47+
env ASSUME_ALWAYS_YES=yes pkg install sysutils/u-boot-qemu-arm64
48+
.endif
49+
2950
ci-runtest-aarch64: ci-runtest .PHONY
51+
.endif

0 commit comments

Comments
 (0)