Files
qt-creator/tests/system/suite_general/tst_cmake_speedcrunch/test.py
Robert Loehning 046f42b282 Squish: Removed unused code and data
Change-Id: I20df2aa148002ecb9b1526df125daf04bc76010e
Reviewed-by: Bill King <bill.king@nokia.com>
Reviewed-by: Christian Stenger <christian.stenger@nokia.com>
2012-06-04 14:58:33 +02:00

47 lines
1.4 KiB
Python

source("../../shared/qtcreator.py")
SpeedCrunchPath = ""
BuildPath = tempDir()
def main():
if (which("cmake") == None):
test.fatal("cmake not found in PATH - needed to run this test")
return
if (which("qmake") == None):
test.fatal("qmake not found in PATH - needed to run this test")
return
if not neededFilePresent(SpeedCrunchPath):
return
startApplication("qtcreator" + SettingsPath)
result = openCmakeProject(SpeedCrunchPath, BuildPath)
if not result:
test.fatal("Could not open/create cmake project - leaving test")
invokeMenuItem("File", "Exit")
waitForCleanShutdown()
return
waitForSignal("{type='CppTools::Internal::CppModelManager' unnamed='1'}", "sourceFilesRefreshed(QStringList)")
# Invoke a rebuild of the application
invokeMenuItem("Build", "Rebuild All")
# Wait for, and test if the build succeeded
waitForSignal("{type='ProjectExplorer::BuildManager' unnamed='1'}", "buildQueueFinished(bool)", 300000)
checkCompile()
checkLastBuild()
invokeMenuItem("File", "Exit")
waitForCleanShutdown()
def init():
global SpeedCrunchPath
SpeedCrunchPath = srcPath + "/creator-test-data/speedcrunch/src/CMakeLists.txt"
cleanup()
def cleanup():
global BuildPath
# Make sure the .user files are gone
cleanUpUserFiles(SpeedCrunchPath)
deleteDirIfExists(BuildPath)