<feed xmlns='http://www.w3.org/2005/Atom'>
<title>notmuch/test/test-lib.sh, branch 0.9</title>
<subtitle>thread-based email index, search, and tagging</subtitle>
<id>https://git.notmuchmail.org/git/notmuch/atom?h=0.9</id>
<link rel='self' href='https://git.notmuchmail.org/git/notmuch/atom?h=0.9'/>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/'/>
<updated>2011-09-13T02:36:00Z</updated>
<entry>
<title>test: Report test failures from test_expect_*</title>
<updated>2011-09-13T02:36:00Z</updated>
<author>
<name>Austin Clements</name>
<email>amdragon@mit.edu</email>
</author>
<published>2011-05-12T13:11:36Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=003e718020b335f329f852ff1a3da23873d2ff6e'/>
<id>urn:sha1:003e718020b335f329f852ff1a3da23873d2ff6e</id>
<content type='text'>
This makes test_expect_* return non-zero if the test fails, so the
caller can make decisions based on this, such as setting test
prerequisites.
</content>
</entry>
<entry>
<title>test: Fix message when skipping test_expect_equal* tests</title>
<updated>2011-09-13T02:35:59Z</updated>
<author>
<name>Austin Clements</name>
<email>amdragon@mit.edu</email>
</author>
<published>2011-05-12T13:09:06Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=5ae1b9c328518a3b09be827ee59498b0598119ff'/>
<id>urn:sha1:5ae1b9c328518a3b09be827ee59498b0598119ff</id>
<content type='text'>
For these types of tests, the test name is previously recorded in a
variable, not passed to the test function, so pass this variable to
test_skip.
</content>
</entry>
<entry>
<title>test: reset test_subtest_known_broken_ after each success/failure.</title>
<updated>2011-09-13T02:35:21Z</updated>
<author>
<name>David Bremner</name>
<email>bremner@debian.org</email>
</author>
<published>2011-09-13T01:40:57Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=22af786838793ed97fa3dbb1d223e90602912b71'/>
<id>urn:sha1:22af786838793ed97fa3dbb1d223e90602912b71</id>
<content type='text'>
This means that test_subtest_known_broken needs to be called before
every known broken subtest, which is no different than what is
documented for the test_begin_subtest case.

The assumption is that every test ends up calling either skipping,
calling test_ok_ or test_failure_ and and the latter in turn delegate
to the known_broken versions in the case where
test_subtest_known_broken_ is set.
</content>
</entry>
<entry>
<title>test: improve known broken tests support</title>
<updated>2011-09-10T13:13:27Z</updated>
<author>
<name>Dmitry Kurochkin</name>
<email>dmitry.kurochkin@gmail.com</email>
</author>
<published>2011-07-04T04:07:20Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=4cc67276885990c38bc2bcc79eedbb0851e2bc8a'/>
<id>urn:sha1:4cc67276885990c38bc2bcc79eedbb0851e2bc8a</id>
<content type='text'>
There is existing support for broken tests.  But it is not convenient
to use.  The primary issue is that we have to maintain a set of
test_expect_*_failure functions which are equivalent to the normal
test_expect_* counterparts except for what functions are called for
result reporting.  The patch adds test_subtest_known_broken function
which marks a subset as broken, making the normal test_expect_*
functions behave as test_expect_*_failure.  All test_expect_*_failure
functions are removed.  Test_known_broken_failure_ is changed to
format details the same way as test_failure_ does.

Another benefit of this change is that the diff when a broken test is
fixed would be small and nice.

