diff options
author | Stefano Lattarini <stefano.lattarini@gmail.com> | 2012-06-22 23:14:38 +0200 |
---|---|---|
committer | Stefano Lattarini <stefano.lattarini@gmail.com> | 2012-06-22 23:14:38 +0200 |
commit | ca744ade0bacef9333d0ef88ef3d6e858a09d15b (patch) | |
tree | 3935f753e61f33867891d7a2d40d338274ba0152 /t/README | |
parent | f4a04f21eededc6e0c4f621926fc7ab796680de2 (diff) | |
download | automake-ca744ade0bacef9333d0ef88ef3d6e858a09d15b.tar.gz |
readme: clarify/extend few entries in 't/README'
* t/README (Writing test cases): Here.
Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Diffstat (limited to 't/README')
-rw-r--r-- | t/README | 32 |
1 files changed, 17 insertions, 15 deletions
@@ -143,7 +143,8 @@ Writing test cases * Add a copyright/license paragraph. -* Explain what the test does. +* Explain what the test does, i.e., which features it checks, which + invariants it verifies, or what bugs/issues it guard against. * Cite the PR number (if any), and the original reporter (if any), so we can find or ask for information if needed. @@ -171,14 +172,15 @@ Writing test cases set-up of a test scenario, you can use the 'framework_fail_' function instead. -* For those tests checking the Automake-provided test harnesses that are - expected to work also when the 'serial-tests' Automake option is used - (thus causing the serial testsuite harness to be used in the generated - Makefile), place a line containing "try-with-serial-tests" somewhere - in the file. That will ensure that the 'gen-testsuite-part' script - generates a sibling of that test which uses the serial harness instead - of the parallel one. For those tests that are *not* meant to work with - the parallel testsuite harness at all (these should be very very few), +* For those tests checking the Automake-provided test harnesses that + are expected to work also when the 'serial-tests' Automake option + is used (thus causing the serial testsuite harness to be used in the + generated Makefile), place a line containing "try-with-serial-tests" + somewhere in the file (usually in a comment). + That will ensure that the 'gen-testsuite-part' script generates a + sibling of that test which uses the serial harness instead of the + parallel one. For those tests that are *not* meant to work with the + parallel testsuite harness at all (these should be very very few), set the shell variable 'am_serial_tests' to "yes" before including ./defs. @@ -206,18 +208,18 @@ Writing test cases disable the errexit flag (but please do so only if you have a very good reason). -* End the test script with a ":" or "Exit 0". Otherwise, when somebody +* End the test script with a ':' command. Otherwise, when somebody changes the test by adding a failing command after the last command, - the test will spuriously fail because $? is nonzero at the end. Note - that this is relevant even if the errexit shell flag is on, in case - the test contains commands like "grep ... Makefile.in && Exit 1" (and - there are indeed a lot of such tests). + the test will spuriously fail because '$?' is nonzero at the end. + Note that this is relevant even if the errexit shell flag is on, in + case the test contains commands like "grep ... Makefile.in && Exit 1" + (and there are indeed a lot of such tests). * Use $ACLOCAL, $AUTOMAKE, $AUTOCONF, $AUTOUPDATE, $AUTOHEADER, $PERL, $MAKE, $EGREP, and $FGREP, instead of the corresponding commands. -* Use $sleep when you have to make sure that some file is newer +* Use '$sleep' when you have to make sure that some file is newer than another. * Use cat or grep or similar commands to display (part of) files that |