]> git.notmuchmail.org Git - notmuch/commitdiff
test: fix sed error in basic tests
authorDmitry Kurochkin <dmitry.kurochkin@gmail.com>
Fri, 18 Nov 2011 15:21:00 +0000 (19:21 +0400)
committerDavid Bremner <bremner@debian.org>
Sat, 26 Nov 2011 17:17:14 +0000 (09:17 -0800)
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
$TEST_DIRECTORY/notmuch-test.  And there is no notmuch-test file in
the current directory (test/tmp.basic/).  The patch just removes the
non-existing file from the sed command.

test/basic

index 38db2baf74d97f0c27878a03fe5ecf207bcb1052..032c9f763cab077ca9c323501aa399b155a7aba5 100755 (executable)
@@ -51,7 +51,7 @@ test_expect_code 2 'failure to clean up causes the test to fail' '
 
 # Ensure that all tests are being run
 test_begin_subtest 'Ensure that all available tests will be run by notmuch-test'
-eval $(sed -n -e '/^TESTS="$/,/^"$/p' notmuch-test $TEST_DIRECTORY/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" \