From 6fd241a51b29ef090e6ca602948e17ca9afffa6e Mon Sep 17 00:00:00 2001 From: Joe Orton Date: Mon, 9 Jan 2023 09:26:05 +0000 Subject: Prep for GitHub actions: move CPAN handling into test scripts, don't reference /home/travis directly. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1906480 13f79535-47bb-0310-9956-ffa450edef68 --- test/travis_before_linux.sh | 19 +++++++++++++++++-- test/travis_run_linux.sh | 3 +++ 2 files changed, 20 insertions(+), 2 deletions(-) (limited to 'test') diff --git a/test/travis_before_linux.sh b/test/travis_before_linux.sh index 0da000ab7d..c7426bee36 100755 --- a/test/travis_before_linux.sh +++ b/test/travis_before_linux.sh @@ -87,12 +87,27 @@ function install_apx() { touch ${prefix}/.revision-is-${revision} } -# Allow to load /home/travis/build/apache/httpd/.gdbinit -echo "add-auto-load-safe-path /home/travis/build/apache/httpd/.gdbinit" >> /home/travis/.gdbinit +# Allow to load $HOME/build/apache/httpd/.gdbinit +echo "add-auto-load-safe-path $HOME/build/apache/httpd/.gdbinit" >> $HOME/.gdbinit +# Prepare perl-framework test environment if ! test -v SKIP_TESTING; then + # Clear CPAN cache if necessary + if [ -v CLEAR_CACHE ]; then rm -rf ~/perl5; fi + + cpanm --local-lib=~/perl5 local::lib && eval $(perl -I ~/perl5/lib/perl5/ -Mlocal::lib) + + # CPAN modules are to be used with the system Perl and always with + # CC=gcc, e.g. for the CC="gcc -m32" case the builds are not correct + # otherwise. + CC=gcc cpanm --notest Net::SSL LWP::Protocol::https \ + LWP::Protocol::AnyEvent::http \ + ExtUtils::Embed Test::More AnyEvent DateTime HTTP::DAV FCGI \ + AnyEvent::WebSocket::Client Apache::Test + ### Temporary: purge old svn checkout from the cache rm -rf $HOME/root/framework + # Make a shallow clone of httpd-tests git repo. git clone --depth=1 https://github.com/apache/httpd-tests.git test/perl-framework fi diff --git a/test/travis_run_linux.sh b/test/travis_run_linux.sh index 692e5f82ba..8aa1811b0b 100755 --- a/test/travis_run_linux.sh +++ b/test/travis_run_linux.sh @@ -39,6 +39,9 @@ if test ! -v SKIP_TESTING; then CONFIG="--with-test-suite=test/perl-framework $CONFIG" WITH_TEST_SUITE=1 fi + + # Use the CPAN environment. + eval $(perl -I ~/perl5/lib/perl5/ -Mlocal::lib) fi if test -v APR_VERSION; then CONFIG="$CONFIG --with-apr=$HOME/root/apr-${APR_VERSION}" -- cgit v1.2.1