# # # patch "ChangeLog" # from [9a4e058e01cc86c8ca6ed56edc0fda4936feae1f] # to [8d4660c810b4040d0fee860493239b6263104656] # # patch "tester.cc" # from [513d65593637d3218ebef26267398854abd3ffda] # to [f2d4ea7760800ad8fc16e9abf1f0ce426b67168c] # # patch "tester.txt" # from [43c4a9114ecfb4334c5e0a5327b6d78a46a95d33] # to [aec6795a280a135f82fba014a1d123157612a98f] # ============================================================ --- ChangeLog 9a4e058e01cc86c8ca6ed56edc0fda4936feae1f +++ ChangeLog 8d4660c810b4040d0fee860493239b6263104656 @@ -1,3 +1,8 @@ +2006-07-07 Timothy Brownawell + + * tester.cc: Add a newline to the help message. + * tester.txt: Add a brief overview at the beginning. + 2006-07-06 Timothy Brownawell Make 'mtn help' and 'mtn --help' exit with status 0 instead of 2. ============================================================ --- tester.cc 513d65593637d3218ebef26267398854abd3ffda +++ tester.cc f2d4ea7760800ad8fc16e9abf1f0ce426b67168c @@ -646,7 +646,7 @@ fprintf(stderr, "\t-d don't clean the scratch directories\n"); fprintf(stderr, "\tnum run a specific test\n"); fprintf(stderr, "\tnum..num run tests in a range\n"); - fprintf(stderr, "\t if num is negative, count back from the end"); + fprintf(stderr, "\t if num is negative, count back from the end\n"); fprintf(stderr, "\tregex run tests with matching names\n"); return 1; } ============================================================ --- tester.txt 43c4a9114ecfb4334c5e0a5327b6d78a46a95d33 +++ tester.txt aec6795a280a135f82fba014a1d123157612a98f @@ -1,3 +1,23 @@ +A testsuite is a lua script which defines commonly used globals for the individual tests, and lists those tests in the "tests" table. Each test is a directory containing a lua script named "__driver__.lua", and optionally any number of data files. These data files can be copied to the scratch directory with "get(filename)". + +Each test is run in a scratch directory, named tester_dir/$TESTNAME relative to the directory in which the tester is run. If the test passes and the -d option is not given, this directory will be remove after the test finishes. The tester will leave a logfile named "tester.log" in tester_dir and in each scratch dir that isn't removed. + +tester should be called as + tester testsuite [-dlh] [num [...]] [num..num [...]] [regex [...]] + + -h print a help message + -l print test names only; don't run them + -d don't clean the scratch directories + num run a specific test + num..num run tests in a range + if num is negative, count back from the end + regex run tests with matching names + +On startup, the testsuite file is run. It should set up any global vars that the tests need, and add them to the "tests" table, as 'table.insert(tests, "test-name")'. "test-name" is the name of the directory for this test relative to testdir, which is initialized to srcdir (where the testsuite file is). + +After this the internal run_tests function is caled, which parses the command-line arguments and runs whichever tests have been asked for. It also resets most of the environment between tests. + + tests Global table, containing all tests. The testsuite should contain lines of