Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 21 additions & 4 deletions test/travis_before_linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -163,17 +163,29 @@ if test -v TEST_SSL; then
popd
fi

# Build the requested version of OpenSSL if it's not already installed
# in the cached ~/root
if test -v TEST_OPENSSL3; then
# Build the requested version of OpenSSL if it's not already
# installed in the cached ~/root
# For a branch, rebuild if the remote branch has updated.
if test -v TEST_OPENSSL3_BRANCH -a -f $HOME/root/openssl-is-${TEST_OPENSSL3}; then
latest=`git ls-remote https://github.com/openssl/openssl refs/heads/${TEST_OPENSSL3_BRANCH} | cut -f1`
: Got branch latest commit ${latest}
if grep -q ^${latest} $HOME/root/openssl-is-${TEST_OPENSSL3}; then
: Cached repos already at ${latest}
else
: Forcing rebuild
rm -f $HOME/root/openssl-is-${TEST_OPENSSL3}
fi
fi

if ! test -f $HOME/root/openssl-is-${TEST_OPENSSL3}; then
# Remove any previous install.
rm -rf $HOME/root/openssl3

mkdir -p build/openssl
pushd build/openssl
if test -v TEST_OPENSSL3_BRANCH; then
git clone -b $TEST_OPENSSL3_BRANCH -q https://github.com/openssl/openssl openssl-${TEST_OPENSSL3}
git clone --depth=1 -b $TEST_OPENSSL3_BRANCH -q https://github.com/openssl/openssl openssl-${TEST_OPENSSL3}
else
curl -L "https://github.com/openssl/openssl/releases/download/openssl-${TEST_OPENSSL3}/openssl-${TEST_OPENSSL3}.tar.gz" |
tar -xzf -
Expand All @@ -185,7 +197,12 @@ if test -v TEST_OPENSSL3; then
'-Wl,-rpath=$(LIBRPATH)'
make $MFLAGS
make install_sw
touch $HOME/root/openssl-is-${TEST_OPENSSL3}
if test -d .git; then
: Caching git commit hash:
git rev-parse HEAD | tee $HOME/root/openssl-is-${TEST_OPENSSL3}
else
touch $HOME/root/openssl-is-${TEST_OPENSSL3}
fi
popd
fi

Expand Down
5 changes: 2 additions & 3 deletions test/travis_run_linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,9 @@ fi

if test -v TEST_OPENSSL3; then
CONFIG="$CONFIG --with-ssl=$HOME/root/openssl3"
# Temporarily set LD_RUN_PATH so that httpd/mod_ssl binaries pick
# up the custom OpenSSL build
export LD_RUN_PATH=$HOME/root/openssl3/lib:$HOME/root/openssl3/lib64
export PATH=$HOME/root/openssl3/bin:$PATH
# Force everything built to hard-code an RPATH
export LDFLAGS="-Wl,-rpath,$HOME/root/openssl3/lib -Wl,-rpath,$HOME/root/openssl3/lib64"
openssl version
fi

Expand Down