python3-testing
This repo contains code to test python3. It does this by cloning the cpython source code, building it and running the tests. Then the binary specified
by the INSTALL_BIN
argument is installed into the test harness, and testing happens a 2nd time. The docker build completes successfully if both tests
pass the same number of tests.
Arguments
The arguments to docker file are:
-
BASE_TAG
-- The docker image you want to test python3 in. If this image is in a private repo, you'll need todocker login
to that repo for docker to pull the image. -
INSTALL_BIN
-- The path in that docker image that contains the python binary.
This can be a full path such as/usr/local/bin/python3
or a entry in the path variable such aspython
.
The docker file will usewhich $INSTALL_BIN
to locate the program.
Example of building the image:
docker build --build-arg BASE_TAG=python:latest --build-arg INSTALL_BIN=python3 . # passing test.
docker build --build-arg BASE_TAG=ubuntu:22.04 --build-arg INSTALL_BIN=python3 . # failing test