Commit graph

257 commits

Author SHA1 Message Date
Carl Worth
60c599036e test: Fix test suite so that --valgrind option works.
The output is ugly, and we need a better suppressions file, but this
is at least a start.
2010-09-20 13:44:32 -07:00
Carl Worth
c92ad8bf6a test: Rework test-suite input to avoid ulti-command strings
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.
2010-09-17 15:25:39 -07:00
Carl Worth
222926abe1 test: Cleanup the test output
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
2010-09-17 14:08:36 -07:00
Michal Sojka
7a72999fad test: Set all times to UTC
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>
2010-09-16 15:56:44 -07:00
Michal Sojka
04d454f582 test: Update helper functions
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>
2010-09-16 15:56:44 -07:00
Michal Sojka
223987bace Update test framework for use with notmuch
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>
2010-09-16 15:56:44 -07:00
Michal Sojka
0083854b12 Copy test framework from Git
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>
2010-09-16 15:56:44 -07:00