From c07b140808440aa603b5664b603b78a04f63328a Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Mon, 25 Feb 2019 15:14:11 +0300 Subject: Disable tests failing for root user on POSIX systems --- tests/pkg-configure.testscript | 8 +++++++- tests/pkg-purge.testscript | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/tests/pkg-configure.testscript b/tests/pkg-configure.testscript index ab712c0..00963dc 100644 --- a/tests/pkg-configure.testscript +++ b/tests/pkg-configure.testscript @@ -76,6 +76,12 @@ pkg_unpack += -d cfg 2>! rep_add += -d cfg 2>! rep_fetch += -d cfg --auth all 2>! +posix = ($cxx.target.class != 'windows') + ++if $posix + id -u | set uid +end + : no-name : $clone_cfg; @@ -198,7 +204,7 @@ $* libhello libhello 2>>EOE != 0 : broken : -if ($cxx.target.class != 'windows') +if ($posix && "$uid" != '0') { : disfigure-failed : 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/; -- cgit v1.1