We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent dec4471 commit 3a667a1Copy full SHA for 3a667a1
2 files changed
tests/shell/007_install.sh
@@ -1,10 +1,5 @@
1
-if [ x"$UNSAFE_TESTS" = x1 ]
2
-then
3
- echo "Unsafe tests are enabled - running install test"
4
-else
5
- echo "Warning: Unsafe tests are disabled - skipping install test"
6
- exit 0
7
-fi
+source "$(dirname "$0")/common.sh"
+skip-unless-unsafe
8
9
set -e
10
set -x
tests/shell/common.sh
@@ -11,3 +11,12 @@ git-no-diffs () {
11
# Error if there are uncommited changes (to tracked files):
12
git diff --exit-code
13
}
14
+
15
+skip-unless-unsafe() {
16
+ if [ "${UNSAFE_TESTS:-}" != 1 ]; then
17
+ local name
18
+ name=$(_test_name_from_path "${BASH_SOURCE[1]:-$0}")
19
+ echo "--- SKIP: $name (unsafe tests disabled) ---"
20
+ exit 0
21
+ fi
22
+}
0 commit comments