[PATCH v3 1/7] test: add support for external executable dependencies

2011-11-27 Thread Dmitry Kurochkin
There is existing support for general prerequisites in the test suite. But it is not very convenient to use: every test case has to keep track for it's dependencies and they have to be explicitly listed. The patch aims to add better support for a particular type of external dependencies: external

[PATCH v3 00/7] test: (hopefully) better test prerequisites

2011-11-27 Thread Dmitry Kurochkin
Changes: v3 since v2: * rebased the remaining patches on current master v2 since v1: * Add test_require_external_prereq function to explicitly check for external dependencies, use it in test_emacs. * Indenting fixes. * Use $binary instead of $1 in test_declare_external_prereq. Regards,

[PATCH] Build symbol-test with make instead of hardcoding in symbol-hiding.

2011-11-27 Thread Dmitry Kurochkin
On Sat, 26 Nov 2011 22:14:20 +0100, Amadeusz ?o?nowski wrote: > If symbol-test is built in symbol-hiding with hardcoded g++ invokation, > it's not so easy to pass $(srcdir) which is required to find notmuch.h > when srcdir and builddir are separate directories. > --- > test/.gitignore |1

Re: [PATCH] Build symbol-test with make instead of hardcoding in symbol-hiding.

2011-11-27 Thread Dmitry Kurochkin
On Sat, 26 Nov 2011 22:14:20 +0100, Amadeusz Żołnowski aide...@aidecoe.name wrote: If symbol-test is built in symbol-hiding with hardcoded g++ invokation, it's not so easy to pass $(srcdir) which is required to find notmuch.h when srcdir and builddir are separate directories. ---

[PATCH v3 00/7] test: (hopefully) better test prerequisites

2011-11-27 Thread Dmitry Kurochkin
Changes: v3 since v2: * rebased the remaining patches on current master v2 since v1: * Add test_require_external_prereq function to explicitly check for external dependencies, use it in test_emacs. * Indenting fixes. * Use $binary instead of $1 in test_declare_external_prereq. Regards,

[PATCH v3 1/7] test: add support for external executable dependencies

2011-11-27 Thread Dmitry Kurochkin
There is existing support for general prerequisites in the test suite. But it is not very convenient to use: every test case has to keep track for it's dependencies and they have to be explicitly listed. The patch aims to add better support for a particular type of external dependencies: external

[PATCH v3 2/7] test: fix skipping test verbose output

