test-lib: fix interrupt handling with 'dash' and '--verbose-log -x'
[gitweb.git] / t / t9300-fast-import.sh
index f8f869e26a4caf7ec10f6f7f0c447b0cd179d9e6..59a13b6a779b437fa377b30b2e0856f285f806b6 100755 (executable)
@@ -1558,7 +1558,7 @@ test_expect_success 'O: blank lines not necessary after other commands' '
        INPUT_END
 
        git fast-import <input &&
-       test 8 = $(find .git/objects/pack -type f | wc -l) &&
+       test 8 = $(find .git/objects/pack -type f | grep -v multi-pack-index | wc -l) &&
        test $(git rev-parse refs/tags/O3-2nd) = $(git rev-parse O3^) &&
        git log --reverse --pretty=oneline O3 | sed s/^.*z// >actual &&
        test_cmp expect actual
@@ -3144,7 +3144,10 @@ background_import_then_checkpoint () {
        echo $! >V.pid
        # We don't mind if fast-import has already died by the time the test
        # ends.
-       test_when_finished "exec 8>&-; exec 9>&-; kill $(cat V.pid) || true"
+       test_when_finished "
+               exec 8>&-; exec 9>&-;
+               kill $(cat V.pid) && wait $(cat V.pid)
+               true"
 
        # Start in the background to ensure we adhere strictly to (blocking)
        # pipes writing sequence. We want to assume that the write below could