diff --git a/tests/system/shared/project.py b/tests/system/shared/project.py index 830ce8e6d447ed7a1d772518df33a7d5e184e9ab..074bbc02d0423f4def40436cccdd45f0906dd1c2 100644 --- a/tests/system/shared/project.py +++ b/tests/system/shared/project.py @@ -16,9 +16,11 @@ def openQmakeProject(projectPath): selectFromCombo(":scrollArea.Create Build Configurations:_QComboBox", "For Each Qt Version One Debug And One Release") clickButton(waitForObject("{text~='(Finish|Done)' type='QPushButton'}")) -def openCmakeProject(projectPath): +def openCmakeProject(projectPath, buildDir): invokeMenuItem("File", "Open File or Project...") selectFromFileDialog(projectPath) + replaceEditorContent("{type='Utils::BaseValidatingLineEdit' unnamed='1' visible='1'" + "window=':CMake Wizard_CMakeProjectManager::Internal::CMakeOpenProjectWizard'}", buildDir) clickButton(waitForObject(":CMake Wizard.Next_QPushButton", 20000)) generatorCombo = waitForObject(":Generator:_QComboBox") index = generatorCombo.findText("MinGW Generator (MinGW from SDK)") diff --git a/tests/system/suite_general/tst_cmake_speedcrunch/test.py b/tests/system/suite_general/tst_cmake_speedcrunch/test.py index 89aaa5cc0f4c455a84a00a40ff87c9a984af6edb..4ab159102daa47dd87b3a347765fb0ea88a8c598 100644 --- a/tests/system/suite_general/tst_cmake_speedcrunch/test.py +++ b/tests/system/suite_general/tst_cmake_speedcrunch/test.py @@ -1,6 +1,7 @@ source("../../shared/qtcreator.py") SpeedCrunchPath = "" +BuildPath = tempDir() def main(): if (which("cmake") == None): @@ -14,7 +15,7 @@ def main(): startApplication("qtcreator" + SettingsPath) - result = openCmakeProject(SpeedCrunchPath) + result = openCmakeProject(SpeedCrunchPath, BuildPath) if not result: test.warning("Could not open/create cmake project - leaving test") invokeMenuItem("File", "Exit") @@ -45,15 +46,7 @@ def init(): cleanup() def cleanup(): + global BuildPath # Make sure the .user files are gone cleanUpUserFiles(SpeedCrunchPath) - - 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) + deleteDirIfExists(BuildPath)