Commit graph

14 commits

Author SHA1 Message Date
Tomi Ollila
95efe2d484 test: allow user to choose which gdb to run tests with
The variable used for selecting gdb is TEST_GDB, consistent with
TEST_CC and TEST_EMACS{,CLIENT}.
2017-01-08 10:50:28 -04:00
David Bremner
d74c534570 cli/insert: return EX_TEMPFAIL for some errors
Attempt to distinguish between errors indicating misconfiguration or
programmer error, which we consider "permanent", in the sense that
automatic retries are unlikely to be useful, and those indicating
transient error conditions. We consider XAPIAN_EXCEPTION transient
because it covers the important special case of locking failure.
2016-12-07 07:00:40 -04:00
Tomi Ollila
27e293f653 test: gdb insert: redirect input inside gdb script
Running `gdb command < input` is not as reliable way to give input
to the command (some installations of gdb consume it). Use "set args"
gdb command to have input redirected at gdb 'run' time.
2016-12-07 07:00:39 -04:00
David Bremner
f45fa5bdd3 test: make gdb even quieter
gdb sometimes writes warnings to stdout, which we don't need/want, and
for some reason --batch-silent isn't enough to hide. So in this commit
we write them to a log file, which is probably better for debugging
anyway. To see an illustrative test failure before this change, run

% make
% touch notmuch-count.c
% cd test && ./T060-count.sh
2016-08-09 09:33:59 +09:00
Tomi Ollila
02a2eeb427 test: make script exit (1) if it "fails" to source (.) a file
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.
2015-08-07 21:56:39 +02:00
David Bremner
b59ad1a9cc lib: add NOTMUCH_STATUS_PATH_ERROR
The difference with FILE_ERROR is that this is for things that are
wrong with the path before looking at the disk.

Add some 3 tests; two broken as a reminder to actually use this new
code.
2015-06-12 07:34:47 +02:00
David Bremner
5df1b1bb81 test: remove redundant 'file' command from gdb scripts.
Quoting Debian bug 787341

   It failed to build on arm64: the last ten tests in T070-insert
   failed.

   What's happening here is that GDB is segfaulting in response to
   the
   "file" command. GDB on arm64 can be a bit buggy.

   However, the "file" command is redundant here as GDB has already
   got
   the file from the --args on the command line.
2015-05-31 18:56:10 +02:00
David Bremner
dd8373fb57 test: check for gdb in insert tests
Commits a6cee01 and c48b12f otherwise break the build for people
without gdb.
2014-10-18 08:13:42 +02:00
David Bremner
c48b12f18a test/insert: check that indexing errors are accepted with --keep
This is overkill for the current code path, but should provide some
robustness for future changes in error handling.
2014-10-18 07:58:42 +02:00
Jani Nikula
dc20a0eedc cli/insert: require succesful message indexing for success status
Add --keep option to keep any remaining stuff in index or file. We
could distinguish between failures to index and failures to apply tags
or maildir sync, but for simplicity just have one.
2014-10-18 07:54:25 +02:00
David Bremner
a6cee01b4e test/insert: add known broken tests for indexing failures
These tests are written with the assumption that we want all indexing
failures to be considered as failures by notmuch insert.
2014-10-18 07:51:18 +02:00
Jani Nikula
2a865351dd test: make insert test use the path: prefix
This is a more strict test for the insert test.
2014-03-11 19:51:22 -03:00
Jani Nikula
07fdac912f test: add tests for invalid new.tags
Similar tests for both notmuch new and insert.
2014-03-06 07:42:37 -04:00
Tomi Ollila
a755c9d6a9 test: renamed test scripts to format T\d\d\d-name.sh
All test scripts to be executed are now named as T\d\d\d-name.sh,
numers in increments of 10.

This eases adding new tests and developers to see which are test scripts
that are executed by test suite and in which order.
2014-01-13 14:16:46 -04:00
Renamed from test/insert (Browse further)