summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Stenger <christian.stenger@qt.io>2022-02-03 08:52:11 +0100
committerRobert Löhning <robert.loehning@qt.io>2022-02-03 17:49:35 +0000
commit4e716c0db5cc61ba6357f66c8ea6bb648d6304db (patch)
treebf5aca261f861bef9b354fa77f15dc3c41b3c11a
parent4e10170ccdebab968d6eef47a61143b584f7903a (diff)
downloadqt-creator-4e716c0db5cc61ba6357f66c8ea6bb648d6304db.tar.gz
Squish: Fix unknown global variable
Amends 40caa8a4ba97ce7. Change-Id: I014210c2035fa0a69ca273718df726a523a23786 Reviewed-by: Robert Löhning <robert.loehning@qt.io>
-rw-r--r--tests/system/shared/qtcreator.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/tests/system/shared/qtcreator.py b/tests/system/shared/qtcreator.py
index f7ea2a2c60..4c9646ffb6 100644
--- a/tests/system/shared/qtcreator.py
+++ b/tests/system/shared/qtcreator.py
@@ -39,6 +39,13 @@ try:
except ImportError:
import builtins as __builtin__ # Python 3
+
+# ensure global variables are defined before including shared scripts
+qt4Path = os.path.expanduser("~/Qt4.8.7")
+if platform.system() in ('Windows', 'Microsoft'):
+ qt4Path = "C:\\Qt\\Qt4.8.7"
+
+qt4Available = os.path.exists(qt4Path)
srcPath = ''
SettingsPath = []
tmpSettingsDir = ''
@@ -329,18 +336,14 @@ def copySettingsToTmpDir(destination=None, omitFiles=[]):
# current dir is directory holding qtcreator.py
origSettingsDir = os.path.abspath(os.path.join(os.getcwd(), "..", "..", "settings"))
-qt4Path = os.path.expanduser("~/Qt4.8.7")
if platform.system() in ('Windows', 'Microsoft'):
- qt4Path = "C:\\Qt\\Qt4.8.7"
origSettingsDir = os.path.join(origSettingsDir, "windows")
elif platform.system() == 'Darwin':
origSettingsDir = os.path.join(origSettingsDir, "mac")
else:
origSettingsDir = os.path.join(origSettingsDir, "unix")
-qt4Available = os.path.exists(qt4Path)
-
srcPath = os.getenv("SYSTEST_SRCPATH", os.path.expanduser(os.path.join("~", "squish-data")))
# the following only doesn't work if the test ends in an exception