<feed xmlns='http://www.w3.org/2005/Atom'>
<title>notmuch/test/test-lib.sh, branch 0.15.1</title>
<subtitle>thread-based email index, search, and tagging</subtitle>
<id>https://git.notmuchmail.org/git/notmuch/atom?h=0.15.1</id>
<link rel='self' href='https://git.notmuchmail.org/git/notmuch/atom?h=0.15.1'/>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/'/>
<updated>2013-01-24T10:59:21Z</updated>
<entry>
<title>test/test-lib.sh: use vt100 as dtach terminal if TERM dumb or unset/empty</title>
<updated>2013-01-24T10:59:21Z</updated>
<author>
<name>Tomi Ollila</name>
<email>tomi.ollila@iki.fi</email>
</author>
<published>2013-01-24T07:39:02Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=a12f810a00cf0779e9b62c400f7ccd7af9d3a113'/>
<id>urn:sha1:a12f810a00cf0779e9b62c400f7ccd7af9d3a113</id>
<content type='text'>
The TERM environment variable is set to 'dumb' when running tests, but
the original value of it is stored for echoing colors and running emacs
(somewhat interactively) in detached session. Emacs requires some
terminal control sequences to be available for interactive operation.
In case original TERM is (also) 'dumb' (or unset/empty) emacs cannot
run interactively. To fix this problem dtach (and emacs as it's child
process) is run with TERM=vt100 in case original TERM was unset, empty
or 'dumb'. This way there is a chance to run emacs tests with different
user terminals and potentially find problems there.
</content>
</entry>
<entry>
<title>test: normalize only message filenames in show json</title>
<updated>2012-12-17T13:08:04Z</updated>
<author>
<name>Peter Wang</name>
<email>novalazy@gmail.com</email>
</author>
<published>2012-12-15T03:06:42Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=ee425ae2ad8605a1c57ba2f71562db9f060d2cea'/>
<id>urn:sha1:ee425ae2ad8605a1c57ba2f71562db9f060d2cea</id>
<content type='text'>
notmuch_json_show_sanitize replaced "filename" field values even in part
structures, where the value is predictable.  Make it only normalize the
filename value if it is an absolute path (begins with slash), which is
true of the Maildir filenames that were intended to be normalized away.
</content>
</entry>
<entry>
<title>test: use perl instead of sed -r for portability</title>
<updated>2012-12-08T13:19:34Z</updated>
<author>
<name>Jani Nikula</name>
<email>jani@nikula.org</email>
</author>
<published>2012-12-04T21:26:33Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=540a34d096035ebf0c79990f030210b3fb65fa4f'/>
<id>urn:sha1:540a34d096035ebf0c79990f030210b3fb65fa4f</id>
<content type='text'>
Our OS X users report -r is not a supported option for sed. Use perl
instead.
</content>
</entry>
<entry>
<title>test: Fix UTF-8 JSON tests in Python 3</title>
<updated>2012-12-08T13:19:34Z</updated>
<author>
<name>Austin Clements</name>
<email>amdragon@MIT.EDU</email>
</author>
<published>2012-12-04T15:24:14Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=21326a1e6b23f0dc98d13c93cd5023e148fd1a5d'/>
<id>urn:sha1:21326a1e6b23f0dc98d13c93cd5023e148fd1a5d</id>
<content type='text'>
test_expect_equal_json uses json.tool from the system Python.  While
Python 2 wasn't picky about the encoding of stdin, Python 3 decodes
stdin strictly according to the environment.  Since we set LC_ALL=C
for the tests, Python 3's json.tool was assuming stdin would be in
ASCII and aborting when it couldn't decode the UTF-8 characters from
some of the JSON tests.  This patch sets the PYTHONIOENCODING
environment variable to utf-8 when invoking json.tool to override
Python's default encoding choice.
</content>
</entry>
<entry>
<title>test: Use associative arrays to track external prereqs</title>
<updated>2012-11-29T13:24:12Z</updated>
<author>
<name>Austin Clements</name>
<email>amdragon@MIT.EDU</email>
</author>
<published>2012-11-28T04:54:01Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=7a0813b72a04339581dfbe06fb9a6de9bc161025'/>
<id>urn:sha1:7a0813b72a04339581dfbe06fb9a6de9bc161025</id>
<content type='text'>
Previously, the test framework generated a variable name for each
external prereq as a poor man's associative array.  Unfortunately,
prereqs names may not be legal variable names, leading to
unintelligible bash errors like
  test_missing_external_prereq_emacsclient.emacs24_=t: command not found

