Skip to content
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

Change Python kokoro configs to test only their specified version. #7927

Merged
merged 4 commits into from
Sep 30, 2020
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
10 changes: 9 additions & 1 deletion kokoro/linux/dockerfile/test/python27/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,12 @@ RUN apt-get update && apt-get install -y \
parallel \
time \
wget \
&& apt-get clean
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

# Install Python libraries.
RUN python -m pip install --no-cache-dir --upgrade \
pip \
setuptools \
tox \
wheel
10 changes: 9 additions & 1 deletion kokoro/linux/dockerfile/test/python35/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,12 @@ RUN apt-get update && apt-get install -y \
parallel \
time \
wget \
&& apt-get clean
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

# Install Python libraries.
RUN python -m pip install --no-cache-dir --upgrade \
pip \
setuptools \
tox \
wheel
10 changes: 9 additions & 1 deletion kokoro/linux/dockerfile/test/python36/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,12 @@ RUN apt-get update && apt-get install -y \
parallel \
time \
wget \
&& apt-get clean
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

# Install Python libraries.
RUN python -m pip install --no-cache-dir --upgrade \
pip \
setuptools \
tox \
wheel
10 changes: 9 additions & 1 deletion kokoro/linux/dockerfile/test/python37/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,12 @@ RUN apt-get update && apt-get install -y \
parallel \
time \
wget \
&& apt-get clean
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

# Install Python libraries.
RUN python -m pip install --no-cache-dir --upgrade \
pip \
setuptools \
tox \
wheel
10 changes: 9 additions & 1 deletion kokoro/linux/dockerfile/test/python38/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,12 @@ RUN apt-get update && apt-get install -y \
parallel \
time \
wget \
&& apt-get clean
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

# Install Python libraries.
RUN python -m pip install --no-cache-dir --upgrade \
pip \
setuptools \
tox \
wheel
2 changes: 1 addition & 1 deletion kokoro/linux/python27/continuous.cfg
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Config file for running tests in Kokoro

# Location of the build script in repository
build_file: "protobuf/kokoro/linux/python/build.sh"
build_file: "protobuf/kokoro/linux/python27/build.sh"
timeout_mins: 120

