aboutsummaryrefslogtreecommitdiffstats
path: root/testing/runner.py
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2018-04-23 14:38:39 +0200
committerAlexandru Croitor <alexandru.croitor@qt.io>2018-04-30 09:31:17 +0000
commit6fe563b2aa15c2c23369acce353be69f6ea84c77 (patch)
treee0ef0c6f7ae4106424a9202745651d59e70bd558 /testing/runner.py
parent1d6bad63bcb6720078de1e78c1b495bf08d1c65b (diff)
Split and move various setup.py parts into different files
This is an initial effort to clean up setup.py. A new directory called build_scripts contains most of the logic for building, leaving setup.py as an entry point. The build_scripts directory contains the usual qtinfo, utils, and the setup.py content has been split into main.py and platform specific files under platforms subfolder. The testrunner script has been modified to find the new location of the utils module. Task-number: PYSIDE-558 Change-Id: I3e041d5116ca5c3f96c789317303b65a7b1bbd70 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'testing/runner.py')
-rw-r--r--testing/runner.py15
1 files changed, 12 insertions, 3 deletions
diff --git a/testing/runner.py b/testing/runner.py
index 6c3eef388..945e32469 100644
--- a/testing/runner.py
+++ b/testing/runner.py
@@ -1,9 +1,9 @@
#############################################################################
##
-## Copyright (C) 2017 The Qt Company Ltd.
+## Copyright (C) 2018 The Qt Company Ltd.
## Contact: https://www.qt.io/licensing/
##
-## This file is part of PySide2.
+## This file is part of the Qt for Python project.
##
## $QT_BEGIN_LICENSE:LGPL$
## Commercial License Usage
@@ -51,7 +51,16 @@ from textwrap import dedent
from .buildlog import builds
from .helper import decorate, PY3, TimeoutExpired
-sys.path.append('..')
+# Get the dir path to the utils module
+try:
+ this_file = __file__
+except NameError:
+ this_file = sys.argv[0]
+this_file = os.path.abspath(this_file)
+this_dir = os.path.dirname(this_file)
+build_scripts_dir = os.path.abspath(os.path.join(this_dir, '../build_scripts'))
+
+sys.path.append(build_scripts_dir)
from utils import detectClang
class TestRunner(object):