forked from qt-creator/qt-creator
Squish: Let CMake build in temporary directory
Change-Id: Ib2cc65378b74f662652434dd1a65d845ee3fb741 Reviewed-by: Christian Stenger <christian.stenger@nokia.com> Reviewed-by: Bill King <bill.king@nokia.com>
This commit is contained in:
committed by
Robert Löhning
parent
7e4444792b
commit
6b1b47d83c
@@ -16,9 +16,11 @@ def openQmakeProject(projectPath):
|
|||||||
selectFromCombo(":scrollArea.Create Build Configurations:_QComboBox", "For Each Qt Version One Debug And One Release")
|
selectFromCombo(":scrollArea.Create Build Configurations:_QComboBox", "For Each Qt Version One Debug And One Release")
|
||||||
clickButton(waitForObject("{text~='(Finish|Done)' type='QPushButton'}"))
|
clickButton(waitForObject("{text~='(Finish|Done)' type='QPushButton'}"))
|
||||||
|
|
||||||
def openCmakeProject(projectPath):
|
def openCmakeProject(projectPath, buildDir):
|
||||||
invokeMenuItem("File", "Open File or Project...")
|
invokeMenuItem("File", "Open File or Project...")
|
||||||
selectFromFileDialog(projectPath)
|
selectFromFileDialog(projectPath)
|
||||||
|
replaceEditorContent("{type='Utils::BaseValidatingLineEdit' unnamed='1' visible='1'"
|
||||||
|
"window=':CMake Wizard_CMakeProjectManager::Internal::CMakeOpenProjectWizard'}", buildDir)
|
||||||
clickButton(waitForObject(":CMake Wizard.Next_QPushButton", 20000))
|
clickButton(waitForObject(":CMake Wizard.Next_QPushButton", 20000))
|
||||||
generatorCombo = waitForObject(":Generator:_QComboBox")
|
generatorCombo = waitForObject(":Generator:_QComboBox")
|
||||||
index = generatorCombo.findText("MinGW Generator (MinGW from SDK)")
|
index = generatorCombo.findText("MinGW Generator (MinGW from SDK)")
|
||||||
|
@@ -1,6 +1,7 @@
|
|||||||
source("../../shared/qtcreator.py")
|
source("../../shared/qtcreator.py")
|
||||||
|
|
||||||
SpeedCrunchPath = ""
|
SpeedCrunchPath = ""
|
||||||
|
BuildPath = tempDir()
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
if (which("cmake") == None):
|
if (which("cmake") == None):
|
||||||
@@ -14,7 +15,7 @@ def main():
|
|||||||
|
|
||||||
startApplication("qtcreator" + SettingsPath)
|
startApplication("qtcreator" + SettingsPath)
|
||||||
|
|
||||||
result = openCmakeProject(SpeedCrunchPath)
|
result = openCmakeProject(SpeedCrunchPath, BuildPath)
|
||||||
if not result:
|
if not result:
|
||||||
test.warning("Could not open/create cmake project - leaving test")
|
test.warning("Could not open/create cmake project - leaving test")
|
||||||
invokeMenuItem("File", "Exit")
|
invokeMenuItem("File", "Exit")
|
||||||
@@ -45,15 +46,7 @@ def init():
|
|||||||
cleanup()
|
cleanup()
|
||||||
|
|
||||||
def cleanup():
|
def cleanup():
|
||||||
|
global BuildPath
|
||||||
# Make sure the .user files are gone
|
# Make sure the .user files are gone
|
||||||
cleanUpUserFiles(SpeedCrunchPath)
|
cleanUpUserFiles(SpeedCrunchPath)
|
||||||
|
deleteDirIfExists(BuildPath)
|
||||||
BuildPath = srcPath + "/creator-test-data/speedcrunch/src/qtcreator-build"
|
|
||||||
|
|
||||||
if os.access(BuildPath, os.F_OK):
|
|
||||||
shutil.rmtree(BuildPath)
|
|
||||||
# added because creator uses this one for me
|
|
||||||
BuildPath = srcPath + "/creator-test-data/speedcrunch/qtcreator-build"
|
|
||||||
|
|
||||||
if os.access(BuildPath, os.F_OK):
|
|
||||||
shutil.rmtree(BuildPath)
|
|
||||||
|
Reference in New Issue
Block a user