Skip to content

Rerunning tests

Richard R. Drake edited this page Jun 8, 2022 · 1 revision

Once the tests are run the first time, the results and other information is stored in the TestResults.* directory. A previously run test will contain an implicit result keyword, such as "pass", "fail", "diff", "notdone", or "notrun". And by default, vvtest will not rerun tests that have run and completed.

There are a few ways to rerun tests:

  • Remove the test results with rm -rf TestResults.*. All memory of previous testing will be gone. The command line option -w effectively does the same thing.
  • To rerun all the tests, add the -R option to the command line.
  • Combine the -R option with keyword filtering. For example, vvtest -R -k fail would rerun all tests that have a "fail" result status. And vvtest -R -k myname would rerun all tests named "myname".
  • Change directory into the TestResults.* directory itself and add the -R option. The tests at or below the current working directory will be rerun. This can be used effectively for test creation and diagnosis because the shell can be used to edit input files, the test file itself, examine output files, and repeatedly rerun the test.

Showing previous results

To get a nice description of the previous results, use the -i command line option. It is for information only. For example,

$ ~/Projects/vvtest/vvtest_small/vvtest -i -vv
==================================================
pass        0:01 01/01 08:36:38 subdir/btest
skip                            atest skip_reason="excluded by keyword expression"
==================================================
Summary:
    completed: 1
          1 pass
    skipped: 1
          1 due to "excluded by keyword expression"
    total: 2

Adding one or more -v options increases the verbosity of output.

Clone this wiki locally