2011-08-26 12:39:04 +02:00
|
|
|
source("../../shared/qtcreator.py")
|
2011-08-25 10:05:28 +02:00
|
|
|
|
|
|
|
|
SpeedCrunchPath = ""
|
|
|
|
|
|
|
|
|
|
def main():
|
|
|
|
|
if(which("cmake") == None):
|
|
|
|
|
test.fatal("cmake not found")
|
|
|
|
|
return
|
|
|
|
|
|
|
|
|
|
test.verify(os.path.exists(SpeedCrunchPath))
|
|
|
|
|
|
2011-08-31 13:51:32 +02:00
|
|
|
startApplication("qtcreator" + SettingsPath)
|
|
|
|
|
|
|
|
|
|
openCmakeProject(SpeedCrunchPath)
|
2011-08-25 10:05:28 +02:00
|
|
|
|
2011-09-21 13:55:23 +02:00
|
|
|
waitForSignal("{type='CppTools::Internal::CppModelManager' unnamed='1'}", "sourceFilesRefreshed(QStringList)", 30000)
|
2011-08-25 10:05:28 +02:00
|
|
|
|
|
|
|
|
# Test that some of the expected items are in the navigation tree
|
|
|
|
|
for row, record in enumerate(testData.dataset("speedcrunch_tree.tsv")):
|
|
|
|
|
node = testData.field(record, "node")
|
|
|
|
|
value = testData.field(record, "value")
|
|
|
|
|
test.compare(findObject(node).text, value)
|
|
|
|
|
|
|
|
|
|
# Invoke a rebuild of the application
|
|
|
|
|
invokeMenuItem("Build", "Rebuild All")
|
|
|
|
|
|
|
|
|
|
# Wait for, and test if the build succeeded
|
2011-09-21 13:55:23 +02:00
|
|
|
waitForSignal("{type='ProjectExplorer::BuildManager' unnamed='1'}", "buildQueueFinished(bool)", 300000)
|
|
|
|
|
checkCompile()
|
|
|
|
|
checkLastBuild()
|
2011-08-25 10:05:28 +02:00
|
|
|
|
|
|
|
|
invokeMenuItem("File", "Exit")
|
|
|
|
|
|
|
|
|
|
def init():
|
|
|
|
|
global SpeedCrunchPath
|
2011-09-23 20:40:57 +02:00
|
|
|
SpeedCrunchPath = srcPath + "/creator-test-data/speedcrunch/src/CMakeLists.txt"
|
2011-08-25 10:05:28 +02:00
|
|
|
cleanup()
|
|
|
|
|
|
|
|
|
|
def cleanup():
|
|
|
|
|
# Make sure the .user files are gone
|
|
|
|
|
if os.access(SpeedCrunchPath + ".user", os.F_OK):
|
|
|
|
|
os.remove(SpeedCrunchPath + ".user")
|
|
|
|
|
|
2011-09-23 20:40:57 +02:00
|
|
|
BuildPath = srcPath + "/creator-test-data/speedcrunch/src/qtcreator-build"
|
2011-08-25 10:05:28 +02:00
|
|
|
|
2011-09-01 14:09:25 +02:00
|
|
|
if os.access(BuildPath, os.F_OK):
|
|
|
|
|
shutil.rmtree(BuildPath)
|
|
|
|
|
# added because creator uses this one for me
|
2011-09-23 20:40:57 +02:00
|
|
|
BuildPath = srcPath + "/creator-test-data/speedcrunch/qtcreator-build"
|
2011-09-01 14:09:25 +02:00
|
|
|
|
2011-08-25 10:05:28 +02:00
|
|
|
if os.access(BuildPath, os.F_OK):
|
|
|
|
|
shutil.rmtree(BuildPath)
|