aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/test/tst-linux-home.sh
diff options
context:
space:
mode:
authorEgor Tensin <egor@tensin.name>2026-09-28 14:31:36 +0500
committerEgor Tensin <egor@tensin.name>2026-09-28 14:31:36 +0500
commitc1d9193a7e7a3397f1a9451212fc777c6f2d47e1 (patch)
tree0dfaebacbd5aa071eb9776990cc5d7ca03438950 /test/tst-linux-home.sh
parentdebian: v2.1.7-1 (diff)
parenttst-linux-home.sh: don't run inside pbuilder (diff)
downloadconfig-links-c1d9193a7e7a3397f1a9451212fc777c6f2d47e1.tar.gz
config-links-c1d9193a7e7a3397f1a9451212fc777c6f2d47e1.zip
Merge tag 'v2.1.8' into debian
v2.1.8
Diffstat (limited to 'test/tst-linux-home.sh')
-rw-r--r--test/tst-linux-home.sh17
1 files changed, 13 insertions, 4 deletions
diff --git a/test/tst-linux-home.sh b/test/tst-linux-home.sh
index 4d099ee..83c70f4 100644
--- a/test/tst-linux-home.sh
+++ b/test/tst-linux-home.sh
@@ -1,10 +1,19 @@
-[ -z "${CI+y}" ] && test_should_fail=y
-
-test_run() {
+_test_should_fail() {
if [ -z "${CI+y}" ]; then
fail "Don't run this test locally, it'll mess up your \$HOME"
- return 1
+ return 0
fi
+ if ! command -v git &> /dev/null; then
+ fail "git isn't available, assuming running inside a pbuilder"
+ return 0
+ fi
+ return 1
+}
+
+_test_should_fail 2> /dev/null && test_should_fail=y
+
+test_run() {
+ _test_should_fail && return 1
readonly src_name=linux-home
src_url="https://github.com/egor-tensin/$src_name.git"