Skip to content

Split tests from the image build #1008

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 20, 2021
Merged
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
2 changes: 2 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ docker buildx build \
--rm -t quay.io/pypa/${POLICY}_${PLATFORM}:${COMMIT_SHA} \
-f docker/Dockerfile docker/

docker run --rm -v $(pwd)/tests:/tests:ro quay.io/pypa/${POLICY}_${PLATFORM}:${COMMIT_SHA} /tests/run_tests.sh

if [ -d $(pwd)/.buildx-cache-${POLICY}_${PLATFORM} ]; then
rm -rf $(pwd)/.buildx-cache-${POLICY}_${PLATFORM}
fi
Expand Down
7 changes: 1 addition & 6 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -160,12 +160,7 @@ COPY --from=build_cmake /manylinux-rootfs /
COPY --from=build_swig /manylinux-rootfs /
COPY --from=build_cpython /manylinux-rootfs /
COPY --from=all_cpython /opt/_internal /opt/_internal/
COPY build_scripts/finalize.sh /build_scripts/finalize.sh
COPY build_scripts/python-tag-abi-tag.py /build_scripts/python-tag-abi-tag.py
COPY build_scripts/ssl-check.py /build_scripts/ssl-check.py
COPY build_scripts/manylinux-check.py /build_scripts/manylinux-check.py
COPY build_scripts/requirements.txt /build_scripts/requirements.txt
COPY build_scripts/requirements-tools.txt /build_scripts/requirements-tools.txt
COPY build_scripts/finalize.sh build_scripts/python-tag-abi-tag.py build_scripts/requirements.txt build_scripts/requirements-tools.txt /build_scripts/
RUN manylinux-entrypoint /build_scripts/finalize.sh && rm -rf /build_scripts

ENV SSL_CERT_FILE=/opt/_internal/certs.pem
Expand Down
10 changes: 0 additions & 10 deletions docker/build_scripts/finalize.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,20 +52,10 @@ export SSL_CERT_FILE=/opt/_internal/certs.pem
# Deactivate the tools virtual environment
deactivate


for PYTHON in /opt/python/*/bin/python; do
# Smoke test to make sure that our Pythons work, and do indeed detect as
# being manylinux compatible:
$PYTHON $MY_DIR/manylinux-check.py ${AUDITWHEEL_POLICY} ${AUDITWHEEL_ARCH}
# Make sure that SSL cert checking works
$PYTHON $MY_DIR/ssl-check.py
done

# We do not need the precompiled .pyc and .pyo files.
clean_pyc /opt/_internal

# remove cache
rm -rf /root/.cache

hardlink -cv /opt/_internal

File renamed without changes.
25 changes: 25 additions & 0 deletions tests/run_tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/bash

# Stop at any error, show all commands
set -exuo pipefail

# Get script directory
MY_DIR=$(dirname "${BASH_SOURCE[0]}")


for PYTHON in /opt/python/*/bin/python; do
# Smoke test to make sure that our Pythons work, and do indeed detect as
# being manylinux compatible:
$PYTHON $MY_DIR/manylinux-check.py ${AUDITWHEEL_POLICY} ${AUDITWHEEL_ARCH}
# Make sure that SSL cert checking works
$PYTHON $MY_DIR/ssl-check.py
done

# minimal tests for tools that should be present
autoconf --version
automake --version
libtoolize --version
patchelf --version
git --version
cmake --version
swig -version
File renamed without changes.