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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 2 additions & 8 deletions
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

Lines changed: 2 additions & 8 deletions
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

Lines changed: 2 additions & 8 deletions
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

Lines changed: 2 additions & 8 deletions
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

Lines changed: 2 additions & 8 deletions
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

Lines changed: 2 additions & 8 deletions
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

Lines changed: 2 additions & 8 deletions
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

Lines changed: 0 additions & 32 deletions
This file was deleted.

regression/fault-localization/Makefile

Lines changed: 2 additions & 8 deletions
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 \

0 commit comments

Comments
 (0)