Skip to content

Commit bb26421

Browse files
committed
Merge r1921307, r1921308, r1921309 from trunk:
CI: Flush the CPAN cache if /usr/bin/perl has been updated since the cache was built. Possible fix for 2.4.x failure seen here: https://github.com/apache/httpd/actions/runs/11322484507/job/31483266212 SSLeay.c: loadable library and perl binaries are mismatched (got first handshake key 0xeb00080, needed 0xf380080) perldiag(1) describes this as a mismatch between libraries and binaries, likely solved by reinstalling XS modules: https://github.com/Perl/perl5/blob/77b78882c76e7461ccc4dcf2eb3afb9644836a72/pod/perldiag.pod#L3617 CI: Second attempt to fix stale XS cache issue. Cache the "perl -V" output and flush the cache if it changes. CI: Fix borked test for perl -V in r1921308. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1924964 13f79535-47bb-0310-9956-ffa450edef68
1 parent 693bb1c commit bb26421

File tree

1 file changed

+18
-3
lines changed

1 file changed

+18
-3
lines changed

test/travis_before_linux.sh

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,21 @@ echo "add-auto-load-safe-path $HOME/work/httpd/httpd/.gdbinit" >> $HOME/.gdbinit
7373
if ! test -v SKIP_TESTING -o -v NO_TEST_FRAMEWORK; then
7474
# Clear CPAN cache if necessary
7575
if [ -v CLEAR_CACHE ]; then rm -rf ~/perl5; fi
76+
77+
if ! perl -V > perlver; then
78+
: Perl binary broken
79+
perl -V
80+
exit 1
81+
fi
82+
83+
# Compare the current "perl -V" output with the output at the time
84+
# the cache was built; flush the cache if it's changed to avoid
85+
# failure later when /usr/bin/perl refuses to load a mismatched XS
86+
# module.
87+
if ! cmp -s perlver ~/perl5/.perlver; then
88+
: Purging cache since "perl -V" output has changed
89+
rm -rf ~/perl5
90+
fi
7691

7792
cpanm --local-lib=~/perl5 local::lib && eval $(perl -I ~/perl5/lib/perl5/ -Mlocal::lib)
7893

@@ -85,11 +100,11 @@ if ! test -v SKIP_TESTING -o -v NO_TEST_FRAMEWORK; then
85100
# CC=gcc, e.g. for the CC="gcc -m32" case the builds are not correct
86101
# otherwise.
87102
CC=gcc cpanm --notest $pkgs
88-
89-
# Set cache key.
90-
echo $pkgs > ~/perl5/.key
91103
unset pkgs
92104

105+
# Cache the perl -V output for future verification.
106+
mv perlver ~/perl5/.perlver
107+
93108
# Make a shallow clone of httpd-tests git repo.
94109
git clone -q --depth=1 https://github.com/apache/httpd-tests.git test/perl-framework
95110
fi

0 commit comments

Comments
 (0)