aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimo Fält <simo.falt@qt.io>2020-05-05 09:04:13 +0300
committerSimo Fält <simo.falt@qt.io>2020-09-24 11:01:51 +0300
commit9eee97b5e66c9771e428539eb340b2c2a3756968 (patch)
tree4f5c01a16768675f8adbeb94691f55293cb528f7
parentcad869b619fdc0969216e6e9b63fd1afb5edb7db (diff)
Test with additional python version
Change-Id: I17726f6bd02d36a7acc3ed99ca11796b780b837d Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
-rw-r--r--build_scripts/utils.py20
-rw-r--r--coin_test_instructions.py7
2 files changed, 21 insertions, 6 deletions
diff --git a/build_scripts/utils.py b/build_scripts/utils.py
index 9f6d472cc..b0c2f8899 100644
--- a/build_scripts/utils.py
+++ b/build_scripts/utils.py
@@ -1102,13 +1102,23 @@ def get_qtci_virtualEnv(python_ver, host, hostArch, targetArch):
_pExe = "python.exe"
# With windows we are creating building 32-bit target in 64-bit host
if hostArch == "X86_64" and targetArch == "X86":
- if python_ver == "3":
- _pExe = os.path.join(os.getenv("PYTHON3_32_PATH"), "python.exe")
+ if python_ver.startswith("3"):
+ print("Try to find python from {} env variable".format("PYTHON"+python_ver+"-32_PATH"))
+ _path = os.getenv("PYTHON"+python_ver+"-32_PATH", "")
+ _pExe = os.path.join(_path, "python.exe")
+ if not os.path.isfile(_pExe):
+ print("Can't find python.exe from {}, using default python3".format(_pExe))
+ _pExe = os.path.join(os.getenv("PYTHON3_32_PATH"), "python.exe")
else:
- _pExe = os.path.join(os.getenv("PYTHON2_32_PATH"), "python.exe")
+ _pExe = os.path.join(os.getenv("PYTHON2_32_PATH"), "python.exe")
else:
- if python_ver == "3":
- _pExe = os.path.join(os.getenv("PYTHON3_PATH"), "python.exe")
+ if python_ver.startswith("3"):
+ print("Try to find python from {} env variable".format("PYTHON"+python_ver+"-64_PATH"))
+ _path = os.getenv("PYTHON"+python_ver+"-64_PATH", "")
+ _pExe = os.path.join(_path, "python.exe")
+ if not os.path.isfile(_pExe):
+ print("Can't find python.exe from {}, using default python3".format(_pExe))
+ _pExe = os.path.join(os.getenv("PYTHON3_PATH"), "python.exe")
env_python = _env + "\\Scripts\\python.exe"
env_pip = _env + "\\Scripts\\pip.exe"
else:
diff --git a/coin_test_instructions.py b/coin_test_instructions.py
index 16ba601f7..30d808e25 100644
--- a/coin_test_instructions.py
+++ b/coin_test_instructions.py
@@ -110,7 +110,12 @@ def run_test_instructions():
testRun =+ 1
# We know that second build was with python3
if CI_RELEASE_CONF:
- call_testrunner("3", str(testRun))
+ # In win machines, there are additional python versions to test with
+ if CI_HOST_OS == "Windows":
+ call_testrunner("3.6.1", str(testRun))
+ call_testrunner("3.8.1", str(testRun))
+ else:
+ call_testrunner("3", str(testRun))
if __name__ == "__main__":
run_test_instructions()