Commit Graph

35 Commits

Author SHA1 Message Date
Michael Tautschnig 97e9314c91 Do not hardcode tests.log as option -s <suffix> may be in use
With -s <suffix> the output log file is actually tests-<suffix>.log.
2018-07-03 10:56:05 +00:00
Thomas Kiley 9a0aa9c282
Merge pull request #2235 from thomasspriggs/test-pl-colour
Colour code tests passing vs failing.
2018-05-29 10:00:54 +01:00
Thomas Spriggs 77f81621f4 Colour code tests passing vs failing.
Use colour escape codes to colour code the [OK] vs [FAILED] output from
`test.pl`.
2018-05-24 15:16:01 +01:00
Chris Smowton 42a78afad8 JBMC tests: suffix logfiles when using symex-driven loading
The three test directories jbmc, jbmc-strings and strings-smoke-tests all have a
second test profile that uses --symex-driven-lazy-loading, but this meant after the
test completed the logfiles from the first profile would have been overwritten, and
if very unlucky the two profiles could run concurrently and fight over the same logfile.

Therefore we now allow test.pl to be given a log-file suffix, both for its main log
and test output logs, use that facility for these tests.
2018-05-23 18:14:02 +01:00
johndumbell 6faf376234 Enable 'm' flag on regex for multi-line tests
This is a change to the multi-line match option to enable traditional regex multi-line matching. The m flag causes ^ and $ to actually match correctly on new line/carriage returns, where before the match was actually on the entire file so ^ was just beginning of file $ was the end. This also fixes a few tests' failure condition where this subtle difference wasn't noticed and '^warning: ignoring' is used.
2018-05-11 16:11:07 +01:00
Hannes Steffenhagen 008de5dad1 Use environment variable for jobs in test.pl 2018-03-13 13:43:04 +00:00
Chris Smowton 45f0939b1a test.pl: add support for tagging test-cases
Test cases can now have secondary tags after their main CORE/KNOWNBUG/FUTURE/THOROUGH tag,
which can be filtered using -I (require tag) or -X (exclude tag) options. Both options can
be repeated; -I x -I y means a case needs either x or y tags, and -X x -X y means it cannot
have either if it is to run.
2018-02-09 17:03:01 +00:00
Michael Tautschnig 6016bef600 Improve readability of code imported from failed-tests-printer.pl 2017-11-02 12:18:15 +00:00
Michael Tautschnig dd6e431baf test.pl: Use native perl instead of "cat" to print log file 2017-11-02 12:18:15 +00:00
Michael Tautschnig 3321735dc7 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.
2017-11-02 12:18:15 +00:00
Michael Tautschnig ba160067dd Do not use shell built-ins
As we no longer use sequences of commands in the Makefile, AppVeyor's make does
not actually invoke a shell to call test.pl. Hence invoking "echo" from within
test.pl fails.

From the `make` documentation: "When it is time to execute commands to update a
target, they are executed by making a new subshell for each line. (In practice,
make may take shortcuts that do not affect the results.)" It seems these
"shortcuts" are being taken by AppVeyor's make.
2017-11-02 12:18:15 +00:00
Lukasz A.J. Wrona 4da5a94072 Add templating functionality to the perl script 2017-10-30 10:47:26 +00:00
Chris Smowton b01ff65c47 Test.pl: exit if a test is interrupted
In the specific case where a test died to SIGINT, we probably ought to stop.
Contrast SIGTERM, SIGKILL and so on, where we will carry on.

