mirror of
https://github.com/apache/httpd.git
synced 2025-08-01 16:41:19 +00:00
CI: Second attempt to fix stale XS cache issue.
Cache the "perl -V" output and flush the cache if it changes. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1921308 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@ -67,10 +67,18 @@ if ! test -v SKIP_TESTING -o -v NO_TEST_FRAMEWORK; then
|
|||||||
# Clear CPAN cache if necessary
|
# Clear CPAN cache if necessary
|
||||||
if [ -v CLEAR_CACHE ]; then rm -rf ~/perl5; fi
|
if [ -v CLEAR_CACHE ]; then rm -rf ~/perl5; fi
|
||||||
|
|
||||||
# Also flush if the system Perl is newer than the cache, otherwise
|
if perl -V > perlver; then
|
||||||
# it may refuse to load the (older) XS modules.
|
: Perl binary broken
|
||||||
if [ /usr/bin/perl -nt ~/perl5/.key ]; then
|
perl -V
|
||||||
: Purging cache since /usr/bin/perl has been updated
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Compare the current "perl -V" output with the output at the time
|
||||||
|
# the cache was built; flush the cache if it's changed to avoid
|
||||||
|
# failure later when /usr/bin/perl refuses to load a mismatched XS
|
||||||
|
# module.
|
||||||
|
if ! cmp -s perlver ~/perl5/.perlver; then
|
||||||
|
: Purging cache since "perl -V" output has changed
|
||||||
rm -rf ~/perl5
|
rm -rf ~/perl5
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -85,11 +93,11 @@ if ! test -v SKIP_TESTING -o -v NO_TEST_FRAMEWORK; then
|
|||||||
# CC=gcc, e.g. for the CC="gcc -m32" case the builds are not correct
|
# CC=gcc, e.g. for the CC="gcc -m32" case the builds are not correct
|
||||||
# otherwise.
|
# otherwise.
|
||||||
CC=gcc cpanm --notest $pkgs
|
CC=gcc cpanm --notest $pkgs
|
||||||
|
|
||||||
# Set cache key.
|
|
||||||
echo $pkgs > ~/perl5/.key
|
|
||||||
unset pkgs
|
unset pkgs
|
||||||
|
|
||||||
|
# Cache the perl -V output for future verification.
|
||||||
|
mv perlver ~/perl5/.perlver
|
||||||
|
|
||||||
# Make a shallow clone of httpd-tests git repo.
|
# Make a shallow clone of httpd-tests git repo.
|
||||||
git clone -q --depth=1 https://github.com/apache/httpd-tests.git test/perl-framework
|
git clone -q --depth=1 https://github.com/apache/httpd-tests.git test/perl-framework
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user