aboutsummaryrefslogtreecommitdiff
path: root/tests/pkg-purge.testscript
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2019-02-25 15:14:11 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2019-02-25 15:14:11 +0300
commitc07b140808440aa603b5664b603b78a04f63328a (patch)
tree650af09090e609d1a1e7e9130f8b1d672563bffb /tests/pkg-purge.testscript
parent6735e1502f0bd0282f8a7c9444247396c79214a5 (diff)
Disable tests failing for root user on POSIX systems
Diffstat (limited to 'tests/pkg-purge.testscript')
-rw-r--r--tests/pkg-purge.testscript8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/pkg-purge.testscript b/tests/pkg-purge.testscript
index 961ae19..7b8f5c0 100644
--- a/tests/pkg-purge.testscript
+++ b/tests/pkg-purge.testscript
@@ -18,6 +18,12 @@ pkg_fetch += -d cfg 2>!
pkg_unpack += -d cfg 2>!
pkg_status += -d cfg
+posix = ($cxx.target.class != 'windows')
+
++if $posix
+ id -u | set uid
+end
+
: no-name
:
$clone_cfg;
@@ -138,7 +144,7 @@ $* libfoo 2>>/EOE != 0
: broken
:
-if ($cxx.target.class != 'windows')
+if ($posix && "$uid" != '0')
{
$clone_cfg;
cp --no-cleanup $src/libfoo-1.0.0.tar.gz cfg/;