From 69efc06fe04bad5a92f4758b09dd78f89ea92415 Mon Sep 17 00:00:00 2001 From: Rob Browning Date: Sun, 9 Nov 2014 21:50:02 -0600 Subject: [PATCH] Test for load failures in t/test-*.sh i.e. . foo || exit $? Signed-off-by: Rob Browning Tested-by: Rob Browning --- t/test-cat-file.sh | 2 +- t/test-command-without-init-fails.sh | 2 +- t/test-compression.sh | 4 ++-- t/test-drecurse.sh | 4 ++-- t/test-fsck.sh | 2 +- t/test-fuse.sh | 2 +- t/test-import-rdiff-backup.sh | 2 +- t/test-index-check-device.sh | 4 ++-- t/test-index-clear.sh | 2 +- t/test-ls.sh | 2 +- t/test-meta.sh | 4 ++-- t/test-on.sh | 4 ++-- t/test-redundant-saves.sh | 2 +- t/test-restore-map-owner.sh | 2 +- t/test-restore-single-file.sh | 2 +- t/test-rm-between-index-and-save.sh | 2 +- t/test-save-creates-no-unrefs.sh | 2 +- t/test-save-restore-excludes.sh | 4 ++-- t/test-save-strip-graft.sh | 4 ++-- t/test-sparse-files.sh | 2 +- t/test-xdev.sh | 2 +- 21 files changed, 28 insertions(+), 28 deletions(-) diff --git a/t/test-cat-file.sh b/t/test-cat-file.sh index a60c7c7..ec8610c 100755 --- a/t/test-cat-file.sh +++ b/t/test-cat-file.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -. ./wvtest-bup.sh +. ./wvtest-bup.sh || exit $? set -o pipefail diff --git a/t/test-command-without-init-fails.sh b/t/test-command-without-init-fails.sh index 2294bdf..32efe2c 100755 --- a/t/test-command-without-init-fails.sh +++ b/t/test-command-without-init-fails.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -. ./wvtest-bup.sh +. ./wvtest-bup.sh || exit $? set -o pipefail diff --git a/t/test-compression.sh b/t/test-compression.sh index 3fd4ea1..b887f06 100755 --- a/t/test-compression.sh +++ b/t/test-compression.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -. ./wvtest-bup.sh -. t/lib.sh +. ./wvtest-bup.sh || exit $? +. t/lib.sh || exit $? set -o pipefail diff --git a/t/test-drecurse.sh b/t/test-drecurse.sh index bb94837..f3e2542 100755 --- a/t/test-drecurse.sh +++ b/t/test-drecurse.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -. ./wvtest-bup.sh -. t/lib.sh +. ./wvtest-bup.sh || exit $? +. t/lib.sh || exit $? set -o pipefail diff --git a/t/test-fsck.sh b/t/test-fsck.sh index 48751cd..d902331 100755 --- a/t/test-fsck.sh +++ b/t/test-fsck.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -. ./wvtest-bup.sh +. ./wvtest-bup.sh || exit $? set -o pipefail diff --git a/t/test-fuse.sh b/t/test-fuse.sh index f258889..cd30437 100755 --- a/t/test-fuse.sh +++ b/t/test-fuse.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -. ./wvtest-bup.sh +. ./wvtest-bup.sh || exit $? set -o pipefail diff --git a/t/test-import-rdiff-backup.sh b/t/test-import-rdiff-backup.sh index daa5a58..56c7b1e 100755 --- a/t/test-import-rdiff-backup.sh +++ b/t/test-import-rdiff-backup.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -. ./wvtest-bup.sh +. ./wvtest-bup.sh || exit $? set -o pipefail diff --git a/t/test-index-check-device.sh b/t/test-index-check-device.sh index 23dbb77..a45f8c7 100755 --- a/t/test-index-check-device.sh +++ b/t/test-index-check-device.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -. ./wvtest-bup.sh -. ./t/lib.sh +. ./wvtest-bup.sh || exit $? +. ./t/lib.sh || exit $? set -o pipefail diff --git a/t/test-index-clear.sh b/t/test-index-clear.sh index 46bc201..05cd848 100755 --- a/t/test-index-clear.sh +++ b/t/test-index-clear.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -. ./wvtest-bup.sh +. ./wvtest-bup.sh || exit $? set -o pipefail diff --git a/t/test-ls.sh b/t/test-ls.sh index f1eed83..77c5d09 100755 --- a/t/test-ls.sh +++ b/t/test-ls.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -. ./wvtest-bup.sh +. ./wvtest-bup.sh || exit $? set -o pipefail diff --git a/t/test-meta.sh b/t/test-meta.sh index b7e2653..7241041 100755 --- a/t/test-meta.sh +++ b/t/test-meta.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -. wvtest.sh -. t/lib.sh +. wvtest.sh || exit $? +. t/lib.sh || exit $? set -o pipefail diff --git a/t/test-on.sh b/t/test-on.sh index 9064676..6266888 100755 --- a/t/test-on.sh +++ b/t/test-on.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -. ./wvtest-bup.sh -. ./lib.sh +. ./wvtest-bup.sh || exit $? || exit $? +. ./t/lib.sh || exit $? || exit $? set -o pipefail diff --git a/t/test-redundant-saves.sh b/t/test-redundant-saves.sh index d8cceac..bdb56ae 100755 --- a/t/test-redundant-saves.sh +++ b/t/test-redundant-saves.sh @@ -9,7 +9,7 @@ # may change between runs. So instead we extract the roots of the # indexed trees for comparison via t/subtree-hash. -. ./wvtest-bup.sh +. ./wvtest-bup.sh || exit $? set -o pipefail diff --git a/t/test-restore-map-owner.sh b/t/test-restore-map-owner.sh index 090aef1..e5eeee3 100755 --- a/t/test-restore-map-owner.sh +++ b/t/test-restore-map-owner.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -. ./wvtest-bup.sh +. ./wvtest-bup.sh || exit $? if [ $(t/root-status) != root ]; then echo 'Not root: skipping restore --map-* tests.' diff --git a/t/test-restore-single-file.sh b/t/test-restore-single-file.sh index c67701b..f211ebc 100755 --- a/t/test-restore-single-file.sh +++ b/t/test-restore-single-file.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -. ./wvtest-bup.sh +. ./wvtest-bup.sh || exit $? set -o pipefail diff --git a/t/test-rm-between-index-and-save.sh b/t/test-rm-between-index-and-save.sh index ee0cd0a..e93dd72 100755 --- a/t/test-rm-between-index-and-save.sh +++ b/t/test-rm-between-index-and-save.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -. ./wvtest-bup.sh +. ./wvtest-bup.sh || exit $? set -o pipefail diff --git a/t/test-save-creates-no-unrefs.sh b/t/test-save-creates-no-unrefs.sh index 559f0ce..38d9064 100755 --- a/t/test-save-creates-no-unrefs.sh +++ b/t/test-save-creates-no-unrefs.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -. ./wvtest-bup.sh +. ./wvtest-bup.sh || exit $? WVSTART 'all' diff --git a/t/test-save-restore-excludes.sh b/t/test-save-restore-excludes.sh index 0b073c5..0896877 100755 --- a/t/test-save-restore-excludes.sh +++ b/t/test-save-restore-excludes.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -. ./wvtest-bup.sh -. t/lib.sh +. ./wvtest-bup.sh || exit $? +. t/lib.sh || exit $? set -o pipefail diff --git a/t/test-save-strip-graft.sh b/t/test-save-strip-graft.sh index 4f0e35d..bc5306c 100755 --- a/t/test-save-strip-graft.sh +++ b/t/test-save-strip-graft.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -. ./wvtest-bup.sh -. t/lib.sh +. ./wvtest-bup.sh || exit $? +. t/lib.sh || exit $? set -o pipefail diff --git a/t/test-sparse-files.sh b/t/test-sparse-files.sh index 884c6b9..97aef02 100755 --- a/t/test-sparse-files.sh +++ b/t/test-sparse-files.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -. ./wvtest-bup.sh +. ./wvtest-bup.sh || exit $? set -o pipefail diff --git a/t/test-xdev.sh b/t/test-xdev.sh index 18530f6..747fd0b 100755 --- a/t/test-xdev.sh +++ b/t/test-xdev.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -. ./wvtest-bup.sh +. ./wvtest-bup.sh || exit $? set -o pipefail -- 2.39.5