Skip to content

Commit 3321735

Browse files
committed
Move implementation of failed-tests-printer.pl into test.pl
Added a new option "-p" to test.pl to request printing failure logs instead of doing so via an external script. This simplifies various Makefiles and enables use in cmake builds.
1 parent ba16006 commit 3321735

File tree

23 files changed

+80
-219
lines changed

23 files changed

+80
-219
lines changed

regression/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ set(test_pl_path "${CMAKE_CURRENT_SOURCE_DIR}/test.pl")
66
macro(add_test_pl_profile name cmdline flag profile)
77
add_test(
88
NAME "${name}-${profile}"
9-
COMMAND ${test_pl_path} -c ${cmdline} ${flag}
9+
COMMAND ${test_pl_path} -p -c ${cmdline} ${flag}
1010
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
1111
)
1212
set_tests_properties("${name}-${profile}" PROPERTIES

regression/ansi-c/Makefile

+2-8
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,10 @@ else
1010
endif
1111

1212
test:
13-
@if ! ../test.pl -c $(exe) ; then \
14-
../failed-tests-printer.pl ; \
15-
exit 1 ; \
16-
fi
13+
@../test.pl -p -c $(exe)
1714

1815
tests.log: ../test.pl
19-
@if ! ../test.pl -c $(exe) ; then \
20-
../failed-tests-printer.pl ; \
21-
exit 1 ; \
22-
fi
16+
@../test.pl -p -c $(exe)
2317

2418
show:
2519
@for dir in *; do \

regression/cbmc-cover/Makefile

+2-8
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,10 @@
11
default: tests.log
22

33
test:
4-
@if ! ../test.pl -c ../../../src/cbmc/cbmc ; then \
5-
../failed-tests-printer.pl ; \
6-
exit 1 ; \
7-
fi
4+
@../test.pl -p -c ../../../src/cbmc/cbmc
85

96
tests.log: ../test.pl
10-
@if ! ../test.pl -c ../../../src/cbmc/cbmc ; then \
11-
../failed-tests-printer.pl ; \
12-
exit 1 ; \
13-
fi
7+
@../test.pl -p -c ../../../src/cbmc/cbmc
148

159
show:
1610
@for dir in *; do \

regression/cbmc-java-inheritance/Makefile

+2-8
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,10 @@
11
default: tests.log
22

33
test:
4-
@if ! ../test.pl -c ../../../src/jbmc/jbmc ; then \
5-
../failed-tests-printer.pl ; \
6-
exit 1 ; \
7-
fi
4+
@../test.pl -p -c ../../../src/jbmc/jbmc
85

96
tests.log: ../test.pl
10-
@if ! ../test.pl -c ../../../src/jbmc/jbmc ; then \
11-
../failed-tests-printer.pl ; \
12-
exit 1 ; \
13-
fi
7+
@../test.pl -p -c ../../../src/jbmc/jbmc
148

159
show:
1610
@for dir in *; do \

regression/cbmc-java/Makefile

+2-8
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,10 @@
11
default: tests.log
22

33
test:
4-
@if ! ../test.pl -c ../../../src/jbmc/jbmc ; then \
5-
../failed-tests-printer.pl ; \
6-
exit 1 ; \
7-
fi
4+
@../test.pl -p -c ../../../src/jbmc/jbmc
85

96
tests.log: ../test.pl
10-
@if ! ../test.pl -c ../../../src/jbmc/jbmc ; then \
11-
../failed-tests-printer.pl ; \
12-
exit 1 ; \
13-
fi
7+
@../test.pl -p -c ../../../src/jbmc/jbmc
148

159
show:
1610
@for dir in *; do \

regression/cbmc/Makefile

+2-8
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,10 @@
11
default: tests.log
22

33
test:
4-
@if ! ../test.pl -c ../../../src/cbmc/cbmc ; then \
5-
../failed-tests-printer.pl ; \
6-
exit 1 ; \
7-
fi
4+
@../test.pl -p -c ../../../src/cbmc/cbmc
85

96
tests.log: ../test.pl
10-
@if ! ../test.pl -c ../../../src/cbmc/cbmc ; then \
11-
../failed-tests-printer.pl ; \
12-
exit 1 ; \
13-
fi
7+
@../test.pl -p -c ../../../src/cbmc/cbmc
148

159
show:
1610
@for dir in *; do \

regression/cpp-linter/Makefile

+2-8
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,10 @@
11
default: tests.log
22

33
test:
4-
@if ! ../test.pl -c python ../../../scripts/cpplint.py ; then \
5-
../failed-tests-printer.pl ; \
6-
exit 1 ; \
7-
fi
4+
@../test.pl -p -c "python ../../../scripts/cpplint.py"
85

96
tests.log: ../test.pl
10-
@if ! ../test.pl -c "python ../../../scripts/cpplint.py" ; then \
11-
../failed-tests-printer.pl ; \
12-
exit 1 ; \
13-
fi
7+
@../test.pl -p -c "python ../../../scripts/cpplint.py"
148

159
show:
1610
@for dir in *; do \

regression/cpp/Makefile

+2-8
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,10 @@ else
1010
endif
1111

1212
test:
13-
@if ! ../test.pl -c $(exe) ; then \
14-
../failed-tests-printer.pl ; \
15-
exit 1 ; \
16-
fi
13+
@../test.pl -p -c $(exe)
1714

1815
tests.log: ../test.pl
19-
@if ! ../test.pl -c $(exe) ; then \
20-
../failed-tests-printer.pl ; \
21-
exit 1 ; \
22-
fi
16+
@../test.pl -p -c $(exe)
2317

2418
show:
2519
@for dir in *; do \

regression/failed-tests-printer.pl

-32
This file was deleted.

regression/fault-localization/Makefile

+2-8
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,10 @@
11
default: tests.log
22

33
test:
4-
@if ! ../test.pl -c ../../../src/cbmc/cbmc ; then \
5-
../failed-tests-printer.pl ; \
6-
exit 1 ; \
7-
fi
4+
@../test.pl -p -c ../../../src/cbmc/cbmc
85

96
tests.log: ../test.pl
10-
@if ! ../test.pl -c ../../../src/cbmc/cbmc ; then \
11-
../failed-tests-printer.pl ; \
12-
exit 1 ; \
13-
fi
7+
@../test.pl -p -c ../../../src/cbmc/cbmc
148

159
show:
1610
@for dir in *; do \

regression/goto-analyzer-taint/Makefile

+2-8
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,10 @@
11
default: tests.log
22

33
test:
4-
@if ! ../test.pl -c ../../../src/goto-analyzer/goto-analyzer ; then \
5-
../failed-tests-printer.pl ; \
6-
exit 1 ; \
7-
fi
4+
@../test.pl -p -c ../../../src/goto-analyzer/goto-analyzer
85

96
tests.log: ../test.pl
10-
@if ! ../test.pl -c ../../../src/goto-analyzer/goto-analyzer ; then \
11-
../failed-tests-printer.pl ; \
12-
exit 1 ; \
13-
fi
7+
@../test.pl -p -c ../../../src/goto-analyzer/goto-analyzer
148

159
show:
1610
@for dir in *; do \

regression/goto-analyzer/Makefile

+2-8
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,10 @@
11
default: tests.log
22

33
test:
4-
@if ! ../test.pl -c ../../../src/goto-analyzer/goto-analyzer ; then \
5-
../failed-tests-printer.pl ; \
6-
exit 1 ; \
7-
fi
4+
@../test.pl -p -c ../../../src/goto-analyzer/goto-analyzer
85

96
tests.log: ../test.pl
10-
@if ! ../test.pl -c ../../../src/goto-analyzer/goto-analyzer ; then \
11-
../failed-tests-printer.pl ; \
12-
exit 1 ; \
13-
fi
7+
@../test.pl -p -c ../../../src/goto-analyzer/goto-analyzer
148

159
show:
1610
@for dir in *; do \

regression/goto-cc-cbmc/Makefile

+2-8
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,10 @@ else
1212
endif
1313

1414
test:
15-
@if ! ../test.pl -c '../chain.sh $(exe) ../../../src/cbmc/cbmc $(is_windows)' ; then \
16-
../failed-tests-printer.pl ; \
17-
exit 1; \
18-
fi
15+
@../test.pl -p -c '../chain.sh $(exe) ../../../src/cbmc/cbmc $(is_windows)'
1916

2017
tests.log:
21-
@if ! ../test.pl -c '../chain.sh $(exe) ../../../src/cbmc/cbmc $(is_windows)' ; then \
22-
../failed-tests-printer.pl ; \
23-
exit 1; \
24-
fi
18+
@../test.pl -p -c '../chain.sh $(exe) ../../../src/cbmc/cbmc $(is_windows)'
2519

2620
show:
2721
@for dir in *; do \

regression/goto-cc-goto-analyzer/Makefile

+2-8
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,11 @@ else
1212
endif
1313

1414
test:
15-
@if ! ../test.pl -c '../chain.sh $(exe) ../../../src/goto-analyzer/goto-analyzer $(is_windows)' ; then \
16-
../failed-tests-printer.pl ; \
17-
exit 1; \
18-
fi
15+
@../test.pl -p -c '../chain.sh $(exe) ../../../src/goto-analyzer/goto-analyzer $(is_windows)'
1916

2017
tests.log:
2118
pwd
22-
@if ! ../test.pl -c '../chain.sh $(exe) ../../../src/goto-analyzer/goto-analyzer $(is_windows)' ; then \
23-
../failed-tests-printer.pl ; \
24-
exit 1; \
25-
fi
19+
@../test.pl -p -c '../chain.sh $(exe) ../../../src/goto-analyzer/goto-analyzer $(is_windows)'
2620

2721
show:
2822
@for dir in *; do \

regression/goto-diff/Makefile

+2-8
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,10 @@
11
default: tests.log
22

33
test:
4-
@if ! ../test.pl -c ../../../src/goto-diff/goto-diff ; then \
5-
../failed-tests-printer.pl ; \
6-
exit 1 ; \
7-
fi
4+
@../test.pl -p -c ../../../src/goto-diff/goto-diff
85

96
tests.log: ../test.pl
10-
@if ! ../test.pl -c ../../../src/goto-diff/goto-diff ; then \
11-
../failed-tests-printer.pl ; \
12-
exit 1 ; \
13-
fi
7+
@../test.pl -p -c ../../../src/goto-diff/goto-diff
148

159
show:
1610
@for dir in *; do \

regression/goto-gcc/Makefile

+2-8
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,11 @@ default: tests.log
22

33
test:
44
-@ln -s goto-cc ../../src/goto-cc/goto-gcc
5-
@if ! ../test.pl -c ../../../src/goto-cc/goto-gcc ; then \
6-
../failed-tests-printer.pl ; \
7-
exit 1 ; \
8-
fi
5+
@../test.pl -p -c ../../../src/goto-cc/goto-gcc
96

107
tests.log: ../test.pl
118
-@ln -s goto-cc ../../src/goto-cc/goto-gcc
12-
@if ! ../test.pl -c ../../../src/goto-cc/goto-gcc ; then \
13-
../failed-tests-printer.pl ; \
14-
exit 1 ; \
15-
fi
9+
@../test.pl -p -c ../../../src/goto-cc/goto-gcc
1610

1711
show:
1812
@for dir in *; do \

regression/goto-instrument-typedef/Makefile

+2-8
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,10 @@ else
1212
endif
1313

1414
test:
15-
@if ! ../test.pl -c '../chain.sh $(exe) ../../../src/goto-instrument/goto-instrument $(is_windows)' ; then \
16-
../failed-tests-printer.pl ; \
17-
exit 1; \
18-
fi
15+
@../test.pl -p -c '../chain.sh $(exe) ../../../src/goto-instrument/goto-instrument $(is_windows)'
1916

2017
tests.log:
21-
@if ! ../test.pl -c '../chain.sh $(exe) ../../../src/goto-instrument/goto-instrument $(is_windows)' ; then \
22-
../failed-tests-printer.pl ; \
23-
exit 1; \
24-
fi
18+
@../test.pl -p -c '../chain.sh $(exe) ../../../src/goto-instrument/goto-instrument $(is_windows)'
2519

2620
show:
2721
@for dir in *; do \

regression/goto-instrument/Makefile

+2-8
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,10 @@ else
1212
endif
1313

1414
test:
15-
@if ! ../test.pl -c '../chain.sh $(exe) ../../../src/goto-instrument/goto-instrument ../../../src/cbmc/cbmc $(is_windows)' ; then \
16-
../failed-tests-printer.pl ; \
17-
exit 1; \
18-
fi
15+
@../test.pl -p -c '../chain.sh $(exe) ../../../src/goto-instrument/goto-instrument ../../../src/cbmc/cbmc $(is_windows)'
1916

2017
tests.log:
21-
@if ! ../test.pl -c '../chain.sh $(exe) ../../../src/goto-instrument/goto-instrument ../../../src/cbmc/cbmc $(is_windows)' ; then \
22-
../failed-tests-printer.pl ; \
23-
exit 1; \
24-
fi
18+
@../test.pl -p -c '../chain.sh $(exe) ../../../src/goto-instrument/goto-instrument ../../../src/cbmc/cbmc $(is_windows)'
2519

2620
show:
2721
@for dir in *; do \

regression/invariants/Makefile

+2-8
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,10 @@ include ../../src/config.inc
1111
include ../../src/common
1212

1313
test: driver$(EXEEXT)
14-
@if ! ../test.pl -c ../driver ; then \
15-
../failed-tests-printer.pl ; \
16-
exit 1 ; \
17-
fi
14+
@../test.pl -p -c ../driver
1815

1916
tests.log: ../test.pl driver$(EXEEXT)
20-
@if ! ../test.pl -c ../driver ; then \
21-
../failed-tests-printer.pl ; \
22-
exit 1 ; \
23-
fi
17+
@../test.pl -p -c ../driver
2418

2519
show:
2620
@for dir in *; do \

regression/strings-smoke-tests/Makefile

+4-16
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,16 @@
11
default: tests.log
22

33
test:
4-
@if ! ../test.pl -c ../../../src/jbmc/jbmc ; then \
5-
../failed-tests-printer.pl ; \
6-
exit 1 ; \
7-
fi
4+
@../test.pl -p -c ../../../src/jbmc/jbmc
85

96
testfuture:
10-
@if ! ../test.pl -c ../../../src/jbmc/jbmc -CF ; then \
11-
../failed-tests-printer.pl ; \
12-
exit 1 ; \
13-
fi
7+
@../test.pl -p -c ../../../src/jbmc/jbmc -CF
148

159
testall:
16-
@if ! ../test.pl -c ../../../src/jbmc/jbmc -CFTK ; then \
17-
../failed-tests-printer.pl ; \
18-
exit 1 ; \
19-
fi
10+
@../test.pl -p -c ../../../src/jbmc/jbmc -CFTK
2011

2112
tests.log: ../test.pl
22-
@if ! ../test.pl -c ../../../src/jbmc/jbmc ; then \
23-
../failed-tests-printer.pl ; \
24-
exit 1 ; \
25-
fi
13+
@../test.pl -p -c ../../../src/jbmc/jbmc
2614

2715
show:
2816
@for dir in *; do \

0 commit comments

Comments
 (0)