<feed xmlns='http://www.w3.org/2005/Atom'>
<title>notmuch/test/test-lib-common.sh, branch 0.23.6</title>
<subtitle>thread-based email index, search, and tagging</subtitle>
<id>https://git.notmuchmail.org/git/notmuch/atom?h=0.23.6</id>
<link rel='self' href='https://git.notmuchmail.org/git/notmuch/atom?h=0.23.6'/>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/'/>
<updated>2016-06-11T16:11:49Z</updated>
<entry>
<title>test: set LD_LIBRARY_PATH early and keep its old contents</title>
<updated>2016-06-11T16:11:49Z</updated>
<author>
<name>Tomi Ollila</name>
<email>tomi.ollila@iki.fi</email>
</author>
<published>2016-05-25T21:37:40Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=f0e5317bcdc856739c5107705e3bc86b31b01d38'/>
<id>urn:sha1:f0e5317bcdc856739c5107705e3bc86b31b01d38</id>
<content type='text'>
Previously LD_LIBRARY_PATH was exported (and environment changed)
in the middle of test case execution, when a function setting it
was called.

Previously the old contents of LD_LIBRARY_PATH was lost (if any)
when it was re-set and exported. In some systems the old contents of
LD_LIBRARY_PATH was needed to e.g. locate suitable gmime library.
</content>
</entry>
<entry>
<title>test: fix die() in test-lib-common.sh</title>
<updated>2016-06-11T16:03:44Z</updated>
<author>
<name>Tomi Ollila</name>
<email>tomi.ollila@iki.fi</email>
</author>
<published>2016-05-28T12:39:30Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=36492f20a71906413d9922dbad5e18571059f57a'/>
<id>urn:sha1:36492f20a71906413d9922dbad5e18571059f57a</id>
<content type='text'>
In scripts that include test-lib-common.sh but not test-lib.sh
the die() implementation needs to be a bit different due to
fd redirection differences. test-lib-common.sh implements die()
only if it was not implemented already.
</content>
</entry>
<entry>
<title>Use https instead of http where possible</title>
<updated>2016-06-05T11:32:17Z</updated>
<author>
<name>Daniel Kahn Gillmor</name>
<email>dkg@fifthhorseman.net</email>
</author>
<published>2016-06-02T16:26:14Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=6a833a6e83865f6999707cc30768d07e1351c2cb'/>
<id>urn:sha1:6a833a6e83865f6999707cc30768d07e1351c2cb</id>
<content type='text'>
Many of the external links found in the notmuch source can be resolved
using https instead of http.  This changeset addresses as many as i
could find, without touching the e-mail corpus or expected outputs
found in tests.
</content>
</entry>
<entry>
<title>test: copyright information updates</title>
<updated>2016-05-19T10:56:58Z</updated>
<author>
<name>Tomi Ollila</name>
<email>tomi.ollila@iki.fi</email>
</author>
<published>2016-05-06T15:41:57Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=b183f2635eaf323066f26c7ca22d931d4f4ccd3a'/>
<id>urn:sha1:b183f2635eaf323066f26c7ca22d931d4f4ccd3a</id>
<content type='text'>
Files in test directories had only copyright of a single individual,
of which code was adapted here as a base of the test system.
Since then many Notmuch Developers have contributed to the test
system, which is now acknowledged with a constant string in some
of the test files.

The README file in test directory instructed new files contain a
copyright notice, but that has never been done (and it is also not
needed). To simplify things a bit (and lessen confusion) this
instruction is now removed.

As a side enchangement, all of the 3 entries in the whole source
tree cd'ing to `dirname` of "$0" now uses syntax cd "$(dirname "$0")".
This makes these particular lines work when current working directory
is e.g. /c/Program Files/notmuch/test/.
(Probably it would fail elsewhere, though.)
</content>
</entry>
<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>
</feed>