Documentation is updated accordingly.
</content>
</entry>
<entry>
<title>test: Nix increment_mtime.</title>
<updated>2011-06-29T22:26:45Z</updated>
<author>
<name>Austin Clements</name>
<email>amdragon@MIT.EDU</email>
</author>
<published>2011-06-29T07:10:55Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=47afbdfb7995d703987a273bccc3a60fedc6dd08'/>
<id>urn:sha1:47afbdfb7995d703987a273bccc3a60fedc6dd08</id>
<content type='text'>
With the fix for the mtime race, this workaround is no longer
necessary.
</content>
</entry>
<entry>
<title>test: use emacsclient(1) for Emacs tests</title>
<updated>2011-06-29T00:10:55Z</updated>
<author>
<name>Dmitry Kurochkin</name>
<email>dmitry.kurochkin@gmail.com</email>
</author>
<published>2011-06-28T04:56:17Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=a854d06e92645350b7ec3f6cd1a10a2f6933104f'/>
<id>urn:sha1:a854d06e92645350b7ec3f6cd1a10a2f6933104f</id>
<content type='text'>
Before the change, every Emacs test ran in a separate Emacs
instance.  Starting Emacs many times wastes considerable time and
it gets worse as the test suite grows.  The patch solves this by
using a single Emacs server and emacsclient(1) to run multiple
tests.  Emacs server is started on the first test_emacs call and
stopped when test_done is called.  We take care not to leave
orphan Emacs processes behind when test is terminated by whatever
reason: Emacs server runs a watchdog that periodically checks
that the test is still running.

Some tests need to provide user input.  Before the change, this
was done using echo(1) to Emacs stdin.  This no longer works and
instead `standard-input' variable is set accordingly to make
`read' return the appropriate string.
</content>
</entry>
<entry>
<title>test: Increment mtime when delivering a message with emacs_deliver_message</title>
<updated>2011-06-29T00:10:55Z</updated>
<author>
<name>Carl Worth</name>
<email>cworth@cworth.org</email>
</author>
<published>2011-06-29T00:06:15Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=6ea26cfb81c68526b157a213d00b593d4e7b1335'/>
<id>urn:sha1:6ea26cfb81c68526b157a213d00b593d4e7b1335</id>
<content type='text'>
Without this, mail messages delivered by emacs_deliver_message might
not be seen by the next invocation of "notmuch new", (which can lead
to test-suite failures if emacs_deliver_message is fast enough).
</content>
</entry>
<entry>
<title>test:Improve test behaviors when --root is used</title>
<updated>2011-06-28T23:01:56Z</updated>
<author>
<name>Mark Anderson</name>
<email>ma.skies@gmail.com</email>
</author>
<published>2011-06-28T22:11:32Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=eb4cf465a5c179c711c15649fc90c7377850cb77'/>
<id>urn:sha1:eb4cf465a5c179c711c15649fc90c7377850cb77</id>
<content type='text'>
Change add_email_corpus, emacs_deliver_message and tests to use
$TEST_DIRECTORY instead of '..'.

This improves the behavior of the usage of --root=&lt;dir&gt;, as the
assumption of what '..' means will usually be incorrect.

Document -root option in README and update valgrind to work with
-root.
</content>
</entry>
<entry>
<title>test: generate run_emacs script once on test startup</title>
<updated>2011-06-28T22:06:47Z</updated>
<author>
<name>Dmitry Kurochkin</name>
<email>dmitry.kurochkin@gmail.com</email>
</author>
<published>2011-06-28T04:45:10Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=273d896097830235eca5f1bc87ac03e381280f1c'/>
<id>urn:sha1:273d896097830235eca5f1bc87ac03e381280f1c</id>
<content type='text'>
Instead of generating auxiliary run_emacs script every time
test_emacs is run, do it once in the beginning of the test.

Also, use absolute paths in the script to make it more robust.
</content>
</entry>
<entry>
<title>test: set variables using `let' instead of `setq' in Emacs tests</title>
<updated>2011-06-28T22:06:47Z</updated>
<author>
<name>Dmitry Kurochkin</name>
<email>dmitry.kurochkin@gmail.com</email>
</author>
<published>2011-06-28T04:45:09Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=0cc5483a9cc496bbaa1a6aef03e99b4a7686f779'/>
<id>urn:sha1:0cc5483a9cc496bbaa1a6aef03e99b4a7686f779</id>
<content type='text'>
Using `setq' for setting variables in Emacs tests affect other
tests that may run in the same Emacs environment.  Currently it
works because each test is run in a separate Emacs instance.  But
in the future multiple tests will run in a single Emacs instance.
The patch changes all variables to use `let', so the scope of the
change is limited to a single test.
</content>
</entry>
</feed>
