gen_tests.pl -- generate a test suite using one of the supported test generators.
gen_tests.pl -g generator -p project_id -v version_id -n test_id -o out_dir -b total_budget [-c target_classes] [-s random_seed] [-t tmp_dir] [-E] [-D]
generator
The test generator to use. Run the following command to see a list of supported test generators: run_test_gen.pl -g help
project_id
Generate tests for this project id. See Project module for available project IDs.
version_id
Generate tests for this version id. Format: \d+[bf]
.
test_id
The id of the generated test suite (i.e., which run of the same configuration).
The root output directory for the generated test suite. The test suite and logs are written to: out_dir/project_id/version_id.
total_budget
The total time in seconds allowed for test generation.
The file that lists all classes the test generator should target, one class per line (optional). By default, tests are generated only for classes modified by the bug fix.
random_seed
The random seed used for test generation (optional). By default, the random seed is computed as: <test_id> * 1000 + <bug_id>.
The temporary root directory to be used to check out the program version (optional). The default is /tmp.
Generate error-revealing (as opposed to regression) tests (optional). By default this script generates regression tests, regardless of whether the project version is a buggy or a fixed project version. Note that not all test generators support both modes (i.e., generating regression tests and generating error-revealing tests).
Debug: Enable verbose logging and do not delete the temporary check-out directory (optional).
This script runs the specified test generator on a particular program version. Tests are, by default, generated for all classes modified by the bug fix; a set of target classes can be specified using the -c
flag.
The following wrapper script invokes the specified test generator and provides the generator-specific configuration: TESTGEN_BIN_DIR
/generator
.sh.
The source files of the generated test suite are compressed into an archive with the following name: project_id
-version_id
-generator
.test_id
.tar.bz2
Examples:
The test suite archive is written to: out_dir/project_id
/generator
/test_id
By default, the script logs all errors and warnings to gen_tests.log in the temporary project root. Upon success, the log of this script is appended to: out_dir/logs/project_id
.version_id
.log.