1
0
mirror of synced 2026-01-11 23:42:56 +00:00

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 commits 06b3faa1bf8af440f865322de91a03ecadd04e06
and 68c20b4e4e351846c80af98db75eee3030f25fa6 which 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:
Axel Beckert 2020-12-20 22:40:57 +01:00
parent 68c20b4e4e
commit ea95b1ef03
2 changed files with 7 additions and 4 deletions

View File

@ -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)

View File

@ -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,