diff options
author | Thierry Vignaud <tv@mageia.org> | 2012-06-08 18:50:40 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mageia.org> | 2012-06-08 18:50:40 +0000 |
commit | f406c1c4b8e3d3df97510b2a85d062ebe4e4e1bc (patch) | |
tree | 92fbefa040fa34dc8e656872a594b8d9ed85b03c /t | |
parent | 09e5da343af0cf8c188223e4472020cdc2dc74c5 (diff) | |
download | urpmi-f406c1c4b8e3d3df97510b2a85d062ebe4e4e1bc.tar urpmi-f406c1c4b8e3d3df97510b2a85d062ebe4e4e1bc.tar.gz urpmi-f406c1c4b8e3d3df97510b2a85d062ebe4e4e1bc.tar.bz2 urpmi-f406c1c4b8e3d3df97510b2a85d062ebe4e4e1bc.tar.xz urpmi-f406c1c4b8e3d3df97510b2a85d062ebe4e4e1bc.zip |
(test_exotic_medium_name) skip test when building as root in /root
else File::Path::mkpath() in urpm::create_var_lib_rpm() tries to
create directories in /root/rpmbuild/urpmi*/t/root (but as nobody),
thus it stat every directory in $PWD, which fails (due to permissions!)
then try to create them which fails (due to directory already existing)
another solution would be to use a mkstemp()ed directory in TMPDIR...
Diffstat (limited to 't')
-rw-r--r-- | t/superuser--http.t | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/t/superuser--http.t b/t/superuser--http.t index cd934242..15f0694a 100644 --- a/t/superuser--http.t +++ b/t/superuser--http.t @@ -4,6 +4,7 @@ use strict; use lib '.', 't'; use helper; use Test::More 'no_plan'; +use Cwd 'getcwd'; need_root_and_prepare(); @@ -25,6 +26,10 @@ sub test { } sub test_exotic_medium_name { + if (getcwd() =~ m!^/root/!) { + warn "SKIPing test_exotic_medium_name() due to nobody having no access to /root/rpm*\n"; + return; + } my $medium_name = 'the medium (+name+)'; urpmi_addmedia("'$medium_name' $url/media/various"); |