Skip to content

Commit 5c84b3f

Browse files
committed
tests/ci: separate ci-runtest into qemu and bhyve variants
Bhyve is only supported on amd64/amd64, amd64/i386, and arm64/arm64. Furthermore, amd64 and arm64 have different command-line arguments and requirements for running bhyve. This patch separates the bhyve version of ci-runtest into architecture-specific Makefiles. Signed-off-by: Siva Mahadevan <[email protected]> Sponsored by: The FreeBSD Foundation
1 parent b9a13f8 commit 5c84b3f

File tree

2 files changed

+22
-21
lines changed

2 files changed

+22
-21
lines changed

tests/ci/Makefile

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -210,26 +210,6 @@ ci-extract-meta: .PHONY
210210
.endif
211211

212212
ci-runtest: ci-buildimage-${TARGET_ARCH:tl} portinstall .PHONY
213-
.if ${MACHINE} == "amd64" && ( ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "i386" ) && ( !defined(USE_QEMU) || empty(USE_QEMU) )
214-
/usr/sbin/bhyvectl --vm=${TEST_VM_NAME} --destroy || true
215-
expect -c "set timeout ${TIMEOUT_EXPECT}; \
216-
spawn /usr/bin/timeout -k 5s 30s /usr/sbin/bhyveload \
217-
-c stdio -m ${VM_MEM_SIZE} -d ${CIDISK} ${TEST_VM_NAME}; \
218-
expect { eof }; \
219-
exit [lindex [wait] 3]"
220-
expect -c "set timeout ${TIMEOUT_EXPECT}; \
221-
spawn /usr/bin/timeout -k 60 ${TIMEOUT_VM} /usr/sbin/bhyve \
222-
-c ${PARALLEL_JOBS} -m ${VM_MEM_SIZE} -A -H -P \
223-
-s 0:0,hostbridge \
224-
-s 1:0,lpc \
225-
-s 2:0,virtio-blk,${CIDISK} \
226-
-s 3:0,virtio-blk,${META_TAR} \
227-
${BHYVE_EXTRA_DISK_PARAM} \
228-
-l com1,stdio \
229-
${TEST_VM_NAME}; \
230-
expect { eof }"
231-
/usr/sbin/bhyvectl --vm=${TEST_VM_NAME} --destroy
232-
.else
233213
timeout -k 60 ${TIMEOUT_VM} ${QEMUBIN} \
234214
-machine ${QEMU_MACHINE} \
235215
-smp ${QEMU_CPU_COUNT} \
@@ -242,7 +222,6 @@ ci-runtest: ci-buildimage-${TARGET_ARCH:tl} portinstall .PHONY
242222
-blockdev driver=raw,node-name=hd0,file.driver=file,file.filename=${CIDISK} \
243223
-blockdev driver=raw,node-name=hd1,file.driver=file,file.filename=${META_TAR} \
244224
${QEMU_DEVICES}
245-
.endif
246225

247226
ci-checktarget: .PHONY
248227
.if ${TARGET_ARCH} != "aarch64" && \

tests/ci/Makefile.amd64

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,26 @@ ci-buildkernel-amd64: ci-buildkernel .PHONY
2323

2424
ci-buildimage-amd64: ci-buildimage .PHONY
2525

26+
.if ${MACHINE} == "amd64" && ( !defined(USE_QEMU) || empty(USE_QEMU) )
27+
ci-runtest-amd64: ci-buildimage-amd64 .PHONY
28+
/usr/sbin/bhyvectl --vm=${TEST_VM_NAME} --destroy || true
29+
expect -c "set timeout ${TIMEOUT_EXPECT}; \
30+
spawn /usr/bin/timeout -k 5s 30s /usr/sbin/bhyveload \
31+
-c stdio -m ${VM_MEM_SIZE} -d ${CIDISK} ${TEST_VM_NAME}; \
32+
expect { eof }; \
33+
exit [lindex [wait] 3]"
34+
expect -c "set timeout ${TIMEOUT_EXPECT}; \
35+
spawn /usr/bin/timeout -k 60 ${TIMEOUT_VM} /usr/sbin/bhyve \
36+
-c ${PARALLEL_JOBS} -m ${VM_MEM_SIZE} -A -H -P \
37+
-s 0:0,hostbridge \
38+
-s 1:0,lpc \
39+
-s 2:0,virtio-blk,${CIDISK} \
40+
-s 3:0,virtio-blk,${META_TAR} \
41+
${BHYVE_EXTRA_DISK_PARAM} \
42+
-l com1,stdio \
43+
${TEST_VM_NAME}; \
44+
expect { eof }"
45+
/usr/sbin/bhyvectl --vm=${TEST_VM_NAME} --destroy
46+
.else
2647
ci-runtest-amd64: ci-runtest .PHONY
48+
.endif

0 commit comments

Comments
 (0)