diff options
author | Carl Worth <cworth@cworth.org> | 2010-09-20 13:42:59 -0700 |
---|---|---|
committer | Carl Worth <cworth@cworth.org> | 2010-09-20 13:44:32 -0700 |
commit | 60c599036e528bc8a856c3312f0222cc7b1fd32a (patch) | |
tree | 53013d16b4a1d219ba59ecb351ce8e0682ca3322 /test/test-lib.sh | |
parent | 265de5006f08a90371cc9caec0c0e6f702f42204 (diff) |
test: Fix test suite so that --valgrind option works.
The output is ugly, and we need a better suppressions file, but this
is at least a start.
Diffstat (limited to 'test/test-lib.sh')
-rw-r--r-- | test/test-lib.sh | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/test/test-lib.sh b/test/test-lib.sh index 1523870..42dfde1 100644 --- a/test/test-lib.sh +++ b/test/test-lib.sh @@ -740,7 +740,6 @@ find_notmuch_path () # Test the binaries we have just built. The tests are kept in # test/ subdirectory and are run in 'trash directory' subdirectory. TEST_DIRECTORY=$(pwd) -# FIXME: Only the normal case bellow is updated to notmuch if test -n "$valgrind" then make_symlink () { @@ -786,15 +785,12 @@ then # override all git executables in TEST_DIRECTORY/.. GIT_VALGRIND=$TEST_DIRECTORY/valgrind mkdir -p "$GIT_VALGRIND"/bin - for file in $TEST_DIRECTORY/../git* $TEST_DIRECTORY/../test-* - do - make_valgrind_symlink $file - done + make_valgrind_symlink $TEST_DIRECTORY/../notmuch OLDIFS=$IFS IFS=: for path in $PATH do - ls "$path"/git-* 2> /dev/null | + ls "$path"/notmuch 2> /dev/null | while read file do make_valgrind_symlink "$file" @@ -804,11 +800,6 @@ then PATH=$GIT_VALGRIND/bin:$PATH GIT_EXEC_PATH=$GIT_VALGRIND/bin export GIT_VALGRIND -elif test -n "$GIT_TEST_INSTALLED" ; then - GIT_EXEC_PATH=$($GIT_TEST_INSTALLED/git --exec-path) || - error "Cannot run git from $GIT_TEST_INSTALLED." - PATH=$GIT_TEST_INSTALLED:$TEST_DIRECTORY/..:$PATH - GIT_EXEC_PATH=${GIT_TEST_EXEC_PATH:-$GIT_EXEC_PATH} else # normal case notmuch_path=`find_notmuch_path "$TEST_DIRECTORY"` test -n "$notmuch_path" && PATH="$notmuch_path:$PATH" |