t/hook-apt.t: Special case for Perl 5.10
File::Copy in Perl 5.10 does not copy permissions, so let's fix it there and check for it elsewhere. This reverts the two commits06b3faa1bfand68c20b4e4ewhich did not help to fix this issue as the initially suspected noexec mount wasn't really there. Hopefully this finally resolves the test failures with Perl 5.10 in the new t/hook-apt.t.
This commit is contained in:
@@ -21,9 +21,6 @@ matrix:
|
||||
- perl: blead
|
||||
|
||||
before_install:
|
||||
- mount
|
||||
- ls -ld /tmp/
|
||||
- printf '#!/bin/sh\necho Scripts in /tmp work.\n' > /tmp/test-executable-in-tmp && chmod -c 755 /tmp/test-executable-in-tmp && /tmp/test-executable-in-tmp
|
||||
- sudo apt-get update
|
||||
- sudo apt-get install devscripts dpkg-dev lsb-release
|
||||
- eval $(curl https://travis-perl.github.io/init)
|
||||
|
||||
@@ -55,7 +55,13 @@ sub testHook
|
||||
File::Copy::cp( $hook, $tmphook );
|
||||
|
||||
ok( -e "$tmphook", "hook exists in temporary directory [$dist]" );
|
||||
ok( -x "$tmphook", "hook is executable in temporary directory [$dist]" );
|
||||
# File::Copy in Perl 5.10 does not copy permissions, so let's fix
|
||||
# it there and check for it elsewhere.
|
||||
if ($] < 5.011) {
|
||||
chmod(0755, $tmphook);
|
||||
} else {
|
||||
ok( -x "$tmphook", "hook is executable in temporary directory [$dist]" );
|
||||
}
|
||||
|
||||
no warnings qw(qw);
|
||||
is(system(qw(sed -e s/chroot/#chroot/ -i), $tmphook) >> 8, 0,
|
||||
|
||||
Reference in New Issue
Block a user