Using proper associative arrays to track prereqs, in addition to being
much cleaner than generating variable names and using grep to
carefully construct unique string lists, removes restrictions on
prereq names.
</content>
</entry>
<entry>
<title>test: Abort driver if a test script aborts</title>
<updated>2012-11-29T13:24:12Z</updated>
<author>
<name>Austin Clements</name>
<email>amdragon@MIT.EDU</email>
</author>
<published>2012-11-28T04:13:16Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=ec59896de06cf76d6d7ee6ff7bc46df522c7afe3'/>
<id>urn:sha1:ec59896de06cf76d6d7ee6ff7bc46df522c7afe3</id>
<content type='text'>
Previously, if a test script aborted (e.g., because it passed too few
arguments to a test function), the test driver loop would simply
continue on to the next test script and the final results would
declare that everything passed (except that the test count would look
suspiciously low, but maybe you just misremembered how many tests
there were).

Now, if a test script exits with a non-zero status and did not produce
a final results file, we propagate that failure out of the driver loop
immediately.

To keep this simple, this patch removes the PID from the test-results
file name.  This PID was inherited from the git test system and seems
unnecessary, since the file name already includes the name of the test
script and the test-results directory is created anew for each run.
</content>
</entry>
<entry>
<title>test: Make the emacsclient binary user-configurable</title>
<updated>2012-11-29T13:24:12Z</updated>
<author>
<name>Austin Clements</name>
<email>amdragon@MIT.EDU</email>
</author>
<published>2012-11-28T03:24:59Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=d59d9c81522d9127dde089ae9457f44de53f28e9'/>
<id>urn:sha1:d59d9c81522d9127dde089ae9457f44de53f28e9</id>
<content type='text'>
And require that if TEST_EMACS is specified, so is TEST_EMACSCLIENT.

Previously, the test framework always used "emacsclient", even if the
Emacs in use was overridden by TEST_EMACS.  This causes problems if
both Emacs 23 and Emacs 24 are installed, the Emacs 23 emacsclient is
the system default, but TEST_EMACS is set to emacs24.  Specifically,
with an Emacs 24 server and an Emacs 23 client, emacs tests that run
very quickly may produce no output from emacsclient, causing the test
to fail.

The Emacs server uses a very simple line-oriented protocol in which
the client sends a request to evaluate an expression and the server
sends a request to print the result of evaluation.  Prior to Emacs bzr
commit 107565 on March 11th, 2012 (released in Emacs 24.1), if
multiple commands were sent to the emacsclient between when it sent
the evaluation command and when it entered its receive loop, it would
only process the first response command, ignoring the rest of the
received buffer.  This wasn't a problem with the Emacs 23 server
because it sent only the command to print the evaluation result.
However, the Emacs 24 server first sends an unprompted command
specifying the PID of the Emacs server, then processes the evaluation
request, then sends the command to print the result.  If the
evaluation is fast enough, it can send both of these commands before
emacsclient enters the receive loop.  Hence, if an Emacs 24 server is
used with an Emacs 23 emacsclient, it may miss the response printing
command, ultimately causing intermittent notmuch test failures.
</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>
<entry>
<title>notmuch-show: include Bcc header in json output</title>
<updated>2012-10-22T23:06:21Z</updated>
<author>
<name>Michal Nazarewicz</name>
<email>mina86@mina86.com</email>
</author>
<published>2012-09-10T06:35:30Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=ffb629cc5d2c2d1505eb5aefcf04fb4d0af6c0c8'/>
<id>urn:sha1:ffb629cc5d2c2d1505eb5aefcf04fb4d0af6c0c8</id>
<content type='text'>
With this change, emacs users can use notmuch-message-headers
variable to configure notmuch-show display Bcc header.
</content>
</entry>
<entry>
<title>test/test-lib.sh: take the --background feature in smtp-dummy into use</title>
<updated>2012-10-20T20:46:11Z</updated>
<author>
<name>Tomi Ollila</name>
<email>too@iki.fi</email>
</author>
<published>2012-09-18T14:23:02Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=b7f7b573e4bf3d00d9e887bc1aee264722d22778'/>
<id>urn:sha1:b7f7b573e4bf3d00d9e887bc1aee264722d22778</id>
<content type='text'>
The use of --background option (instead of shell '&amp;') ensures that
smtp-dummy is listening its server socket until execution of shell
script can continue, thus the client will always have socket where
to connect.

smtp-dummy outputs smtp_dummy_pid variable in shell assignment format;
eval'ing that output makes that variable available for the shell.

As the smtp-dummy instance is no longer child process of the script
the SIGKILL signal sent to it will ensure it is going away in case
the mail sender fails to connect to smtp-dummy.
</content>
</entry>
</feed>
