From ac386434fffe7fd9efcde796856ae676f0c91227 Mon Sep 17 00:00:00 2001 From: Andreas Guldstrand Date: Mon, 2 May 2016 02:36:48 +0200 Subject: 12-readme.t: skip commandinreadme tests if test user or group exists --- t/12-readme.t | 1 + 1 file changed, 1 insertion(+) diff --git a/t/12-readme.t b/t/12-readme.t index 15236c1..acf5b65 100755 --- a/t/12-readme.t +++ b/t/12-readme.t @@ -52,6 +52,7 @@ sboremove 'envsettingtest2', { input => "y\ny\ny", test => 0 }; # 6-7: sboinstall commandinreadme SKIP: { skip "Only run useradd/groupadd commands under Travis CI", 2 unless (defined $ENV{TRAVIS} and $ENV{TRAVIS} eq 'true'); + skip "Only run useradd/groupadd commands if there is no test user/group", 2, if (defined getgrnam('test') or defined getpwnam('test')); sboinstall 'commandinreadme', { input => "y\ny\ny", expected => qr{It looks like this slackbuild requires the following command\(s\) to be run first:.*groupadd -g 200 test.*useradd -u 200 -g 200 -d /tmp test.*Shall I run them prior to building.*}s }; sboremove 'commandinreadme', { input => "y\ny", test => 0 }; -- cgit v1.2.3