Skip to content

Commit a6a05ae

Browse files
Dynamically link AWS-LC in cpython integration tests (#2545)
Dynamically link AWS-LC to CPython's main branch integration test to match [the new upstream CI job](python/cpython#135402 (comment)).
1 parent 898e70c commit a6a05ae

File tree

2 files changed

+12
-22
lines changed

2 files changed

+12
-22
lines changed

tests/ci/integration/python_patch/main/aws-lc-cpython.patch

Lines changed: 0 additions & 21 deletions
This file was deleted.

tests/ci/integration/run_python_integration.sh

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,9 +207,18 @@ cd ${SCRATCH_FOLDER}
207207

208208
mkdir -p ${AWS_LC_BUILD_FOLDER} ${AWS_LC_INSTALL_FOLDER}
209209

210+
# Link AWS-LC dynamically against CPython's main, statically against
211+
# versioned releases.
212+
if [[ "${1}" == "main" ]]; then
213+
BUILD_SHARED_LIBS="ON"
214+
export LD_LIBRARY_PATH="${AWS_LC_INSTALL_FOLDER}/lib"
215+
else
216+
BUILD_SHARED_LIBS="OFF"
217+
fi
218+
210219
aws_lc_build ${SRC_ROOT} ${AWS_LC_BUILD_FOLDER} ${AWS_LC_INSTALL_FOLDER} \
211220
-DBUILD_TESTING=OFF \
212-
-DBUILD_SHARED_LIBS=0 \
221+
-DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS} \
213222
-DFIPS=${FIPS}
214223

215224
fetch_crt_python
@@ -221,6 +230,8 @@ pushd ${PYTHON_SRC_FOLDER}
221230
which sysctl && ( sysctl -w net.ipv6.conf.all.disable_ipv6=0 || /bin/true )
222231
echo 0 >/proc/sys/net/ipv6/conf/all/disable_ipv6 || /bin/true
223232

233+
export LD_LIBRARY_PATH="${AWS_LC_INSTALL_FOLDER}/lib"
234+
224235
# NOTE: As we add more versions to support, we may want to parallelize here
225236
for branch in "$@"; do
226237
python_patch ${branch}

0 commit comments

Comments
 (0)