<feed xmlns='http://www.w3.org/2005/Atom'>
<title>notmuch/test/test-lib-common.sh, branch 0.22</title>
<subtitle>thread-based email index, search, and tagging</subtitle>
<id>https://git.notmuchmail.org/git/notmuch/atom?h=0.22</id>
<link rel='self' href='https://git.notmuchmail.org/git/notmuch/atom?h=0.22'/>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/'/>
<updated>2015-12-30T15:28:30Z</updated>
<entry>
<title>test: Always use paths without symlinks</title>
<updated>2015-12-30T15:28:30Z</updated>
<author>
<name>Michal Sojka</name>
<email>sojkam1@fel.cvut.cz</email>
</author>
<published>2015-12-29T09:30:26Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=c2dfaccc9080f819a4ab3739ded7485044993ad4'/>
<id>urn:sha1:c2dfaccc9080f819a4ab3739ded7485044993ad4</id>
<content type='text'>
When notmuch sources are at a symlinked path, some tests fail because
one part of the test uses physical path and another uses logical
path (with symlinks). For example the following test output is
produced when the test is started from /home/src/symlink-to-notmuch,
which is a symlink to /home/src/notmuch.

    FAIL   notmuch-fcc-dirs set to a string
        --- T310-emacs.26.OUTPUT        2015-12-29 08:54:29.055878637 +0000
        +++ T310-emacs.26.EXPECTED      2015-12-29 08:54:29.055878637 +0000
        @@ -1,5 +1,5 @@
         From: Notmuch Test Suite &lt;test_suite@notmuchmail.org&gt;
         To:
         Subject:
        -Fcc: /home/src/notmuch/test/tmp.T310-emacs/mail/sent-string
        +Fcc: /home/src/symlink-to-notmuch/test/tmp.T310-emacs/mail/sent-string
         --text follows this line--
    nil

This commit makes all paths in test scripts physical. With it, all
tests pass even when run from a symlinked directory.
</content>
</entry>
<entry>
<title>test: move backup_database and restore_database to library</title>
<updated>2015-09-04T11:22:42Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2015-06-07T15:01:59Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=9ee29ad6f0805dc55e63f8a04a68a1f55d0c382b'/>
<id>urn:sha1:9ee29ad6f0805dc55e63f8a04a68a1f55d0c382b</id>
<content type='text'>
The plan is to re-use them in testing the same errors from the CLI
</content>
</entry>
<entry>
<title>test: make script exit (1) if it "fails" to source (.) a file</title>
<updated>2015-08-07T19:56:39Z</updated>
<author>
<name>Tomi Ollila</name>
<email>tomi.ollila@iki.fi</email>
</author>
<published>2015-08-06T09:13:36Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=02a2eeb427d6b424029f6e5e5ddad4c6ec987741'/>
<id>urn:sha1:02a2eeb427d6b424029f6e5e5ddad4c6ec987741</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>test: prepare test-lib.sh for possible test system debug session</title>
<updated>2015-01-19T07:15:39Z</updated>
<author>
<name>Tomi Ollila</name>
<email>tomi.ollila@iki.fi</email>
</author>
<published>2014-09-21T18:06:20Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=7fcd100a2f4fcc3762f2f73bcca3c30cc971b67a'/>
<id>urn:sha1:7fcd100a2f4fcc3762f2f73bcca3c30cc971b67a</id>
<content type='text'>
When something in tests fails one possibility to test is to run
the test script as `bash -x TXXX-testname.sh`. As stderr (fd 2) was
redirected to separate file during test execution also this set -x
(xtrace) output would also go there.
test-lib.sh saves the stderr to fd 7 from where it can be restored,
and bash has BASH_XTRACEFD variable, which is now given the same value
7, making bash to output all xtrade information (consistently) there.

This lib file used to save fd's 1 &amp; 2 to 6 &amp; 7 (respectively) in
test_begin_subtest(), but as those needs to be set *before* XTRACEFD
variable is set those are now saved at the beginning of the lib (once).
This is safe and simple thing to do.
To make xtrace output more verbose PS4 variable was set to contain the
source file, line number and if execution is in function, that function
name. Setting this variable has no effect when not xtracing.

As it is known that fd 6 is redirected stdout, printing status can now
use that fd, instead of saving stdout to fd 5 and use it.
</content>
</entry>
<entry>
<title>test: use sh.config for configuration</title>
<updated>2014-07-13T15:16:06Z</updated>
<author>
<name>Jani Nikula</name>
<email>jani@nikula.org</email>
</author>
<published>2014-05-30T07:43:05Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=c2d8236b56e713ae2e7053c9ea3cc13f7d1283c4'/>
<id>urn:sha1:c2d8236b56e713ae2e7053c9ea3cc13f7d1283c4</id>
<content type='text'>
</content>
</entry>
<entry>
<title>doc: build man pages into hierarchy, fix help test.</title>
<updated>2014-03-18T10:39:12Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2014-03-13T03:21:15Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=533639b143202d333eb964aa0c6a860db0809344'/>
<id>urn:sha1:533639b143202d333eb964aa0c6a860db0809344</id>
<content type='text'>
It turns out there was a reason the old man pages were stored in a man
compatible hierarchy, namely so that we could run man on them before
installing.

Hardcode doc build location into test suite.  This isn't ideal, but
let's unbreak the test suite for now.
</content>
</entry>
<entry>
<title>test: factor out part of test-lib.sh into test-lib-common.sh</title>
<updated>2012-11-26T01:11:59Z</updated>
<author>
<name>David Bremner</name>
<email>bremner@debian.org</email>
</author>
<published>2012-11-17T20:14:41Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=20b7e0ff2f12e612dee00efc6ff1634aae8172a4'/>
<id>urn:sha1:20b7e0ff2f12e612dee00efc6ff1634aae8172a4</id>
<content type='text'>
The idea is to use some of the simpler parts of the test suite
infrastructure to help run performance tests.
</content>
</entry>
</feed>
