| Age | Commit message (Collapse) | Author |
|
test_require_external prereq has to move to test-lib-common.sh, and
the new shell functions print_emacs_header and time_emacs are provided.
The somewhat indirect way of printing the output is to avoid the extra
"" present on string values from emacsclient.
|
|
This allows sharing more variable settings between the (correctness)
tests and the performance-tests. Unfortunately it seems a bit tricky
to move settings to test-lib-common.sh, as that is sourced late in
test-lib.sh, and moving it earlier breaks things.
|
|
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
|
|
Although the generation of perf data is not as slow as valgrind, it
seems simplest to re-use the machinery already there to save the logs
in a timestamped subdirectory.
|
|
In 8e7fb88237aedea22 Jani replaced the use of $(pwd -P) to find the
TEST_DIRECTORY in order to better support out of tree
builds. Unfortunately the performance-tests need a different value for
the variable and were thus broken.
This commit splits out the setting of this variable for the two sets
of tests. Performance tests still don't work out of tree, because
the handling of the downloaded corpus needs to be updated.
|
|
Make a distinction between source and build directories.
|
|
This allows the use of redirection in the tests
|
|
The files (test) scripts source (with builtin command `.`) provides
information which the scripts depend, and without the `source` to
succeed allowing script to continue may lead to dangerous situations
(e.g. rm -rf "${undefined_variable}"/*).
At the end of all source (.) lines construct ' || exit 1' was added;
In our case the script script will exit if it cannot find (or read) the
file to be sourced. Additionally script would also exits if the last
command of the sourced file exited nonzero.
|
|
The word "setup" is a noun, not a verb. Change occurrences of "setup"
where used as a verb to "set up".
|
|
It seems that between version 1.26 and 1.27 of gnu tar, directories to
be extracted read with --files-from are no longer recursively extacted.
This patch puts them on the command line instead.
|
|
The new revision of the performance test includes manifests for each corpus,
so update the support library to use these manifests at the same time.
|
|
As with the valgrind logs, we print a (very) brief summary and leave
the log for inspection.
|
|
The idea is run some code under valgrind --leak-check=full and report
a summary, leaving the user to peruse the log file if they want.
We go to some lengths to preserve the log files from accidental
overwriting; the full corpus takes about 3 hours to run under valgrind
on my machine.
The naming of the log directories may be slightly controversial; in
the unlikely event of two runs in less than a second, the log will be
overwritten. A previous version with mktemp+timestamp was dismissed as
overkill; just mktemp alone does not sort nicely.
One new test is included, to check notmuch new for memory leaks.
|
|
There is only one set of tags, independant of the size of message
corpus chosen.
|
|
The caching and uncaching seem to be necessarily manual, as timing the
initial notmuch new is one of our goals with this suite.
|
|
Unpacking is not really the expensive step (compared to the initial
notmuch new), but this is a pre-requisite to caching the database.
|
|
Output from tests is indented slightly in the same style as the
correctness tests.
|
|
Austin suggested a while ago that the corpus size be printed in the
header. In the end it seems the corpus will be fixed per test script,
so this suggestion indeed makes sense.
The tabbing was wrapping on my usual 80 column terminal, so I joined
the input and output columns together.
|
|
This patch just sets (non-exported) variables. The variable $debug is
already used, and $corpus_size will be used in following commits.
|
|
Unlike in the correctness tests, the most common cause of non-zero
return seems to be the user interrupting, so killing the run seems
like the friendly thing to do.
|
|
Austin Read enough Fine Manuals to figure out this is in multiples of
512 bytes.
|
|
This is not near as fancy as as the unit tests, on the theory that
the code should typically be crashing when performance tuning.
Nonetheless, there is plenty of room for improvement. Several more of
the pieces of the test infrastructure (e.g. the option parsing) could
be factored out into test/test-lib-common.sh
|