action {
Expand Down
2 changes: 1 addition & 1 deletion kokoro/linux/python27/presubmit.cfg
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Config file for running tests in Kokoro

# Location of the build script in repository
build_file: "protobuf/kokoro/linux/python/build.sh"
build_file: "protobuf/kokoro/linux/python27/build.sh"
timeout_mins: 120

action {
Expand Down
2 changes: 1 addition & 1 deletion kokoro/linux/python27_cpp/continuous.cfg
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Config file for running tests in Kokoro

# Location of the build script in repository
build_file: "protobuf/kokoro/linux/python_cpp/build.sh"
build_file: "protobuf/kokoro/linux/python27_cpp/build.sh"
timeout_mins: 120

action {
Expand Down
2 changes: 1 addition & 1 deletion kokoro/linux/python27_cpp/presubmit.cfg
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Config file for running tests in Kokoro

# Location of the build script in repository
build_file: "protobuf/kokoro/linux/python_cpp/build.sh"
build_file: "protobuf/kokoro/linux/python27_cpp/build.sh"
timeout_mins: 120

action {
Expand Down
2 changes: 1 addition & 1 deletion kokoro/linux/python35/continuous.cfg
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Config file for running tests in Kokoro

# Location of the build script in repository
build_file: "protobuf/kokoro/linux/python/build.sh"
build_file: "protobuf/kokoro/linux/python35/build.sh"
timeout_mins: 120

action {
Expand Down
2 changes: 1 addition & 1 deletion kokoro/linux/python35/presubmit.cfg
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Config file for running tests in Kokoro

# Location of the build script in repository
build_file: "protobuf/kokoro/linux/python/build.sh"
build_file: "protobuf/kokoro/linux/python35/build.sh"
timeout_mins: 120

action {
Expand Down
2 changes: 1 addition & 1 deletion kokoro/linux/python35_cpp/continuous.cfg
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Config file for running tests in Kokoro

# Location of the build script in repository
build_file: "protobuf/kokoro/linux/python_cpp/build.sh"
build_file: "protobuf/kokoro/linux/python35_cpp/build.sh"
timeout_mins: 120

action {
Expand Down
2 changes: 1 addition & 1 deletion kokoro/linux/python35_cpp/presubmit.cfg
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Config file for running tests in Kokoro

# Location of the build script in repository
build_file: "protobuf/kokoro/linux/python_cpp/build.sh"
build_file: "protobuf/kokoro/linux/python35_cpp/build.sh"
timeout_mins: 120

action {
Expand Down
2 changes: 1 addition & 1 deletion kokoro/linux/python36/continuous.cfg
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Config file for running tests in Kokoro

# Location of the build script in repository
build_file: "protobuf/kokoro/linux/python/build.sh"
build_file: "protobuf/kokoro/linux/python36/build.sh"
timeout_mins: 120

action {
Expand Down
2 changes: 1 addition & 1 deletion kokoro/linux/python36/presubmit.cfg
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Config file for running tests in Kokoro

# Location of the build script in repository
build_file: "protobuf/kokoro/linux/python/build.sh"
build_file: "protobuf/kokoro/linux/python36/build.sh"
timeout_mins: 120

action {
Expand Down
2 changes: 1 addition & 1 deletion kokoro/linux/python36_cpp/continuous.cfg
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Config file for running tests in Kokoro

# Location of the build script in repository
build_file: "protobuf/kokoro/linux/python_cpp/build.sh"
build_file: "protobuf/kokoro/linux/python36_cpp/build.sh"
timeout_mins: 120

action {
Expand Down
2 changes: 1 addition & 1 deletion kokoro/linux/python36_cpp/presubmit.cfg
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Config file for running tests in Kokoro

# Location of the build script in repository
build_file: "protobuf/kokoro/linux/python_cpp/build.sh"
build_file: "protobuf/kokoro/linux/python36_cpp/build.sh"
timeout_mins: 120

action {
Expand Down
2 changes: 1 addition & 1 deletion kokoro/linux/python37/continuous.cfg
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Config file for running tests in Kokoro

# Location of the build script in repository
build_file: "protobuf/kokoro/linux/python/build.sh"
build_file: "protobuf/kokoro/linux/python37/build.sh"
timeout_mins: 120

action {
Expand Down
2 changes: 1 addition & 1 deletion kokoro/linux/python37/presubmit.cfg
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Config file for running tests in Kokoro

# Location of the build script in repository
build_file: "protobuf/kokoro/linux/python/build.sh"
build_file: "protobuf/kokoro/linux/python37/build.sh"
timeout_mins: 120

action {
Expand Down
2 changes: 1 addition & 1 deletion kokoro/linux/python37_cpp/continuous.cfg
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Config file for running tests in Kokoro

# Location of the build script in repository
build_file: "protobuf/kokoro/linux/python_cpp/build.sh"
build_file: "protobuf/kokoro/linux/python37_cpp/build.sh"
timeout_mins: 120

action {
Expand Down
2 changes: 1 addition & 1 deletion kokoro/linux/python37_cpp/presubmit.cfg
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Config file for running tests in Kokoro

# Location of the build script in repository
build_file: "protobuf/kokoro/linux/python_cpp/build.sh"
build_file: "protobuf/kokoro/linux/python37_cpp/build.sh"
timeout_mins: 120

action {
Expand Down
2 changes: 1 addition & 1 deletion kokoro/linux/python38/continuous.cfg
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Config file for running tests in Kokoro

# Location of the build script in repository
build_file: "protobuf/kokoro/linux/python/build.sh"
build_file: "protobuf/kokoro/linux/python38/build.sh"
timeout_mins: 120

action {
Expand Down
2 changes: 1 addition & 1 deletion kokoro/linux/python38/presubmit.cfg
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Config file for running tests in Kokoro

# Location of the build script in repository
build_file: "protobuf/kokoro/linux/python/build.sh"
build_file: "protobuf/kokoro/linux/python38/build.sh"
timeout_mins: 120

action {
Expand Down
2 changes: 1 addition & 1 deletion kokoro/linux/python38_cpp/continuous.cfg
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Config file for running tests in Kokoro

# Location of the build script in repository
build_file: "protobuf/kokoro/linux/python_cpp/build.sh"
build_file: "protobuf/kokoro/linux/python38_cpp/build.sh"
timeout_mins: 120

action {
Expand Down
2 changes: 1 addition & 1 deletion kokoro/linux/python38_cpp/presubmit.cfg
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Config file for running tests in Kokoro

# Location of the build script in repository
build_file: "protobuf/kokoro/linux/python_cpp/build.sh"
build_file: "protobuf/kokoro/linux/python38_cpp/build.sh"
timeout_mins: 120

action {
Expand Down
5 changes: 4 additions & 1 deletion python/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ setenv =
commands =
python setup.py -q build_py
python: python setup.py -q build
cpp: python setup.py -q build --cpp_implementation --warnings_as_errors --compile_static_extension
# --warnings_as_errors disabled until we update the Python C extension. See:
# https://github.com/protocolbuffers/protobuf/issues/7930
# cpp: python setup.py -q build --cpp_implementation --warnings_as_errors --compile_static_extension
cpp: python setup.py -q build --cpp_implementation --compile_static_extension
python: python setup.py -q test -q
cpp: python setup.py -q test -q --cpp_implementation
python: python setup.py -q test_conformance
Expand Down
4 changes: 2 additions & 2 deletions tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -316,15 +316,15 @@ build_python() {
else
envlist=py\{27,36\}-python
fi
tox -e $envlist
python -m tox -e $envlist
cd ..
}

build_python_version() {
internal_build_cpp
cd python
envlist=$1
tox -e $envlist
python -m tox -e $envlist
cd ..
}

Expand Down