Skip to content

Commit 07a3809

Browse files
committed
Makefile: Clearer warning on missing validation executable(s)
Instead of reporting total ................................................. 0/0 and passing (which node-tap seems to do when given missing files as arguments), report: missing test executable; run 'make runtimetest validation-executables' and error out. Having a separate step to build the executables is useful for: * Not building them as root, which reduces the change of security issues by using as little privilege as possible. * Not rebuilding them on each test, since we haven't told Make about the full dependency tree for the test executables. The separate build step was introduced in e11b77f (validation: Use prove(1) as a TAP harness, 2017-11-25, #439), but I didn't do a good job of motivating it in that commit message. Signed-off-by: W. Trevor King <[email protected]>
1 parent a55d234 commit 07a3809

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ clean:
4040
rm -f oci-runtime-tool runtimetest *.1 $(VALIDATION_TESTS)
4141

4242
localvalidation:
43+
for EXECUTABLE in runtimetest $(VALIDATION_TESTS); \
44+
do \
45+
test -x "$${EXECUTABLE}"; \
46+
done || (echo "missing test executable; run 'make runtimetest validation-executables'" >&2 && exit 1)
4347
RUNTIME=$(RUNTIME) $(TAP) $(VALIDATION_TESTS)
4448

4549
.PHONY: validation-executables

0 commit comments

Comments
 (0)