aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorChristian Stenger <christian.stenger@qt.io>2022-03-15 13:10:12 +0100
committerChristian Stenger <christian.stenger@qt.io>2022-03-16 05:18:10 +0000
commit2907d60973a89e2097129710a344e7c1c182f528 (patch)
tree1cab0276f8e71826a34559dfa7038406990024ff /tests
parente7772949d2b58b6af4abe2da13a384327de2807e (diff)
Squish: Handle build systems more appropriately
Change-Id: I43e89d76c4199a741a5606dd0d6de2165b8133c6 Reviewed-by: Robert Löhning <robert.loehning@qt.io> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/system/shared/project.py13
1 files changed, 9 insertions, 4 deletions
diff --git a/tests/system/shared/project.py b/tests/system/shared/project.py
index a5b9cd2ded..e0b79316b8 100644
--- a/tests/system/shared/project.py
+++ b/tests/system/shared/project.py
@@ -224,6 +224,11 @@ def __modifyAvailableTargets__(available, requiredQt, asStrings=False):
if Qt5Path.toVersionTuple(found.group(1)) < Qt5Path.toVersionTuple(requiredQt):
available.discard(currentItem)
+def __getProjectFileName__(projectName, buildSystem):
+ if buildSystem is None or buildSystem == "CMake":
+ return "CMakeLists.txt"
+ else:
+ return projectName + (".pro" if buildSystem == "qmake" else ".qbs")
# Creates a Qt GUI project
# param path specifies where to create the project
@@ -243,7 +248,7 @@ def createProject_Qt_GUI(path, projectName, checks=True, addToVersionControl="<N
h_file = exp_filename + ".h"
cpp_file = exp_filename + ".cpp"
ui_file = exp_filename + ".ui"
- pro_file = projectName + ".pro"
+ projectFile = __getProjectFileName__(projectName, buildSystem)
waitFor("object.exists(':headerFileLineEdit_Utils::FileNameValidatingLineEdit')", 20000)
waitFor("object.exists(':sourceFileLineEdit_Utils::FileNameValidatingLineEdit')", 20000)
@@ -263,7 +268,7 @@ def createProject_Qt_GUI(path, projectName, checks=True, addToVersionControl="<N
path = os.path.abspath(path)
path = os.path.join(path, projectName)
expectedFiles = [path]
- expectedFiles.extend(__sortFilenamesOSDependent__(["main.cpp", cpp_file, h_file, ui_file, pro_file]))
+ expectedFiles.extend(__sortFilenamesOSDependent__(["main.cpp", cpp_file, h_file, ui_file, projectFile]))
__createProjectHandleLastPage__(expectedFiles, addToVersionControl)
waitForProjectParsing()
@@ -287,9 +292,9 @@ def createProject_Qt_Console(path, projectName, checks = True, buildSystem = Non
path = os.path.abspath(path)
path = os.path.join(path, projectName)
cpp_file = "main.cpp"
- pro_file = projectName + ".pro"
+ projectFile = __getProjectFileName__(projectName, buildSystem)
expectedFiles = [path]
- expectedFiles.extend(__sortFilenamesOSDependent__([cpp_file, pro_file]))
+ expectedFiles.extend(__sortFilenamesOSDependent__([cpp_file, projectFile]))
__createProjectHandleLastPage__(expectedFiles)
waitForProjectParsing()