This also makes ctest exit cleanly when SIGINT'd
2017-10-05 11:26:26 +01:00
Chris Smowton 296349c7e3 Add dry-run mode to test.pl
This gives [OK] status for tests that will be run and [SKIPPED] otherwise. Useful
for tools that want to inspect tests that ran / will run.
2017-09-07 12:35:46 +01:00
Lukasz A.J. Wrona b1531d9528 test.pl - go through all child directories
Fixes a bug where test.pl would ignore directories that contain
valid tests (*.desc and *.java combo) and only test those directories
that contained a file with exact name "test.desc".
2017-08-01 15:21:24 +01:00
Lukasz A.J. Wrona 710f615a18 Adapt perl script to handle multiple .desc files
Changes test.pl to name output *.out files after *.desc instead
of *.class files. Also updates failed-test-printer.pl to work with
those new *.out files and multiple *.desc files.
2017-07-26 22:05:11 +01:00
martin 668dbfaac0 Abnormal termination is no longer an automatic test failure.
This allows us to have tests that are intended to abort.
Given that tests can (and mostly do) check the exit code this should
not reduce the utility of the test system.
2017-06-13 10:59:44 +01:00
Vojtech Forejt 0662dd0ab9 Fix several test problems on Windows
- strip <CR> from end of lines in test.pl
- tests for test-script do not depend on gcc
- Makefile in regression/goto-analyser has the same structure as other test Makefiles
- remove tests for empty lines
2017-03-20 17:18:37 +00:00
thk123 ebe4a7fe54 Revert "If not multi line, use old grep system"
This reverts commit 7cdc14100e.
2017-02-14 10:56:16 +00:00
thk123 a172ce0fe1 If we run test.pl with -K we check the known bugs fail
Added this step to the test-script makefile as this has behaviour that
should fail the test (since it is testing the test.pl)
2017-02-13 17:08:47 +00:00
thk123 7cdc14100e If not multi line, use old grep system
To ensure existing tests continue to behave consistently, we continue to
use the external grep if the multi-line flag is not present.
2017-02-13 17:08:44 +00:00
thk123 eba97a0a41 Made the Perl script not using grep
Includes tests for excluded lines and multi lines.

Includes tests that the test runner should fail, these are set as KNOWNBUG
so we can run the regressions folder.

We also don't print out when grep options activated as  no chance of doing
by accident as very clearly different to any other syntax. The printing
messes up the formatting of the output so better to not have it.

Added test script to the Makefile

Also ordered the tests into alphabetical orde.r
2017-02-13 17:08:13 +00:00
Chris Smowton eb1533a4fe Allow test script to operate on directories containing special chars 2017-01-16 17:38:16 +00:00
thk123 4437682559 Corrected documentations to include .gb files
test.pl also accepts .gb files (GOTO binary programs), amending the main
source documentation to reflect this.
2016-12-15 11:09:09 +00:00
thk123 ffb8e4a545 Amended --help documentation to explain the grep options 2016-12-15 11:09:09 +00:00
thk123 95b4bbceae Allowed test.desc to pass flags to the grep command
If the fourth line starts with a - we pass that line as flags to the
grep command when checking the lines in this test. This allows for tests
to pass flags such as: `-Pzo` to check multiple consecutive lines.
2016-12-15 11:09:09 +00:00
marcelosousa f02d8b3653 test.pl now supports multiple .desc files in directory 2016-05-25 06:17:18 -04:00
marcelosousa 92484aa57b added script to run datastax benchmarks and changed test.pl to support inner class names 2016-05-24 10:23:45 -04:00
kroening b90c9e626e do jar files
git-svn-id: svn+ssh://svn.cprover.org/srv/svn/cbmc/trunk@5731 6afb6bc1-c8e4-404c-8f48-9ae832c5b171
2015-08-06 13:59:56 +00:00
kroening cf3941f5e2 Accept goto binaries using .gb suffix for regression tests
git-svn-id: svn+ssh://svn.cprover.org/srv/svn/cbmc/trunk@5340 6afb6bc1-c8e4-404c-8f48-9ae832c5b171
2015-04-09 20:26:25 +00:00
tautschnig 0107887668 Added support for parallel execution of regression tests
git-svn-id: svn+ssh://svn.cprover.org/srv/svn/cbmc/trunk@4584 6afb6bc1-c8e4-404c-8f48-9ae832c5b171
2014-08-28 08:49:41 +00:00
kroening b9764b1539 Make test.pl properly handle mixed CRLF/LF files
git-svn-id: svn+ssh://svn.cprover.org/srv/svn/cbmc/trunk@3020 6afb6bc1-c8e4-404c-8f48-9ae832c5b171
2013-10-09 21:08:24 +00:00
kroening f524dc1cdf CBMC for Java regression testing
git-svn-id: svn+ssh://svn.cprover.org/srv/svn/cbmc/trunk@2533 6afb6bc1-c8e4-404c-8f48-9ae832c5b171
2013-06-02 08:27:37 +00:00
kroening f1a4ccecf0 extension for C++ after preprocessing is .ii
git-svn-id: svn+ssh://svn.cprover.org/srv/svn/cbmc/trunk@1497 6afb6bc1-c8e4-404c-8f48-9ae832c5b171
2012-08-17 15:11:04 +00:00
kroening 0b9bd97e10 allow ipp
git-svn-id: svn+ssh://svn.cprover.org/srv/svn/cbmc/trunk@1115 6afb6bc1-c8e4-404c-8f48-9ae832c5b171
2012-04-01 13:26:07 +00:00