2011-11-27 Thread Dmitry Kurochkin
--- test/test-lib.sh |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/test/test-lib.sh b/test/test-lib.sh index 0996a74..df867a5 100644 --- a/test/test-lib.sh +++ b/test/test-lib.sh @@ -657,7 +657,8 @@ test_check_missing_external_prereqs_ () { test_report_skip_ () {

[PATCH v3 3/7] test: skip all subtests if external dependencies are missing during init

2011-11-27 Thread Dmitry Kurochkin
Some tests (e.g. crypto) do a common initialization required for all subtests. The patch adds a check for missing external dependencies during this initialization. If any prerequisites are missing, all subtests are skipped. The check is run on the first call of test_reset_state_ function, so no

[PATCH v3 4/7] test: declare external dependencies for the tests

2011-11-27 Thread Dmitry Kurochkin
That are: dtach(1), emacs(1), emacsclient(1), gdb(1) and gpg(1). --- test/test-lib.sh |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/test/test-lib.sh b/test/test-lib.sh index 99b9e8b..fe80e89 100644 --- a/test/test-lib.sh +++ b/test/test-lib.sh @@ -1123,3 +1123,10

[PATCH v3 5/7] test: add function to explicitly check for external dependencies

2011-11-27 Thread Dmitry Kurochkin
Useful when binary is called indirectly (e.g. from emacs). --- test/test-lib.sh | 14 ++ 1 files changed, 14 insertions(+), 0 deletions(-) diff --git a/test/test-lib.sh b/test/test-lib.sh index fe80e89..2422e32 100644 --- a/test/test-lib.sh +++ b/test/test-lib.sh @@ -555,12 +555,26

[PATCH v3 6/7] test: check if emacs is available in the beginning of test_emacs

2011-11-27 Thread Dmitry Kurochkin
Unfortunately, this is needed to avoid the emacs waiting loop. --- test/test-lib.sh |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/test/test-lib.sh b/test/test-lib.sh index 2422e32..11e6646 100644 --- a/test/test-lib.sh +++ b/test/test-lib.sh @@ -894,6 +894,10 @@ EOF

[PATCH v3 7/7] test: fix Stashing in notmuch-search test when emacs is not available

2011-11-27 Thread Dmitry Kurochkin
If emacs is not available, test_expect_equal would be called with only one argument. The patch fixes this by quoting the (possibly empty) $(cat OUTPUT) argument. --- test/emacs |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/test/emacs b/test/emacs index

Re: [PATCH 1/3] test: add functions to count how much times notmuch was called

2011-11-27 Thread Dmitry Kurochkin
On Sun, 27 Nov 2011 21:44:23 -0500, Austin Clements amdra...@mit.edu wrote: On Sat, 26 Nov 2011 05:44:36 +0400, Dmitry Kurochkin dmitry.kuroch...@gmail.com wrote: The patch adds two auxiliary functions and a variable: notmuch_counter_reset $notmuch_counter notmuch_counter

[PATCH 0/3] emacs: do not call notmuch show for non-inlinable parts

2011-11-27 Thread Dmitry Kurochkin
This patch series has all comments from Austin's review [1] fixed. Changes in v2 since v1: * Rename $notmuch_counter variable to $notmuch_counter_command. * Rename notmuch_counter() function to notmuch_counter_value(). * Fix documentation for notmuch_counter_value(). * Removed unneeded and add

[PATCH 1/3] test: add functions to count how much times notmuch was called

2011-11-27 Thread Dmitry Kurochkin
The patch adds two auxiliary functions and a variable: notmuch_counter_reset $notmuch_counter_command notmuch_counter_value They allow to count how many times notmuch binary is called. notmuch_counter_reset() function generates a script that counts how many times it is called and resets

[PATCH 2/3] test: check that Emacs UI does not call notmuch for non-inlinable parts

2011-11-27 Thread Dmitry Kurochkin
The patch adds two new test cases: * Do not call notmuch for non-inlinable application/mpeg parts * Do not call notmuch for non-inlinable audio/mpeg parts The application/mpeg test passes thanks to a workaround for application/* Content-Types. The audio/mpeg is currently broken. --- test/emacs

[PATCH 3/3] emacs: do not call notmuch show for non-inlinable parts

2011-11-27 Thread Dmitry Kurochkin
Before the change, there was a workaround to avoid notmuch show calls for parts with application/* Content-Type. But non-inlinable parts are not limited to this Content-Type (e.g. mp3 files have audio/mpeg Content-Type and are not inlinable). For such parts `notmuch-show-insert-part-*/*' handler

Re: [PATCH v6 1/2] emacs: User-defined sections in notmuch-hello

2011-11-27 Thread Dmitry Kurochkin
Hi Daniel. On Thu, 24 Nov 2011 15:01:01 +0100, Daniel Schoepe dan...@schoepe.org wrote: On Thu, 24 Nov 2011 09:54:50 -0400, David Bremner da...@tethera.net wrote: On Mon, 10 Oct 2011 15:39:41 +0200, Daniel Schoepe dan...@schoepe.org wrote: From: Daniel Schoepe

[PATCH 2/2] test: cleanup basic tests

2011-11-26 Thread Dmitry Kurochkin
Basic test 'Ensure that all available tests will be run by notmuch-test' compares all tests that are run with listing of test/ directory. There is a growing list of exceptions for files and directories which located in the test/ directory but are not tests. Moreover some (probably buggy) tests do

[PATCH 1/2] test: remove executable permissions from test-lib.sh

2011-11-26 Thread Dmitry Kurochkin
It is not supposed to be run, only sourced. --- 0 files changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 test/test-lib.sh diff --git a/test/test-lib.sh b/test/test-lib.sh old mode 100755 new mode 100644 -- 1.7.7.3

[PATCH] test: fix sed error in basic tests

2011-11-26 Thread Dmitry Kurochkin
Ping. Perhaps this is trivial enought to be pushed? Regards, Dmitry

[PATCH 3/3] emacs: do not call notmuch show for non-inlinable parts

2011-11-26 Thread Dmitry Kurochkin
Before the change, there was a workaround to avoid notmuch show calls for parts with application/* Content-Type. But non-inlinable parts are not limited to this Content-Type (e.g. mp3 files have audio/mpeg Content-Type and are not inlinable). For such parts `notmuch-show-insert-part-*/*' handler

[PATCH 2/3] test: check that Emacs UI does not call notmuch for non-inlinable parts

2011-11-26 Thread Dmitry Kurochkin
The patch adds two new test cases: * Do not call notmuch for non-inlinable application/mpeg parts * Do not call notmuch for non-inlinable audio/mpeg parts The application/mpeg test passes thanks to a workaround for application/* Content-Types. The audio/mpeg is currently broken. --- test/emacs

[PATCH 1/3] test: add functions to count how much times notmuch was called

2011-11-26 Thread Dmitry Kurochkin
The patch adds two auxiliary functions and a variable: notmuch_counter_reset $notmuch_counter notmuch_counter They allow to count how many times notmuch binary is called. notmuch_counter_reset() function generates a script that counts how many times it is called and resets the counter to

[PATCH 2/2] emacs: remove unused variable in `notmuch-show-insert-part-message/rfc822'

2011-11-26 Thread Dmitry Kurochkin
An obvious cleanup. I wonder why there was no warning about this during compilation. --- emacs/notmuch-show.el |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el index bcc436f..66c08cc 100644 --- a/emacs/notmuch-show.el +++

[PATCH 1/2] emacs: remove some code duplication in notmuch-show

2011-11-26 Thread Dmitry Kurochkin
Add optional props argument to `notmuch-show-get-header'. Use it to get headers in `notmuch-show-insert-part-multipart/signed' and `notmuch-show-insert-part-multipart/encrypted'. --- emacs/notmuch-show.el | 10 -- 1 files changed, 4 insertions(+), 6 deletions(-) diff --git

[PATCH 1/2] emacs: remove some code duplication in notmuch-show

2011-11-25 Thread Dmitry Kurochkin
Add optional props argument to `notmuch-show-get-header'. Use it to get headers in `notmuch-show-insert-part-multipart/signed' and `notmuch-show-insert-part-multipart/encrypted'. --- emacs/notmuch-show.el | 10 -- 1 files changed, 4 insertions(+), 6 deletions(-) diff --git

[PATCH 2/2] emacs: remove unused variable in `notmuch-show-insert-part-message/rfc822'

2011-11-25 Thread Dmitry Kurochkin
An obvious cleanup. I wonder why there was no warning about this during compilation. --- emacs/notmuch-show.el |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el index bcc436f..66c08cc 100644 --- a/emacs/notmuch-show.el +++

[PATCH 1/3] test: add functions to count how much times notmuch was called

2011-11-25 Thread Dmitry Kurochkin
The patch adds two auxiliary functions and a variable: notmuch_counter_reset $notmuch_counter notmuch_counter They allow to count how many times notmuch binary is called. notmuch_counter_reset() function generates a script that counts how many times it is called and resets the counter to

[PATCH 3/3] emacs: do not call notmuch show for non-inlinable parts

2011-11-25 Thread Dmitry Kurochkin
Before the change, there was a workaround to avoid notmuch show calls for parts with application/* Content-Type. But non-inlinable parts are not limited to this Content-Type (e.g. mp3 files have audio/mpeg Content-Type and are not inlinable). For such parts `notmuch-show-insert-part-*/*' handler

Re: [PATCH] test: fix sed error in basic tests

2011-11-25 Thread Dmitry Kurochkin
Ping. Perhaps this is trivial enought to be pushed? Regards, Dmitry ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch

[PATCH 2/2] test: cleanup basic tests

2011-11-25 Thread Dmitry Kurochkin
Basic test 'Ensure that all available tests will be run by notmuch-test' compares all tests that are run with listing of test/ directory. There is a growing list of exceptions for files and directories which located in the test/ directory but are not tests. Moreover some (probably buggy) tests do

[PATCH] emacs: Avoid unnecessary markers.

2011-11-21 Thread Dmitry Kurochkin
On Sun, 20 Nov 2011 20:07:02 -0500, Austin Clements wrote: > This is just cleanup. These markers are all immediately resolved to > points by Emacs, so using markers here is just unncessary overhead. > --- > I originally did this for performance, since Emacs has to scan all > un-GC'd markers on

[PATCH] emacs: Don't record undo information for search or show buffers.

2011-11-21 Thread Dmitry Kurochkin
On Sun, 20 Nov 2011 20:00:55 -0500, Austin Clements wrote: > There's no reason to record undo information for read-only, > programmatically-constructed buffers. The undo list just chews up > memory keeping track of our calls to insert. Makes sense and looks good! Regards, Dmitry > --- >

[PATCH] Output unmodified Content-Type header value for JSON format.

2011-11-20 Thread Dmitry Kurochkin
On Sat, 19 Nov 2011 13:58:18 -0500, Austin Clements wrote: > Quoth Dmitry Kurochkin on Nov 19 at 9:26 am: > > On Fri, 18 Nov 2011 23:59:57 -0500, Austin Clements > > wrote: > > > Quoth Dmitry Kurochkin on Nov 19 at 6:42 am: > > > > Hi Jamie. > > >

[PATCH v2] Output unmodified Content-Type header value for JSON format.

2011-11-20 Thread Dmitry Kurochkin
On Sat, 19 Nov 2011 08:59:29 -0400, David Bremner wrote: > On Sat, 19 Nov 2011 08:18:41 +0400, Dmitry Kurochkin gmail.com> wrote: > > Before the change, notmuch used g_mime_content_type_to_string(3) > > function to output Content-Type header value. Turns out it outputs >

[PATCH] Output unmodified Content-Type header value for JSON format.

2011-11-20 Thread Dmitry Kurochkin
Hi Jameson. On Sat, 19 Nov 2011 02:49:43 -0800, Jameson Graef Rollins wrote: > On Sat, 19 Nov 2011 06:42:00 +0400, Dmitry Kurochkin gmail.com> wrote: > > The parameters are there for a reason. They are part of the > > content-type and are needed to handle the body pro

Re: [PATCH] Output unmodified Content-Type header value for JSON format.

2011-11-20 Thread Dmitry Kurochkin
Hi Jameson. On Sat, 19 Nov 2011 02:49:43 -0800, Jameson Graef Rollins jroll...@finestructure.net wrote: On Sat, 19 Nov 2011 06:42:00 +0400, Dmitry Kurochkin dmitry.kuroch...@gmail.com wrote: The parameters are there for a reason. They are part of the content-type and are needed to handle

Re: [PATCH v2] Output unmodified Content-Type header value for JSON format.

2011-11-20 Thread Dmitry Kurochkin
On Sat, 19 Nov 2011 08:59:29 -0400, David Bremner da...@tethera.net wrote: On Sat, 19 Nov 2011 08:18:41 +0400, Dmitry Kurochkin dmitry.kuroch...@gmail.com wrote: Before the change, notmuch used g_mime_content_type_to_string(3) function to output Content-Type header value. Turns out

Re: [PATCH] Output unmodified Content-Type header value for JSON format.

2011-11-20 Thread Dmitry Kurochkin
On Sat, 19 Nov 2011 13:58:18 -0500, Austin Clements amdra...@mit.edu wrote: Quoth Dmitry Kurochkin on Nov 19 at 9:26 am: On Fri, 18 Nov 2011 23:59:57 -0500, Austin Clements amdra...@mit.edu wrote: Quoth Dmitry Kurochkin on Nov 19 at 6:42 am: Hi Jamie. On Fri, 18 Nov 2011 17

Re: [PATCH] emacs: Don't record undo information for search or show buffers.

2011-11-20 Thread Dmitry Kurochkin
On Sun, 20 Nov 2011 20:00:55 -0500, Austin Clements amdra...@mit.edu wrote: There's no reason to record undo information for read-only, programmatically-constructed buffers. The undo list just chews up memory keeping track of our calls to insert. Makes sense and looks good! Regards, Dmitry

Re: [PATCH] emacs: Avoid unnecessary markers.

2011-11-20 Thread Dmitry Kurochkin
On Sun, 20 Nov 2011 20:07:02 -0500, Austin Clements amdra...@mit.edu wrote: This is just cleanup. These markers are all immediately resolved to points by Emacs, so using markers here is just unncessary overhead. --- I originally did this for performance, since Emacs has to scan all un-GC'd

[PATCH] Output unmodified Content-Type header value for JSON format.

2011-11-19 Thread Dmitry Kurochkin
On Fri, 18 Nov 2011 23:59:57 -0500, Austin Clements wrote: > Quoth Dmitry Kurochkin on Nov 19 at 6:42 am: > > Hi Jamie. > > > > On Fri, 18 Nov 2011 17:58:52 -0800, Jameson Graef Rollins > finestructure.net> wrote: > > > On Sat, 19 Nov 2011 03:45:05 +0400, Dm

[PATCH v2] Output unmodified Content-Type header value for JSON format.

2011-11-19 Thread Dmitry Kurochkin
Before the change, notmuch used g_mime_content_type_to_string(3) function to output Content-Type header value. Turns out it outputs only "type/subtype" part and ignores all parameters. Also, if there is no Content-Type header, default "text/plain" value is used. JSON is supposed to be a

[PATCH] Output unmodified Content-Type header value for JSON format.

2011-11-19 Thread Dmitry Kurochkin
Hi Jamie. On Fri, 18 Nov 2011 17:58:52 -0800, Jameson Graef Rollins wrote: > On Sat, 19 Nov 2011 03:45:05 +0400, Dmitry Kurochkin gmail.com> wrote: > > Before the change, notmuch used g_mime_content_type_to_string(3) > > function to output Content-Type header value. Tu

[PATCH] emacs: fix `mm-make-handle' content-type parameter

2011-11-19 Thread Dmitry Kurochkin
Please ignore this patch. Apparently, it is not enough to fix the issue. A proper fix is available in [1]. Regards, Dmitry [1] id:"1321659905-24367-1-git-send-email-dmitry.kurochkin at gmail.com"

[PATCH] Output unmodified Content-Type header value for JSON format.

2011-11-19 Thread Dmitry Kurochkin
Before the change, notmuch used g_mime_content_type_to_string(3) function to output Content-Type header value. Turns out it outputs only "type/subtype" part and ignores all parameters. Also, if there is no Content-Type header, default "text/plain" value is used. JSON is supposed to be a

[PATCH] emacs: fix `mm-make-handle' content-type parameter

2011-11-18 Thread Dmitry Kurochkin
`notmuch-show-mm-display-part-inline' uses undocumented `mm-make-handle' function. One of the parameters for `mm-make-handle' is charset. Before the change, an unparsed content-type was given to `mm-make-handle' (this was probably copied from Gnus source which uses simple hard-coded values in a

[PATCH] test: fix sed error in basic tests

2011-11-18 Thread Dmitry Kurochkin
The error is easy to miss, because the test passes and stderr is not printed. But if you run basic tests in verbose mode (./basic --verbose), you get: sed: can't read notmuch-test: No such file or directory The issue is that sed command is given two files: notmuch-test and

Re: [PATCH 0/9] test: (hopefully) better test prerequisites

2011-11-18 Thread Dmitry Kurochkin
On Thu, 17 Nov 2011 16:02:46 +0200, Tomi Ollila tomi.oll...@iki.fi wrote: On Thu, 17 Nov 2011 17:22:41 +0400, Dmitry Kurochkin dmitry.kuroch...@gmail.com wrote: Hi Tomi. On Thu, 17 Nov 2011 14:20:19 +0200, Tomi Ollila tomi.oll...@iki.fi wrote: I.e. dynamically, at run-time, re

[PATCH] test: fix sed error in basic tests

2011-11-18 Thread Dmitry Kurochkin
The error is easy to miss, because the test passes and stderr is not printed. But if you run basic tests in verbose mode (./basic --verbose), you get: sed: can't read notmuch-test: No such file or directory The issue is that sed command is given two files: notmuch-test and

[PATCH] emacs: fix `mm-make-handle' content-type parameter

2011-11-18 Thread Dmitry Kurochkin
`notmuch-show-mm-display-part-inline' uses undocumented `mm-make-handle' function. One of the parameters for `mm-make-handle' is charset. Before the change, an unparsed content-type was given to `mm-make-handle' (this was probably copied from Gnus source which uses simple hard-coded values in a

Re: [PATCH] emacs: fix `mm-make-handle' content-type parameter

2011-11-18 Thread Dmitry Kurochkin
Please ignore this patch. Apparently, it is not enough to fix the issue. A proper fix is available in [1]. Regards, Dmitry [1] id:1321659905-24367-1-git-send-email-dmitry.kuroch...@gmail.com ___ notmuch mailing list notmuch@notmuchmail.org

Re: [PATCH] Output unmodified Content-Type header value for JSON format.

2011-11-18 Thread Dmitry Kurochkin
Hi Jamie. On Fri, 18 Nov 2011 17:58:52 -0800, Jameson Graef Rollins jroll...@finestructure.net wrote: On Sat, 19 Nov 2011 03:45:05 +0400, Dmitry Kurochkin dmitry.kuroch...@gmail.com wrote: Before the change, notmuch used g_mime_content_type_to_string(3) function to output Content-Type

Re: [PATCH] Output unmodified Content-Type header value for JSON format.

2011-11-18 Thread Dmitry Kurochkin
On Fri, 18 Nov 2011 23:59:57 -0500, Austin Clements amdra...@mit.edu wrote: Quoth Dmitry Kurochkin on Nov 19 at 6:42 am: Hi Jamie. On Fri, 18 Nov 2011 17:58:52 -0800, Jameson Graef Rollins jroll...@finestructure.net wrote: On Sat, 19 Nov 2011 03:45:05 +0400, Dmitry Kurochkin

[PATCH 0/9] test: (hopefully) better test prerequisites

2011-11-17 Thread Dmitry Kurochkin
On Thu, 17 Nov 2011 16:02:46 +0200, Tomi Ollila wrote: > On Thu, 17 Nov 2011 17:22:41 +0400, Dmitry Kurochkin gmail.com> wrote: > > Hi Tomi. > > > > On Thu, 17 Nov 2011 14:20:19 +0200, Tomi Ollila > > wrote: > > > > > > I.e. dynamic

[PATCH 0/9] test: (hopefully) better test prerequisites

2011-11-17 Thread Dmitry Kurochkin
Hi Tomi. On Thu, 17 Nov 2011 14:20:19 +0200, Tomi Ollila wrote: > On Thu, 17 Nov 2011 01:14:07 -0800, Jameson Graef Rollins finestructure.net> wrote: > > > > However, when I tried to test the tests with the patch applied I ran > > into one problem. If I try to run the test suite with dtach >

[PATCH v2 07/10] test: declare external dependencies for the tests

2011-11-17 Thread Dmitry Kurochkin
That are: dtach(1), emacs(1), emacsclient(1), gdb(1) and gpg(1). --- test/test-lib.sh |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/test/test-lib.sh b/test/test-lib.sh index 4c73437..cf1b4f0 100755 --- a/test/test-lib.sh +++ b/test/test-lib.sh @@ -1101,20 +1101,27

[PATCH v2 06/10] test: skip all subtests if external dependencies are missing during init

2011-11-17 Thread Dmitry Kurochkin
Some tests (e.g. crypto) do a common initialization required for all subtests. The patch adds a check for missing external dependencies during this initialization. If any prerequisites are missing, all subtests are skipped. The check is run on the first call of test_reset_state_ function, so no

[PATCH v2 05/10] test: fix "skipping test" verbose output

2011-11-17 Thread Dmitry Kurochkin
--- test/test-lib.sh |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/test/test-lib.sh b/test/test-lib.sh index 625d19b..ce7576a 100755 --- a/test/test-lib.sh +++ b/test/test-lib.sh @@ -635,41 +635,42 @@ test_skip () { test_report_skip_ "$@"

[PATCH v2 04/10] test: add support for external executable dependencies

2011-11-17 Thread Dmitry Kurochkin
There is existing support for general prerequisites in the test suite. But it is not very convenient to use: every test case has to keep track for it's dependencies and they have to be explicitly listed. The patch aims to add better support for a particular type of external dependencies: external

[PATCH v2 03/10] test: add test state reset to test_expect_* functions that did not have it

2011-11-17 Thread Dmitry Kurochkin
--- test/test-lib.sh |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/test/test-lib.sh b/test/test-lib.sh index ff85848..f21e45e 100755 --- a/test/test-lib.sh +++ b/test/test-lib.sh @@ -622,82 +622,85 @@ test_skip () { test_reset_state_

[PATCH v2 02/10] test: set EMACS_SERVER variable only after dtach(1) was successfully started

2011-11-17 Thread Dmitry Kurochkin
Otherwise, we can set the EMACS_SERVER and return with an error. And subsequent calls to test_emacs would assume that emacs server is running. --- test/test-lib.sh |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/test/test-lib.sh b/test/test-lib.sh index

[PATCH v2 01/10] test: move subtest variables reset into a dedicated function

2011-11-17 Thread Dmitry Kurochkin
Currently, there is only one such variable test_subtest_known_broken_. But more will be added in the future. --- test/test-lib.sh | 12 1 files changed, 8 insertions(+), 4 deletions(-) diff --git a/test/test-lib.sh b/test/test-lib.sh index 1ea7fa9..222b5e4 100755 ---

[PATCH v2 00/10] test: (hopefully) better test prerequisites

2011-11-17 Thread Dmitry Kurochkin
New version of [1] patch series. Changes: v2 since v1: * Add test_require_external_prereq function to explicitly check for external dependencies, use it in test_emacs. * Indenting fixes. * Use $binary instead of $1 in test_declare_external_prereq. Regards, Dmitry

[PATCH 0/9] test: (hopefully) better test prerequisites

2011-11-17 Thread Dmitry Kurochkin
On Thu, 17 Nov 2011 10:46:58 +0100, Thomas Jost wrote: > On Thu, 17 Nov 2011 05:56:17 +0400, Dmitry Kurochkin gmail.com> wrote: > > Hi all. > > > > The following patch series is an attempt to introduce proper > > dependencies for external binaries in a

[PATCH 0/9] test: (hopefully) better test prerequisites

2011-11-17 Thread Dmitry Kurochkin
Hi Jameson. On Thu, 17 Nov 2011 01:14:07 -0800, Jameson Graef Rollins wrote: > On Thu, 17 Nov 2011 05:56:17 +0400, Dmitry Kurochkin gmail.com> wrote: > > The following patch series is an attempt to introduce proper > > dependencies for external binaries in a less intrusi

[PATCH 8/9] test: check if emacs is available in the beginning of test_emacs

2011-11-17 Thread Dmitry Kurochkin
On Thu, 17 Nov 2011 11:43:36 +0200, Tomi Ollila wrote: > On Thu, 17 Nov 2011 05:56:25 +0400, Dmitry Kurochkin gmail.com> wrote: > > Unfortunately, this is needed to avoid the emacs waiting loop. > > --- > > > test/test-lib.sh |4 > > 1 files chan

[PATCH 2/9] test: set EMACS_SERVER variable only after dtach(1) was successfully started

2011-11-17 Thread Dmitry Kurochkin
On Thu, 17 Nov 2011 01:14:13 -0800, Jameson Graef Rollins wrote: > On Thu, 17 Nov 2011 05:56:19 +0400, Dmitry Kurochkin gmail.com> wrote: > > Otherwise, we can set the EMACS_SERVER and return with an error. And > > subsequent calls to test_emacs would assume that emacs

[PATCH 9/9] test: fix "Stashing in notmuch-search" test when emacs is not available

2011-11-17 Thread Dmitry Kurochkin
If emacs is not available, test_expect_equal would be called with only one argument. The patch fixes this by quoting the (possibly empty) $(cat OUTPUT) argument. --- test/emacs |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/test/emacs b/test/emacs index

[PATCH 8/9] test: check if emacs is available in the beginning of test_emacs

2011-11-17 Thread Dmitry Kurochkin
Unfortunately, this is needed to avoid the emacs waiting loop. --- test/test-lib.sh |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/test/test-lib.sh b/test/test-lib.sh index 840c86c..5bd5bd6 100755 --- a/test/test-lib.sh +++ b/test/test-lib.sh @@ -858,40 +858,44 @@

[PATCH 7/9] test: declare external dependencies for the tests

2011-11-17 Thread Dmitry Kurochkin
That are: dtach(1), emacs(1), emacsclient(1), gdb(1) and gpg(1). --- test/test-lib.sh |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/test/test-lib.sh b/test/test-lib.sh index c11493d..840c86c 100755 --- a/test/test-lib.sh +++ b/test/test-lib.sh @@ -1101,20 +1101,27

[PATCH 6/9] test: skip all subtests if external dependencies are missing during init

2011-11-17 Thread Dmitry Kurochkin
Some tests (e.g. crypto) do a common initialization required for all subtests. The patch adds a check for missing external dependencies during this initialization. If any prerequisites are missing, all subtests are skipped. The check is run on the first call of test_reset_state_ function, so no

[PATCH 5/9] test: fix "skipping test" verbose output

2011-11-17 Thread Dmitry Kurochkin
--- test/test-lib.sh |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/test/test-lib.sh b/test/test-lib.sh index ab8c6fd..acac8ca 100755 --- a/test/test-lib.sh +++ b/test/test-lib.sh @@ -635,41 +635,42 @@ test_skip () { test_report_skip_ "$@"

[PATCH 4/9] test: add support for external executable dependencies

2011-11-17 Thread Dmitry Kurochkin
There is existing support for general prerequisites in the test suite. But it is not very convenient to use: every test case has to keep track for it's dependencies and they have to be explicitly listed. The patch aims to add better support for a particular type of external dependencies: external

[PATCH 3/9] test: add test state reset to test_expect_* functions that did not have it

2011-11-17 Thread Dmitry Kurochkin
--- test/test-lib.sh |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/test/test-lib.sh b/test/test-lib.sh index ff85848..f21e45e 100755 --- a/test/test-lib.sh +++ b/test/test-lib.sh @@ -622,82 +622,85 @@ test_skip () { test_reset_state_

[PATCH 2/9] test: set EMACS_SERVER variable only after dtach(1) was successfully started

2011-11-17 Thread Dmitry Kurochkin
Otherwise, we can set the EMACS_SERVER and return with an error. And subsequent calls to test_emacs would assume that emacs server is running. --- test/test-lib.sh |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/test/test-lib.sh b/test/test-lib.sh index

[PATCH 0/9] test: (hopefully) better test prerequisites

2011-11-17 Thread Dmitry Kurochkin
Hi all. The following patch series is an attempt to introduce proper dependencies for external binaries in a less intrusive way than [1]. The primary aim was to avoid changing every subtest that uses external binaries. There are still failing tests if a dependency is missing (e.g. "Verify that

Re: [PATCH 8/9] test: check if emacs is available in the beginning of test_emacs

2011-11-17 Thread Dmitry Kurochkin
On Thu, 17 Nov 2011 11:43:36 +0200, Tomi Ollila tomi.oll...@iki.fi wrote: On Thu, 17 Nov 2011 05:56:25 +0400, Dmitry Kurochkin dmitry.kuroch...@gmail.com wrote: Unfortunately, this is needed to avoid the emacs waiting loop. --- test/test-lib.sh |4 1 files changed, 4

Re: [PATCH 0/9] test: (hopefully) better test prerequisites

2011-11-17 Thread Dmitry Kurochkin
Hi Jameson. On Thu, 17 Nov 2011 01:14:07 -0800, Jameson Graef Rollins jroll...@finestructure.net wrote: On Thu, 17 Nov 2011 05:56:17 +0400, Dmitry Kurochkin dmitry.kuroch...@gmail.com wrote: The following patch series is an attempt to introduce proper dependencies for external binaries

Re: [PATCH 0/9] test: (hopefully) better test prerequisites

2011-11-17 Thread Dmitry Kurochkin
On Thu, 17 Nov 2011 10:46:58 +0100, Thomas Jost schno...@schnouki.net wrote: On Thu, 17 Nov 2011 05:56:17 +0400, Dmitry Kurochkin dmitry.kuroch...@gmail.com wrote: Hi all. The following patch series is an attempt to introduce proper dependencies for external binaries in a less

[PATCH v2 00/10] test: (hopefully) better test prerequisites

2011-11-17 Thread Dmitry Kurochkin
New version of [1] patch series. Changes: v2 since v1: * Add test_require_external_prereq function to explicitly check for external dependencies, use it in test_emacs. * Indenting fixes. * Use $binary instead of $1 in test_declare_external_prereq. Regards, Dmitry

[PATCH v2 01/10] test: move subtest variables reset into a dedicated function

2011-11-17 Thread Dmitry Kurochkin
Currently, there is only one such variable test_subtest_known_broken_. But more will be added in the future. --- test/test-lib.sh | 12 1 files changed, 8 insertions(+), 4 deletions(-) diff --git a/test/test-lib.sh b/test/test-lib.sh index 1ea7fa9..222b5e4 100755 ---

[PATCH v2 02/10] test: set EMACS_SERVER variable only after dtach(1) was successfully started

2011-11-17 Thread Dmitry Kurochkin
Otherwise, we can set the EMACS_SERVER and return with an error. And subsequent calls to test_emacs would assume that emacs server is running. --- test/test-lib.sh |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/test/test-lib.sh b/test/test-lib.sh index

[PATCH v2 03/10] test: add test state reset to test_expect_* functions that did not have it

2011-11-17 Thread Dmitry Kurochkin
--- test/test-lib.sh |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/test/test-lib.sh b/test/test-lib.sh index ff85848..f21e45e 100755 --- a/test/test-lib.sh +++ b/test/test-lib.sh @@ -622,82 +622,85 @@ test_skip () { test_reset_state_

[PATCH v2 05/10] test: fix skipping test verbose output

2011-11-17 Thread Dmitry Kurochkin
--- test/test-lib.sh |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/test/test-lib.sh b/test/test-lib.sh index 625d19b..ce7576a 100755 --- a/test/test-lib.sh +++ b/test/test-lib.sh @@ -635,41 +635,42 @@ test_skip () { test_report_skip_ $@

[PATCH v2 04/10] test: add support for external executable dependencies

2011-11-17 Thread Dmitry Kurochkin
There is existing support for general prerequisites in the test suite. But it is not very convenient to use: every test case has to keep track for it's dependencies and they have to be explicitly listed. The patch aims to add better support for a particular type of external dependencies: external

[PATCH v2 07/10] test: declare external dependencies for the tests

2011-11-17 Thread Dmitry Kurochkin
That are: dtach(1), emacs(1), emacsclient(1), gdb(1) and gpg(1). --- test/test-lib.sh |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/test/test-lib.sh b/test/test-lib.sh index 4c73437..cf1b4f0 100755 --- a/test/test-lib.sh +++ b/test/test-lib.sh @@ -1101,20 +1101,27

[PATCH v2 06/10] test: skip all subtests if external dependencies are missing during init

2011-11-17 Thread Dmitry Kurochkin
Some tests (e.g. crypto) do a common initialization required for all subtests. The patch adds a check for missing external dependencies during this initialization. If any prerequisites are missing, all subtests are skipped. The check is run on the first call of test_reset_state_ function, so no

[PATCH v2 08/10] test: add function to explicitly check for external dependencies

2011-11-17 Thread Dmitry Kurochkin
Useful when binary is called indirectly (e.g. from emacs). --- test/test-lib.sh | 14 ++ 1 files changed, 14 insertions(+), 0 deletions(-) diff --git a/test/test-lib.sh b/test/test-lib.sh index cf1b4f0..5a99216 100755 --- a/test/test-lib.sh +++ b/test/test-lib.sh @@ -533,46 +533,60

[PATCH v2 09/10] test: check if emacs is available in the beginning of test_emacs

2011-11-17 Thread Dmitry Kurochkin
Unfortunately, this is needed to avoid the emacs waiting loop. --- test/test-lib.sh |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/test/test-lib.sh b/test/test-lib.sh index 5a99216..21e3162 100755 --- a/test/test-lib.sh +++ b/test/test-lib.sh @@ -872,40 +872,44 @@

[PATCH v2 10/10] test: fix Stashing in notmuch-search test when emacs is not available

2011-11-17 Thread Dmitry Kurochkin
If emacs is not available, test_expect_equal would be called with only one argument. The patch fixes this by quoting the (possibly empty) $(cat OUTPUT) argument. --- test/emacs |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/test/emacs b/test/emacs index

Re: [PATCH 8/9] test: check if emacs is available in the beginning of test_emacs

2011-11-17 Thread Dmitry Kurochkin
On Thu, 17 Nov 2011 15:13:40 +0400, Dmitry Kurochkin dmitry.kuroch...@gmail.com wrote: On Thu, 17 Nov 2011 11:43:36 +0200, Tomi Ollila tomi.oll...@iki.fi wrote: On Thu, 17 Nov 2011 05:56:25 +0400, Dmitry Kurochkin dmitry.kuroch...@gmail.com wrote: Unfortunately, this is needed to avoid

Re: [PATCH 0/9] test: (hopefully) better test prerequisites

2011-11-17 Thread Dmitry Kurochkin
Hi Tomi. On Thu, 17 Nov 2011 14:20:19 +0200, Tomi Ollila tomi.oll...@iki.fi wrote: On Thu, 17 Nov 2011 01:14:07 -0800, Jameson Graef Rollins jroll...@finestructure.net wrote: However, when I tried to test the tests with the patch applied I ran into one problem. If I try to run the test

[PATCH 2/2] NEWS entry for id-links

2011-11-16 Thread Dmitry Kurochkin
On Wed, 16 Nov 2011 18:53:13 +0100, Daniel Schoepe wrote: > This adds a NEWS entry for commit 4a4ada73b751b1916c5dc4d408a8056411566e38 > --- > NEWS |6 +- > 1 files changed, 5 insertions(+), 1 deletions(-) > > diff --git a/NEWS b/NEWS > index ff12ca6..a2fa69f 100644 > --- a/NEWS > +++

Re: [PATCH 2/2] NEWS entry for id-links

2011-11-16 Thread Dmitry Kurochkin
On Wed, 16 Nov 2011 18:53:13 +0100, Daniel Schoepe dan...@schoepe.org wrote: This adds a NEWS entry for commit 4a4ada73b751b1916c5dc4d408a8056411566e38 --- NEWS |6 +- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/NEWS b/NEWS index ff12ca6..a2fa69f 100644 ---

[PATCH 0/9] test: (hopefully) better test prerequisites

2011-11-16 Thread Dmitry Kurochkin
Hi all. The following patch series is an attempt to introduce proper dependencies for external binaries in a less intrusive way than [1]. The primary aim was to avoid changing every subtest that uses external binaries. There are still failing tests if a dependency is missing (e.g. Verify that

[PATCH 1/9] test: move subtest variables reset into a dedicated function

2011-11-16 Thread Dmitry Kurochkin
Currently, there is only one such variable test_subtest_known_broken_. But more will be added in the future. --- test/test-lib.sh | 12 1 files changed, 8 insertions(+), 4 deletions(-) diff --git a/test/test-lib.sh b/test/test-lib.sh index 1ea7fa9..222b5e4 100755 ---

[PATCH 2/9] test: set EMACS_SERVER variable only after dtach(1) was successfully started

2011-11-16 Thread Dmitry Kurochkin
Otherwise, we can set the EMACS_SERVER and return with an error. And subsequent calls to test_emacs would assume that emacs server is running. --- test/test-lib.sh |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/test/test-lib.sh b/test/test-lib.sh index

[PATCH 3/9] test: add test state reset to test_expect_* functions that did not have it

2011-11-16 Thread Dmitry Kurochkin
--- test/test-lib.sh |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/test/test-lib.sh b/test/test-lib.sh index ff85848..f21e45e 100755 --- a/test/test-lib.sh +++ b/test/test-lib.sh @@ -622,82 +622,85 @@ test_skip () { test_reset_state_

<    3   4   5   6   7   8   9   10   11   >