diff options
| author | Egor Tensin <egor@tensin.name> | 2026-09-28 14:29:49 +0500 |
|---|---|---|
| committer | Egor Tensin <egor@tensin.name> | 2026-09-28 14:29:49 +0500 |
| commit | 67d0301cbdd216e5b4b55fdd20bacbab9cbc85b5 (patch) | |
| tree | 9466e500dc845d0da47713a8dce3aadd28145676 /test | |
| parent | Makefile: do nothing on all: (diff) | |
| download | config-links-2.1.8.tar.gz config-links-2.1.8.zip | |
tst-linux-home.sh: don't run inside pbuilderv2.1.8
Diffstat (limited to 'test')
| -rw-r--r-- | test/tst-linux-home.sh | 17 |
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" |
