diff options
author | Robert Loehning <robert.loehning@qt.io> | 2018-05-04 14:21:05 +0200 |
---|---|---|
committer | Robert Loehning <robert.loehning@qt.io> | 2018-05-09 08:46:39 +0000 |
commit | 1ac527d8f68d67e067e184c71d147b46985c3a90 (patch) | |
tree | 0fab4350c07e7f7c746f54e7c254249ead7aa56b /tests | |
parent | 5a54a813d36b96ee927c9345aa244b995714797b (diff) |
Squish: Don't configure Windows firewall when we don't need to
Task-number: QTCREATORBUG-20316
Change-Id: Ibec253f15a39dc22ab8bd1693eab38b0ab7b44fb
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/system/README | 4 | ||||
-rw-r--r-- | tests/system/shared/project_explorer.py | 48 | ||||
-rw-r--r-- | tests/system/suite_debugger/tst_debug_empty_main/test.py | 9 | ||||
-rw-r--r-- | tests/system/suite_debugger/tst_qml_locals/test.py | 10 | ||||
-rw-r--r-- | tests/system/suite_debugger/tst_simple_analyze/test.py | 9 |
5 files changed, 2 insertions, 78 deletions
diff --git a/tests/system/README b/tests/system/README index 86f5a1053d..9988635940 100644 --- a/tests/system/README +++ b/tests/system/README @@ -76,8 +76,8 @@ Attention! If any of these prerequisites cannot be satisfied the tests will like Prerequisites - debugging and analyzing ----------------------------------------- -In some tests, Creator needs to read data from an application it started. -On Windows, those have the following prerequisites: +In tst_simple_debug from suite_debbugger, Creator needs to read data from an application it +started. On Windows, this has the following prerequisites: Either: * have no firewall at all enabled (sure that's a bad idea) Or: diff --git a/tests/system/shared/project_explorer.py b/tests/system/shared/project_explorer.py index 1fcbf1bc21..dc18935e31 100644 --- a/tests/system/shared/project_explorer.py +++ b/tests/system/shared/project_explorer.py @@ -165,54 +165,6 @@ def getQtInformationForBuildSettings(kitCount, alreadyOnProjectsBuildSettings=Fa test.warning("Don't know where you trying to switch to (%s)" % afterSwitchTo) return qtVersion -def getQtInformationForQmlProject(): - fancyToolButton = waitForObject(":*Qt Creator_Core::Internal::FancyToolButton") - kit = __getTargetFromToolTip__(str(fancyToolButton.toolTip)) - if not kit: - test.fatal("Could not figure out which kit you're using...") - return None - test.log("Searching for Qt information for kit '%s'" % kit) - invokeMenuItem("Tools", "Options...") - waitForObjectItem(":Options_QListView", "Build & Run") - clickItem(":Options_QListView", "Build & Run", 14, 15, 0, Qt.LeftButton) - clickOnTab(":Options.qt_tabwidget_tabbar_QTabBar", "Kits") - targetsTreeView = waitForObject(":BuildAndRun_QTreeView") - if not __selectTreeItemOnBuildAndRun__(targetsTreeView, "%s(\s\(default\))?" % kit, True): - test.fatal("Found no matching kit - this shouldn't happen.") - clickButton(waitForObject(":Options.Cancel_QPushButton")) - return None - qtVersionStr = str(waitForObject(":Kits_QtVersion_QComboBox").currentText) - test.log("Kit '%s' uses Qt Version '%s'" % (kit, qtVersionStr)) - clickOnTab(":Options.qt_tabwidget_tabbar_QTabBar", "Qt Versions") - treeView = waitForObject(":qtdirList_QTreeView") - if not __selectTreeItemOnBuildAndRun__(treeView, qtVersionStr): - test.fatal("Found no matching Qt Version for kit - this shouldn't happen.") - clickButton(waitForObject(":Options.Cancel_QPushButton")) - return None - qmake = str(waitForObject(":QtSupport__Internal__QtVersionManager.qmake_QLabel").text) - test.log("Qt Version '%s' uses qmake at '%s'" % (qtVersionStr, qmake)) - clickButton(waitForObject(":Options.Cancel_QPushButton")) - return qmake - -def __selectTreeItemOnBuildAndRun__(treeViewOrWidget, itemText, isRegex=False): - model = treeViewOrWidget.model() - test.compare(model.rowCount(), 2, "Verifying expected section count") - autoDetected = model.index(0, 0) - test.compare(autoDetected.data().toString(), "Auto-detected", "Verifying label for section") - manual = model.index(1, 0) - test.compare(manual.data().toString(), "Manual", "Verifying label for section") - if isRegex: - pattern = re.compile(itemText) - for section in [autoDetected, manual]: - for dumpedItem in dumpItems(model, section): - if (isRegex and pattern.match(dumpedItem) - or itemText == dumpedItem): - item = ".".join([str(section.data().toString()), - dumpedItem.replace(".", "\\.").replace("_", "\\_")]) - clickItem(treeViewOrWidget, item, 5, 5, 0, Qt.LeftButton) - return True - return False - def __getTargetFromToolTip__(toolTip): if toolTip == None or not isinstance(toolTip, (str, unicode)): test.warning("Parameter toolTip must be of type str or unicode and can't be None!") diff --git a/tests/system/suite_debugger/tst_debug_empty_main/test.py b/tests/system/suite_debugger/tst_debug_empty_main/test.py index 230e3793a8..be7f15fc2f 100644 --- a/tests/system/suite_debugger/tst_debug_empty_main/test.py +++ b/tests/system/suite_debugger/tst_debug_empty_main/test.py @@ -97,13 +97,6 @@ def performDebugging(projectName, checkedTargets): invokeMenuItem("Build", "Rebuild All") waitForCompile() isMsvc = isMsvcConfig(len(checkedTargets), kit) - if platform.system() in ('Microsoft' 'Windows'): - switchViewTo(ViewConstants.PROJECTS) - switchToBuildOrRunSettingsFor(len(checkedTargets), kit, ProjectSettings.BUILD) - buildDir = os.path.join(str(waitForObject(":Qt Creator_Utils::BuildDirectoryLineEdit").text), - "debug") - switchViewTo(ViewConstants.EDIT) - allowAppThroughWinFW(buildDir, projectName, None) clickButton(waitForObject(":*Qt Creator.Start Debugging_Core::Internal::FancyToolButton")) handleDebuggerWarnings(config, isMsvc) waitForObject(":Qt Creator.DebugModeWidget_QSplitter") @@ -118,5 +111,3 @@ def performDebugging(projectName, checkedTargets): clickButton(waitForObject(":*Qt Creator.Continue_Core::Internal::FancyToolButton")) __handleAppOutputWaitForDebuggerFinish__() removeOldBreakpoints() - if platform.system() in ('Microsoft' 'Windows'): - deleteAppFromWinFW(buildDir, projectName, None) diff --git a/tests/system/suite_debugger/tst_qml_locals/test.py b/tests/system/suite_debugger/tst_qml_locals/test.py index 8431558d02..d78e02d48f 100644 --- a/tests/system/suite_debugger/tst_qml_locals/test.py +++ b/tests/system/suite_debugger/tst_qml_locals/test.py @@ -60,14 +60,6 @@ def main(): ensureChecked("{container=':Qt Creator.scrollArea_QScrollArea' text='Enable QML' " "type='QCheckBox' unnamed='1' visible='1'}") switchViewTo(ViewConstants.EDIT) - if platform.system() in ('Microsoft', 'Windows'): - qmake = getQtInformationForQmlProject() - if qmake == None: - earlyExit("Could not figure out which qmake is used.") - return - qmlScenePath = os.path.abspath(os.path.dirname(qmake)) - qmlScene = "qmlscene.exe" - allowAppThroughWinFW(qmlScenePath, qmlScene, None) clickButton(fancyDebugButton) locAndExprTV = waitForObject(":Locals and Expressions_Debugger::Internal::WatchTreeView") # Locals and Expressions populates treeview only on demand - so the tree must be expanded @@ -96,8 +88,6 @@ def main(): subItem = items checkForExpectedValues(subItem, current[2], current[3]) clickButton(waitForObject(':Debugger Toolbar.Exit Debugger_QToolButton', 5000)) - if platform.system() in ('Microsoft', 'Windows'): - deleteAppFromWinFW(qmlScenePath, qmlScene) invokeMenuItem("File", "Exit") def __unfoldTree__(): diff --git a/tests/system/suite_debugger/tst_simple_analyze/test.py b/tests/system/suite_debugger/tst_simple_analyze/test.py index 919672f667..c1578ee55d 100644 --- a/tests/system/suite_debugger/tst_simple_analyze/test.py +++ b/tests/system/suite_debugger/tst_simple_analyze/test.py @@ -75,13 +75,6 @@ def performTest(workingDir, projectName, targetCount, availableConfigs): if not checkCompile(): test.fatal("Compile had errors... Skipping current build config") continue - if platform.system() in ('Microsoft' 'Windows'): - switchViewTo(ViewConstants.PROJECTS) - switchToBuildOrRunSettingsFor(targetCount, kit, ProjectSettings.BUILD) - buildDir = os.path.join(str(waitForObject(":Qt Creator_Utils::BuildDirectoryLineEdit").text), - "debug") - switchViewTo(ViewConstants.EDIT) - allowAppThroughWinFW(buildDir, projectName, None) switchViewTo(ViewConstants.DEBUG) selectFromCombo(":Analyzer Toolbar.AnalyzerManagerToolBox_QComboBox", "QML Profiler") recordButton = waitForObject("{container=':DebugModeWidget.Toolbar_QDockWidget' " @@ -131,8 +124,6 @@ def performTest(workingDir, projectName, targetCount, availableConfigs): elif str(model.index(row, colCalls).data()) == "2": test.compare(model.index(row, colMedian).data(), model.index(row, colLongest).data(), "For two calls, median and longest time must be the same.") - if platform.system() in ('Microsoft' 'Windows'): - deleteAppFromWinFW(buildDir, projectName, None) progressBarWait(15000, False) # wait for "Build" progressbar to disappear clickButton(waitForObject(":Analyzer Toolbar.Clear_QToolButton")) test.verify(waitFor("model.rowCount() == 0", 3000), "Analyzer results cleared.") |