unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH 1/2] test: remove executable permissions from test-lib.sh
@ 2011-11-26  6:12 Dmitry Kurochkin
  2011-11-26  6:12 ` [PATCH 2/2] test: cleanup basic tests Dmitry Kurochkin
  0 siblings, 1 reply; 3+ messages in thread
From: Dmitry Kurochkin @ 2011-11-26  6:12 UTC (permalink / raw)
  To: notmuch

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 2/2] test: cleanup basic tests
  2011-11-26  6:12 [PATCH 1/2] test: remove executable permissions from test-lib.sh Dmitry Kurochkin
@ 2011-11-26  6:12 ` Dmitry Kurochkin
  2011-11-26 19:11   ` David Bremner
  0 siblings, 1 reply; 3+ messages in thread
From: Dmitry Kurochkin @ 2011-11-26  6:12 UTC (permalink / raw)
  To: notmuch

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 create files in the the test/
directory which may be left behind in case of failure.  This makes the
basic test fail.

The patch changes the test to look only for regular executable files.
This makes the exception list much smaller.  And since no tests should
create executables in the test/ directory (if there are, they should
be fixed), the basic test should not be affected by failed or
interrupted tests.
---
 test/basic |   12 +++---------
 1 files changed, 3 insertions(+), 9 deletions(-)

diff --git a/test/basic b/test/basic
index 032c9f7..f258d1f 100755
--- a/test/basic
+++ b/test/basic
@@ -53,15 +53,9 @@ test_expect_code 2 'failure to clean up causes the test to fail' '
 test_begin_subtest 'Ensure that all available tests will be run by notmuch-test'
 eval $(sed -n -e '/^TESTS="$/,/^"$/p' $TEST_DIRECTORY/notmuch-test)
 tests_in_suite=$(for i in $TESTS; do echo $i; done | sort)
-available=$(ls -1 $TEST_DIRECTORY/ | \
-    sed -r -e "/^(aggregate-results.sh|Makefile|Makefile.local|notmuch-test)/d" \
-	   -e "/^(README|test-lib.sh|test-lib.el|test-results|tmp.*|valgrind|corpus*)/d" \
-	   -e "/^(emacs.expected-output|smtp-dummy|smtp-dummy.c|test-verbose|symbol-test.cc)/d" \
-	   -e "/^(test.expected-output|.*~)/d" \
-	   -e "/^(gnupg-secret-key.asc)/d" \
-	   -e "/^(gnupg-secret-key.NOTE)/d" \
-	   -e "/^(atomicity.gdb)/d" \
-	   | sort)
+available=$(find "$TEST_DIRECTORY" -maxdepth 1 -type f -executable -printf '%f\n' | \
+    sed -r -e "/^(aggregate-results.sh|notmuch-test|smtp-dummy|test-verbose)$/d" | \
+    sort)
 test_expect_equal "$tests_in_suite" "$available"
 
 EXPECTED=$TEST_DIRECTORY/test.expected-output
-- 
1.7.7.3

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 2/2] test: cleanup basic tests
  2011-11-26  6:12 ` [PATCH 2/2] test: cleanup basic tests Dmitry Kurochkin
@ 2011-11-26 19:11   ` David Bremner
  0 siblings, 0 replies; 3+ messages in thread
From: David Bremner @ 2011-11-26 19:11 UTC (permalink / raw)
  To: Dmitry Kurochkin, notmuch

On Sat, 26 Nov 2011 10:12:26 +0400, Dmitry Kurochkin <dmitry.kurochkin@gmail.com> wrote:
> Basic test 'Ensure that all available tests will be run by
> notmuch-test' compares all tests that are run with listing of test/

Pushed these two to master.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-11-26 19:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-26  6:12 [PATCH 1/2] test: remove executable permissions from test-lib.sh Dmitry Kurochkin
2011-11-26  6:12 ` [PATCH 2/2] test: cleanup basic tests Dmitry Kurochkin
2011-11-26 19:11   ` David Bremner

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).