mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-28 13:44:12 +01:00
test: cleanup basic tests
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.
This commit is contained in:
parent
fea2c106ac
commit
cb9af12a4f
1 changed files with 3 additions and 9 deletions
12
test/basic
12
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'
|
test_begin_subtest 'Ensure that all available tests will be run by notmuch-test'
|
||||||
eval $(sed -n -e '/^TESTS="$/,/^"$/p' $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)
|
tests_in_suite=$(for i in $TESTS; do echo $i; done | sort)
|
||||||
available=$(ls -1 $TEST_DIRECTORY/ | \
|
available=$(find "$TEST_DIRECTORY" -maxdepth 1 -type f -executable -printf '%f\n' | \
|
||||||
sed -r -e "/^(aggregate-results.sh|Makefile|Makefile.local|notmuch-test)/d" \
|
sed -r -e "/^(aggregate-results.sh|notmuch-test|smtp-dummy|test-verbose)$/d" | \
|
||||||
-e "/^(README|test-lib.sh|test-lib.el|test-results|tmp.*|valgrind|corpus*)/d" \
|
sort)
|
||||||
-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)
|
|
||||||
test_expect_equal "$tests_in_suite" "$available"
|
test_expect_equal "$tests_in_suite" "$available"
|
||||||
|
|
||||||
EXPECTED=$TEST_DIRECTORY/test.expected-output
|
EXPECTED=$TEST_DIRECTORY/test.expected-output
|
||||||
|
|
Loading…
Reference in a new issue