summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2022-06-02 12:21:02 +0200
committerThomas Haller <thaller@redhat.com>2022-06-02 14:35:04 +0200
commit68e9f92a816ffa887528c41a11c69c1c8145519b (patch)
tree9940036e8fc62f0196f053dbfb01f58b3a7adb94
parent68aafe4942c1eaf97cf4c59dc4637150fc90c18a (diff)
downloadNetworkManager-68e9f92a816ffa887528c41a11c69c1c8145519b.tar.gz
gitlab-ci: test build with python2 on Centos7
Currently, for all tests we have python3 installed. So effectively, even on CentOS 7, we would test the build with python3 only. The package build on CentOS7/epel7 however uses python2. This happens for example for our copr builds. Also test that configuration in gitlab-ci.
-rwxr-xr-x.gitlab-ci/run-test.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/.gitlab-ci/run-test.sh b/.gitlab-ci/run-test.sh
index c8c26f0815..be725133f6 100755
--- a/.gitlab-ci/run-test.sh
+++ b/.gitlab-ci/run-test.sh
@@ -11,6 +11,13 @@ grep -q '^NAME=.*\(CentOS\)' /etc/os-release && IS_CENTOS=1
grep -q '^NAME=.*\(Fedora\)' /etc/os-release && IS_FEDORA=1
grep -q '^NAME=.*\(Alpine\)' /etc/os-release && IS_ALPINE=1
+IS_CENTOS_7=0
+if [ $IS_CENTOS = 1 ]; then
+ if grep -q '^VERSION_ID=.*\<7\>' /etc/os-release ; then
+ IS_CENTOS_7=1
+ fi
+fi
+
do_clean() {
git clean -fdx
}
@@ -36,6 +43,8 @@ do_clean; BUILD_TYPE=meson CC=gcc WITH_DOCS=1 WITH_VALGRIND=1 contrib/scri
do_clean; BUILD_TYPE=autotools CC=clang WITH_DOCS=0 contrib/scripts/nm-ci-run.sh
do_clean; BUILD_TYPE=meson CC=clang WITH_DOCS=0 contrib/scripts/nm-ci-run.sh
+do_clean; test $IS_CENTOS_7 = 1 && PYTHON=python2 BUILD_TYPE=autotools CC=gcc WITH_DOCS=1 contrib/scripts/nm-ci-run.sh
+
do_clean; test $IS_FEDORA = 1 -o $IS_CENTOS = 1 && ./contrib/fedora/rpm/build_clean.sh -g -w crypto_gnutls -w debug -w iwd -w test -W meson
do_clean; test $IS_FEDORA = 1 && ./contrib/fedora/rpm/build_clean.sh -g -w crypto_gnutls -w debug -w iwd -w test -w meson