aboutsummaryrefslogtreecommitdiff
path: root/test/test-lib.sh
Commit message (Collapse)AuthorAge
* test: Add a new test_emacs function to test-lib.shCarl Worth2010-10-22
| | | | | | | | This should be quite handy for doing automated testing of the emacs-based functionality in notmuch. This function invokes emacs with the necessary command-line arguments, (to run in batch mode with no local initialization, to load the notmuch code from the source directory, and to ensure an 80-column width).
* test: Fix add_email_corpus function to be quiet.Carl Worth2010-10-22
| | | | This simply avoids some unneeded noise in the "make test" output.
* test: Fix the search and dump-restore tests to operator on non-empty mail store.Carl Worth2010-09-20
| | | | | We do this with a new add_email_corpus function that establishes a mail store with 50 messages from the notmuch mailing list.
* test: Remove useless NOTMUCH variable (in favor of simply "notmuch")Carl Worth2010-09-20
| | | | | | | | | | When the NOTMUCH variable was originally invented it was used as an explicit path to the notmuch binary being tested. Today, the test suite sets the PATH variable instead, so the NOTMUCH variable always has a value of simply "notmuch". We simplifying that by using the constant value rather than the continual variable reference.
* test: Remove some dead code in test-lib.shCarl Worth2010-09-20
| | | | | These assignements weren't being used at all and were just confusing me, (the real assignments happen later on in the file).
* test: Print section names, and rename all test sectionsCarl Worth2010-09-20
| | | | | | | | Now that we can usefully pass section names via the NOTMUCH_SKIP_TESTS environment variable, it's useful to actually print those names out for the user. Then, since we're now printing these names, let's use nicer names, (not excessively long but also not using abbreviations like "msg").
* test: Make the --valgrind option useful, (and drop --verbose).Carl Worth2010-09-20
| | | | | | | | | In order for --valgrind to be useful, we drop noisy additional output of all of the commands being executed in verbose mode. This makes --verbose alone quite useless, so we don't document it any more. Also, add a zlib valgrind suppression that was showing up frequently in the test suite.
* test: Rename GIT_SKIP_TESTS to NOTMUCH_SKIP_TESTSCarl Worth2010-09-20
| | | | | | | | | By scanning test-lib.sh for occurrences of "git" or "GIT", I found that most of those are internal things, (like the GIT_TEST_TEE_STARTED variable). But GIT_SKIP_TESTS is part of the user-interface to the test suite, so we rename it to reference notmuch rather than git. Also, the GIT_TRACE warning is git-specific, so we drop that as well.
* test: Fix test suite so that --valgrind option works.Carl Worth2010-09-20
| | | | | The output is ugly, and we need a better suppressions file, but this is at least a start.
* test: Rework test-suite input to avoid ulti-command stringsCarl Worth2010-09-17
| | | | | | | | | | | | | | The original git test suite works by concatenating many commands into a very long string (each separated by &&). This is painful to work with since it prevents the editor from helping by parsing the shell script, indenting, colorizing, etc. Instead, we switch this back to something like the original notmuch test suite, and add two new functions to test-lib.sh (test_begin_subtest and test_expect_equal) to support these. This also fixes the test suite to once again display the diff when a test fails to generate the expected input.
* test: Cleanup the test outputCarl Worth2010-09-17
| | | | | | | | | | | | | | | | This makes the new, git-derived test suite report results in a manner similar to the original notmuch test suite. Notable changes include: * No more initial '*' on every line * Only colorize a single word * Don't print useless test numbers * Use "PASS" in place of "ok" * Begin sentences with a capital letter * Print test descriptions for each block * Separate each block of tests with a blank line * Don't summarize counts between each block
* test: Set all times to UTCMichal Sojka2010-09-16
| | | | | | | | In order to have repeatable test suite, all times in messages are set to UTC time zone to match the time zone (TZ variable) set in test-lib.sh. Signed-off-by: Michal Sojka <sojkam1@fel.cvut.cz>
* test: Update helper functionsMichal Sojka2010-09-16
| | | | | | | | | | Modify the helper functions to work with git-based test suite i.e. 1) Quote arguments where it is necessary. 2) Do not use $NOTMUCH. It is equal to "notmuch" since $PATH is set to the build tree. 3) Modify pass_if_equal to fit into the git-based test suite. Signed-off-by: Michal Sojka <sojkam1@fel.cvut.cz>
* Update test framework for use with notmuchMichal Sojka2010-09-16
| | | | | | | | This removes Git specific things from the test-lib.sh and adds helper functions for notmuch taken from Carl's notmuch-test script. README is also slightly modified to reflect the current state. Signed-off-by: Michal Sojka <sojkam1@fel.cvut.cz>
* Copy test framework from GitMichal Sojka2010-09-16
Git uses a simple and yet powerful test framework, written in shell. The framework is easy to use for both users and developers so I think it would help if it is used in notmuch as well. This is a copy of Git's test framework from commit b6b0afdc30e066788592ca07c9a6c6936c68cc11 in git repository. Signed-off-by: Michal Sojka <sojkam1@fel.cvut.cz>