8 # test suite formatted output
12 TEST_DIR := $(shell mktemp --directory )
13 SHA1SUM := $(shell which sha1sum )
14 HDR_ORIG := header_test.bin
15 HDR_TEST := $(TEST_DIR)/header_test.bin
16 CHK_HDR_ORIG=$(shell $(SHA1SUM) $(HDR_TEST) )
18 tests: banner test_nochange test_man_nomatch test_man_match
22 @echo "Starting tests"
24 tests_dir: $(TEST_DIR)
25 @echo "Tests directory: $(TEST_DIR)"
28 @test -e $(EXE) || ( echo "executable $(EXE) does not exist" && /bin/false && /bin/false )
29 @test -f $(EXE) || ( echo "executable $(EXE) is not a file" && /bin/false && /bin/false )
30 @test -x $(EXE) || ( echo "executable $(EXE) is not executable" && /bin/false && /bin/false )
31 @echo "Testing $(EXE)"
34 echo $(CHK_HDR_ORIG) | $(SHA1SUM) --check --quiet
37 cp $(HDR_ORIG) $(HDR_TEST)
39 test_nochange: exe tests_dir hdr_duplicate checksum
40 $(EXE) $(OPTS) $(HDR_TEST) 2>/dev/null