]> git.neil.brown.name Git - git.git/commitdiff
t6026-merge-attr: don't fail if sleep exits early
authorAndreas Schwab <schwab@suse.de>
Tue, 8 Nov 2016 17:03:04 +0000 (18:03 +0100)
committerJeff King <peff@peff.net>
Tue, 8 Nov 2016 20:29:24 +0000 (15:29 -0500)
Commit 5babb5bdb3 ("t6026-merge-attr: clean up background process at end
of test case") added a kill command to clean up after the test, but this
can fail if the sleep command exits before the cleanup is executed.
Ignore the error from the kill command.

Signed-off-by: Andreas Schwab <schwab@suse.de>
Signed-off-by: Jeff King <peff@peff.net>
t/t6026-merge-attr.sh

index 7a6e33e6732eaf69e298b56729ba4ead9ffaee0e..2672b15aa3d0df9ad45027bbc91c1c66b4b5c199 100755 (executable)
@@ -187,7 +187,7 @@ test_expect_success 'custom merge does not lock index' '
                sleep 1 &
                echo $! >sleep.pid
        EOF
-       test_when_finished "kill \$(cat sleep.pid)" &&
+       test_when_finished "kill \$(cat sleep.pid) || :" &&
 
        test_write_lines >.gitattributes \
                "* merge=ours" "text merge=sleep-one-second" &&