blob: d4ef6670c1c00bc376fa6d2b3f1a9fda27b6c1eb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
# Copyright (C) 2016 The Qt Company Ltd.
# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0
source("../../shared/qtcreator.py")
# entry of test
def main():
# prepare example project
sourceExample = os.path.join(Qt5Path.examplesPath(Targets.DESKTOP_5_14_1_DEFAULT),
"quick", "animation")
proFile = "animation.pro"
if not neededFilePresent(os.path.join(sourceExample, proFile)):
return
# copy example project to temp directory
templateDir = prepareTemplate(sourceExample, "/../shared")
examplePath = os.path.join(templateDir, proFile)
startQC()
if not startedWithoutPluginError():
return
# open example project, supports only Qt 5
targets = Targets.desktopTargetClasses()
targets.discard(Targets.DESKTOP_5_4_1_GCC)
openQmakeProject(examplePath, targets)
# build and wait until finished - on all build configurations
availableConfigs = iterateBuildConfigs()
if not availableConfigs:
test.fatal("Haven't found a suitable Qt version - leaving without building.")
for kit, config in availableConfigs:
selectBuildConfig(kit, config)
# try to build project
test.log("Testing build configuration: " + config)
invokeMenuItem("Build", "Build All Projects")
waitForCompile()
# verify build successful
ensureChecked(waitForObject(":Qt Creator_CompileOutput_Core::Internal::OutputPaneToggleButton"))
compileOutput = waitForObject(":Qt Creator.Compile Output_Core::OutputWindow")
if not test.verify(compileSucceeded(compileOutput.plainText),
"Verifying building of existing complex qt application."):
test.log(str(compileOutput.plainText))
# exit
invokeMenuItem("File", "Exit")
# no cleanup needed, as whole testing directory gets properly removed after test finished
|