Skip to content

Commit 983ca9f

Browse files
committed
tests/ci: make buildimage and runtest independent
This allows us to use ci-runtest on a pre-existing CI disk image. It will be helpful in CI environments (such as ci.freebsd.org) where building and testing are separated into distinct jobs. Signed-off-by: Siva Mahadevan <[email protected]> Sponsored by: The FreeBSD Foundation
1 parent 5ad48ab commit 983ca9f

File tree

7 files changed

+13
-11
lines changed

7 files changed

+13
-11
lines changed

tests/ci/Makefile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ clean: beforeclean .PHONY
177177

178178
cleandir: beforeclean .PHONY
179179

180-
ci-buildworld: .PHONY
180+
ci-buildworld: ci-checktarget .PHONY
181181
@echo "Building world for ${TARGET_ARCH}"
182182
${IMAKE} -j${PARALLEL_JOBS} -C ${WORLDDIR} ${METAMODE} \
183183
${CROSS_TOOLCHAIN_PARAM} __MAKE_CONF=${MAKECONF} SRCCONF=${SRCCONF} \
@@ -228,7 +228,9 @@ ci-extract-meta: .PHONY
228228
rm -rf ${META_TAR} ${META_DIR} ${META_DIROUT}
229229
.endif
230230

231-
ci-runtest: ci-buildimage-${TARGET_ARCH:tl} portinstall .PHONY
231+
ci-runtest: ci-create-meta portinstall .WAIT ci-runtest-${TARGET_ARCH:tl} .WAIT ci-extract-meta .PHONY
232+
233+
ci-runtest-qemu: .PHONY
232234
timeout -k 60 ${TIMEOUT_VM} ${QEMUBIN} \
233235
-machine ${QEMU_MACHINE} \
234236
-smp ${QEMU_CPU_COUNT} \
@@ -254,6 +256,6 @@ ci-checktarget: .PHONY
254256
@echo "Error: ${TARGET_ARCH} is not supported on ${TYPE} ${REVISION} ${BRANCH}"
255257
.endif
256258

257-
ci: ci-create-meta ci-checktarget .WAIT ci-runtest-${TARGET_ARCH:tl} .WAIT ci-extract-meta .PHONY
259+
ci: ci-buildimage-${TARGET_ARCH:tl} .WAIT ci-runtest .PHONY
258260

259261
.include "${RELEASEDIR}/Makefile.inc1"

tests/ci/Makefile.aarch64

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ portinstall-aarch64: portinstall-pkg .PHONY
2727
env ASSUME_ALWAYS_YES=yes pkg install sysutils/u-boot-bhyve-arm64
2828
.endif
2929

30-
ci-runtest-aarch64: ci-buildimage-aarch64 .PHONY
30+
ci-runtest-aarch64: .PHONY
3131
/usr/sbin/bhyvectl --vm=${TEST_VM_NAME} --destroy || true
3232
expect -c "set timeout ${TIMEOUT_EXPECT}; \
3333
spawn /usr/bin/timeout -k 60 ${TIMEOUT_VM} /usr/sbin/bhyve \
@@ -47,5 +47,5 @@ portinstall-aarch64: portinstall-pkg .PHONY
4747
env ASSUME_ALWAYS_YES=yes pkg install sysutils/u-boot-qemu-arm64
4848
.endif
4949

50-
ci-runtest-aarch64: ci-runtest .PHONY
50+
ci-runtest-aarch64: ci-runtest-qemu .PHONY
5151
.endif

tests/ci/Makefile.amd64

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ ci-buildkernel-amd64: ci-buildkernel .PHONY
2424
ci-buildimage-amd64: ci-buildimage .PHONY
2525

2626
.if ${MACHINE} == "amd64" && ( !defined(USE_QEMU) || empty(USE_QEMU) )
27-
ci-runtest-amd64: ci-buildimage-amd64 .PHONY
27+
ci-runtest-amd64: .PHONY
2828
/usr/sbin/bhyvectl --vm=${TEST_VM_NAME} --destroy || true
2929
expect -c "set timeout ${TIMEOUT_EXPECT}; \
3030
spawn /usr/bin/timeout -k 5s 30s /usr/sbin/bhyveload \
@@ -44,5 +44,5 @@ ci-runtest-amd64: ci-buildimage-amd64 .PHONY
4444
expect { eof }"
4545
/usr/sbin/bhyvectl --vm=${TEST_VM_NAME} --destroy
4646
.else
47-
ci-runtest-amd64: ci-runtest .PHONY
47+
ci-runtest-amd64: ci-runtest-qemu .PHONY
4848
.endif

tests/ci/Makefile.armv7

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,4 @@ ci-buildkernel-armv7: ci-buildkernel .PHONY
2626

2727
ci-buildimage-armv7: ci-buildimage .PHONY
2828

29-
ci-runtest-armv7: ci-runtest .PHONY
29+
ci-runtest-armv7: ci-runtest-qemu .PHONY

tests/ci/Makefile.powerpc64

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ ci-buildkernel-powerpc64: ci-buildkernel .PHONY
2424

2525
ci-buildimage-powerpc64: ci-buildimage .PHONY
2626

27-
ci-runtest-powerpc64: ci-runtest .PHONY
27+
ci-runtest-powerpc64: ci-runtest-qemu .PHONY

tests/ci/Makefile.powerpc64le

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ ci-buildkernel-powerpc64le: ci-buildkernel .PHONY
2424

2525
ci-buildimage-powerpc64le: ci-buildimage .PHONY
2626

27-
ci-runtest-powerpc64le: ci-runtest .PHONY
27+
ci-runtest-powerpc64le: ci-runtest-qemu .PHONY

tests/ci/Makefile.riscv64

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@ ci-buildkernel-riscv64: ci-buildkernel .PHONY
2828

2929
ci-buildimage-riscv64: ci-buildimage .PHONY
3030

31-
ci-runtest-riscv64: ci-runtest .PHONY
31+
ci-runtest-riscv64: ci-runtest-qemu .PHONY

0 commit comments

Comments
 (0)