diff --git a/src/plugins/cmakeprojectmanager/builddirmanager.cpp b/src/plugins/cmakeprojectmanager/builddirmanager.cpp index 701e32bc464..2299141d9b8 100644 --- a/src/plugins/cmakeprojectmanager/builddirmanager.cpp +++ b/src/plugins/cmakeprojectmanager/builddirmanager.cpp @@ -64,29 +64,29 @@ namespace Internal { static QStringList toArguments(const CMakeConfig &config, const ProjectExplorer::Kit *k) { return Utils::transform(config, [k](const CMakeConfigItem &i) -> QString { - QString a = QString::fromLatin1("-D"); - a.append(QString::fromUtf8(i.key)); - switch (i.type) { - case CMakeConfigItem::FILEPATH: - a.append(QLatin1String(":FILEPATH=")); - break; - case CMakeConfigItem::PATH: - a.append(QLatin1String(":PATH=")); - break; - case CMakeConfigItem::BOOL: - a.append(QLatin1String(":BOOL=")); - break; - case CMakeConfigItem::STRING: - a.append(QLatin1String(":STRING=")); - break; - case CMakeConfigItem::INTERNAL: - a.append(QLatin1String(":INTERNAL=")); - break; - } - a.append(i.expandedValue(k)); + QString a = QString::fromLatin1("-D"); + a.append(QString::fromUtf8(i.key)); + switch (i.type) { + case CMakeConfigItem::FILEPATH: + a.append(QLatin1String(":FILEPATH=")); + break; + case CMakeConfigItem::PATH: + a.append(QLatin1String(":PATH=")); + break; + case CMakeConfigItem::BOOL: + a.append(QLatin1String(":BOOL=")); + break; + case CMakeConfigItem::STRING: + a.append(QLatin1String(":STRING=")); + break; + case CMakeConfigItem::INTERNAL: + a.append(QLatin1String(":INTERNAL=")); + break; + } + a.append(i.expandedValue(k)); - return a; - }); + return a; + }); } // -------------------------------------------------------------------- diff --git a/src/plugins/debugger/debuggerengine.cpp b/src/plugins/debugger/debuggerengine.cpp index eb87111835c..77687b6336f 100644 --- a/src/plugins/debugger/debuggerengine.cpp +++ b/src/plugins/debugger/debuggerengine.cpp @@ -1280,6 +1280,7 @@ void DebuggerEngine::setState(DebuggerState state, bool forced) bp.notifyBreakpointReleased(); DebuggerToolTipManager::deregisterEngine(this); d->m_memoryAgent.handleDebuggerFinished(); + prepareForRestart(); } showMessage(msg, LogDebug); diff --git a/src/plugins/debugger/debuggerengine.h b/src/plugins/debugger/debuggerengine.h index 110bd826c8e..9b430a628f1 100644 --- a/src/plugins/debugger/debuggerengine.h +++ b/src/plugins/debugger/debuggerengine.h @@ -204,6 +204,7 @@ public: virtual void selectWatchData(const QByteArray &iname); virtual void startDebugger(DebuggerRunControl *runControl); + virtual void prepareForRestart() {} virtual void watchPoint(const QPoint &); diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp index d95b6fe172e..83e1de521f7 100644 --- a/src/plugins/debugger/gdb/gdbengine.cpp +++ b/src/plugins/debugger/gdb/gdbengine.cpp @@ -4300,6 +4300,14 @@ void GdbEngine::notifyInferiorSetupFailed() DebuggerEngine::notifyInferiorSetupFailed(); } +void GdbEngine::prepareForRestart() +{ + m_rerunPending = false; + m_commandsDoneCallback = 0; + m_commandForToken.clear(); + m_flagsForToken.clear(); +} + void GdbEngine::handleInferiorPrepared() { const DebuggerRunParameters &rp = runParameters(); diff --git a/src/plugins/debugger/gdb/gdbengine.h b/src/plugins/debugger/gdb/gdbengine.h index 90c227f5505..0db63af932b 100644 --- a/src/plugins/debugger/gdb/gdbengine.h +++ b/src/plugins/debugger/gdb/gdbengine.h @@ -71,6 +71,7 @@ private: ////////// General Interface ////////// virtual void handleGdbStartFailed(); void notifyInferiorSetupFailed() override; + void prepareForRestart() override; bool hasCapability(unsigned) const override; void detachDebugger() override; diff --git a/src/plugins/debugger/lldb/lldbengine.cpp b/src/plugins/debugger/lldb/lldbengine.cpp index 008f6b1e71a..3d337901bac 100644 --- a/src/plugins/debugger/lldb/lldbengine.cpp +++ b/src/plugins/debugger/lldb/lldbengine.cpp @@ -87,19 +87,6 @@ LldbEngine::LldbEngine(const DebuggerRunParameters &startParameters) m_lastAgentId = 0; setObjectName(QLatin1String("LldbEngine")); - if (startParameters.useTerminal) { - #ifdef Q_OS_WIN - // Windows up to xp needs a workaround for attaching to freshly started processes. see proc_stub_win - if (QSysInfo::WindowsVersion >= QSysInfo::WV_VISTA) - m_stubProc.setMode(ConsoleProcess::Suspend); - else - m_stubProc.setMode(ConsoleProcess::Debug); - #else - m_stubProc.setMode(ConsoleProcess::Debug); - m_stubProc.setSettings(ICore::settings()); - #endif - } - connect(action(AutoDerefPointers), &SavedAction::valueChanged, this, &LldbEngine::updateLocals); connect(action(CreateFullBacktrace), &QAction::triggered, @@ -192,7 +179,26 @@ bool LldbEngine::prepareCommand() void LldbEngine::setupEngine() { + // FIXME: We can't handle terminals yet. if (runParameters().useTerminal) { + qWarning("Run in Terminal is not supported yet with the LLDB backend"); + showMessage(tr("Run in Terminal is not supported yet with the LLDB backend"), AppError); + runParameters().useTerminal = false; + } + + if (runParameters().useTerminal) { + QTC_CHECK(false); // See above. + #ifdef Q_OS_WIN + // Windows up to xp needs a workaround for attaching to freshly started processes. see proc_stub_win + if (QSysInfo::WindowsVersion >= QSysInfo::WV_VISTA) + m_stubProc.setMode(ConsoleProcess::Suspend); + else + m_stubProc.setMode(ConsoleProcess::Debug); + #else + m_stubProc.setMode(ConsoleProcess::Debug); + m_stubProc.setSettings(ICore::settings()); + #endif + QTC_ASSERT(state() == EngineSetupRequested, qDebug() << state()); showMessage(_("TRYING TO START ADAPTER")); diff --git a/src/plugins/qbsprojectmanager/qbslogsink.cpp b/src/plugins/qbsprojectmanager/qbslogsink.cpp index 30c1f3780c1..2b28dd1c207 100644 --- a/src/plugins/qbsprojectmanager/qbslogsink.cpp +++ b/src/plugins/qbsprojectmanager/qbslogsink.cpp @@ -79,6 +79,10 @@ void QbsLogSink::doPrintMessage(qbs::LoggerLevel level, const QString &message, { QMutexLocker l(&m_mutex); + if (level <= qbs::LoggerWarning) { + doPrintWarning(qbs::ErrorInfo(message)); + return; + } m_messages.append(qbs::logLevelTag(level) + message); } QMetaObject::invokeMethod(this, "sendMessages", Qt::QueuedConnection); diff --git a/src/plugins/qbsprojectmanager/qbsprojectmanager.cpp b/src/plugins/qbsprojectmanager/qbsprojectmanager.cpp index d2afdd1eb6e..23bf11a09c3 100644 --- a/src/plugins/qbsprojectmanager/qbsprojectmanager.cpp +++ b/src/plugins/qbsprojectmanager/qbsprojectmanager.cpp @@ -77,7 +77,7 @@ QbsManager::QbsManager() : m_defaultPropertyProvider(new DefaultPropertyProvider this, &QbsManager::updateAllProfiles); m_logSink = new QbsLogSink(this); - int level = qbs::LoggerWarning; + int level = qbs::LoggerInfo; const QString levelEnv = QString::fromLocal8Bit(qgetenv("QBS_LOG_LEVEL")); if (!levelEnv.isEmpty()) { bool ok = false; diff --git a/src/plugins/qbsprojectmanager/qbsprojectparser.cpp b/src/plugins/qbsprojectmanager/qbsprojectparser.cpp index af53e1bce80..d477062341e 100644 --- a/src/plugins/qbsprojectmanager/qbsprojectparser.cpp +++ b/src/plugins/qbsprojectmanager/qbsprojectparser.cpp @@ -59,18 +59,18 @@ QbsProjectParser::QbsProjectParser(QbsProject *project, QFutureInterface * QbsProjectParser::~QbsProjectParser() { - if (m_qbsSetupProjectJob) { - m_qbsSetupProjectJob->disconnect(this); - m_qbsSetupProjectJob->cancel(); - m_qbsSetupProjectJob->deleteLater(); - m_qbsSetupProjectJob = 0; - } - if (m_ruleExecutionJob) { - m_ruleExecutionJob->disconnect(this); - m_ruleExecutionJob->cancel(); - m_ruleExecutionJob->deleteLater(); - m_ruleExecutionJob = 0; - } + const auto deleteJob = [this](qbs::AbstractJob *job) { + if (!job) + return; + if (job->state() == qbs::AbstractJob::StateFinished) { + job->deleteLater(); + return; + } + connect(job, &qbs::AbstractJob::finished, job, &qbs::AbstractJob::deleteLater); + job->cancel(); + }; + deleteJob(m_qbsSetupProjectJob); + deleteJob(m_ruleExecutionJob); m_fi = 0; // we do not own m_fi, do not delete } @@ -93,7 +93,8 @@ void QbsProjectParser::parse(const QVariantMap &config, const Environment &env, // Some people don't like it when files are created as a side effect of opening a project, // so do not store the build graph if the build directory does not exist yet. - params.setDryRun(!QFileInfo::exists(dir)); + m_dryRun = !QFileInfo::exists(dir); + params.setDryRun(m_dryRun); params.setBuildRoot(dir); params.setProjectFilePath(m_projectFilePath); @@ -151,6 +152,7 @@ void QbsProjectParser::handleQbsParsingDone(bool success) void QbsProjectParser::startRuleExecution() { qbs::BuildOptions options; + options.setDryRun(m_dryRun); options.setExecuteRulesOnly(true); m_ruleExecutionJob = m_project.buildAllProducts( options, qbs::Project::ProductSelectionWithNonDefault, this); diff --git a/src/plugins/qbsprojectmanager/qbsprojectparser.h b/src/plugins/qbsprojectmanager/qbsprojectparser.h index d354a660790..82b45196d7b 100644 --- a/src/plugins/qbsprojectmanager/qbsprojectparser.h +++ b/src/plugins/qbsprojectmanager/qbsprojectparser.h @@ -74,6 +74,7 @@ private: qbs::BuildJob *m_ruleExecutionJob; qbs::ErrorInfo m_error; qbs::Project m_project; + bool m_dryRun; QFutureInterface *m_fi; int m_currentProgressBase; diff --git a/src/plugins/qmlprofiler/flamegraph.cpp b/src/plugins/qmlprofiler/flamegraph.cpp index 9d6cac7baf2..ff57db5eb57 100644 --- a/src/plugins/qmlprofiler/flamegraph.cpp +++ b/src/plugins/qmlprofiler/flamegraph.cpp @@ -127,7 +127,8 @@ QObject *FlameGraph::appendChild(QObject *parentObject, QQuickItem *parentItem, } -int FlameGraph::buildNode(const QModelIndex &parentIndex, QObject *parentObject, int depth) +int FlameGraph::buildNode(const QModelIndex &parentIndex, QObject *parentObject, int depth, + int maximumDepth) { qreal position = 0; qreal skipped = 0; @@ -136,18 +137,23 @@ int FlameGraph::buildNode(const QModelIndex &parentIndex, QObject *parentObject, QQmlContext *context = qmlContext(this); int rowCount = m_model->rowCount(parentIndex); int childrenDepth = depth; - for (int row = 0; row < rowCount; ++row) { - QModelIndex childIndex = m_model->index(row, 0, parentIndex); - qreal size = m_model->data(childIndex, m_sizeRole).toReal(); - if (size / m_model->data(QModelIndex(), m_sizeRole).toReal() < m_sizeThreshold) { - skipped += size; - continue; - } + if (depth == maximumDepth - 1) { + skipped = parentSize; + } else { + for (int row = 0; row < rowCount; ++row) { + QModelIndex childIndex = m_model->index(row, 0, parentIndex); + qreal size = m_model->data(childIndex, m_sizeRole).toReal(); + if (size / m_model->data(QModelIndex(), m_sizeRole).toReal() < m_sizeThreshold) { + skipped += size; + continue; + } - QObject *childObject = appendChild(parentObject, parentItem, context, childIndex, - position / parentSize, size / parentSize); - position += size; - childrenDepth = qMax(childrenDepth, buildNode(childIndex, childObject, depth + 1)); + QObject *childObject = appendChild(parentObject, parentItem, context, childIndex, + position / parentSize, size / parentSize); + position += size; + childrenDepth = qMax(childrenDepth, buildNode(childIndex, childObject, depth + 1, + maximumDepth)); + } } if (skipped > 0) { @@ -170,7 +176,7 @@ void FlameGraph::rebuild() return; } - m_depth = buildNode(QModelIndex(), this, 0); + m_depth = buildNode(QModelIndex(), this, 0, m_maximumDepth); emit depthChanged(m_depth); } diff --git a/src/plugins/qmlprofiler/flamegraph.h b/src/plugins/qmlprofiler/flamegraph.h index 3feec5c9ebe..18550359bad 100644 --- a/src/plugins/qmlprofiler/flamegraph.h +++ b/src/plugins/qmlprofiler/flamegraph.h @@ -108,6 +108,8 @@ class FlameGraph : public QQuickItem Q_PROPERTY(int sizeRole READ sizeRole WRITE setSizeRole NOTIFY sizeRoleChanged) Q_PROPERTY(qreal sizeThreshold READ sizeThreshold WRITE setSizeThreshold NOTIFY sizeThresholdChanged) + Q_PROPERTY(int maximumDepth READ maximumDepth WRITE setMaximumDepth + NOTIFY maximumDepthChanged) Q_PROPERTY(int depth READ depth NOTIFY depthChanged) public: @@ -127,6 +129,19 @@ public: int depth() const; + int maximumDepth() const + { + return m_maximumDepth; + } + + void setMaximumDepth(int maximumDepth) + { + if (maximumDepth != m_maximumDepth) { + m_maximumDepth = maximumDepth; + emit maximumDepthChanged(); + } + } + static FlameGraphAttached *qmlAttachedProperties(QObject *object); signals: @@ -135,6 +150,7 @@ signals: void sizeRoleChanged(int role); void sizeThresholdChanged(qreal threshold); void depthChanged(int depth); + void maximumDepthChanged(); private slots: void rebuild(); @@ -145,8 +161,10 @@ private: int m_sizeRole = 0; int m_depth = 0; qreal m_sizeThreshold = 0; + int m_maximumDepth = std::numeric_limits::max(); - int buildNode(const QModelIndex &parentIndex, QObject *parentObject, int depth); + int buildNode(const QModelIndex &parentIndex, QObject *parentObject, int depth, + int maximumDepth); QObject *appendChild(QObject *parentObject, QQuickItem *parentItem, QQmlContext *context, const QModelIndex &childIndex, qreal position, qreal size); }; diff --git a/src/plugins/qmlprofiler/qml/FlameGraphView.qml b/src/plugins/qmlprofiler/qml/FlameGraphView.qml index 9dd3387f968..7a2e63c1b1c 100644 --- a/src/plugins/qmlprofiler/qml/FlameGraphView.qml +++ b/src/plugins/qmlprofiler/qml/FlameGraphView.qml @@ -61,6 +61,7 @@ ScrollView { model: flameGraphModel sizeRole: FlameGraphModel.DurationRole sizeThreshold: 0.002 + maximumDepth: 25 y: flickable.height > height ? flickable.height - height : 0 delegate: Item { diff --git a/src/shared/qbs b/src/shared/qbs index e936ead98d5..9d28325c404 160000 --- a/src/shared/qbs +++ b/src/shared/qbs @@ -1 +1 @@ -Subproject commit e936ead98d58e3b54e0b3b3f89b93be2caa5206e +Subproject commit 9d28325c404a87757c61b7dba10f54b43c28cd11 diff --git a/tests/system/shared/hook_utils.py b/tests/system/shared/hook_utils.py index 89b1d6b230a..16314fe50fc 100644 --- a/tests/system/shared/hook_utils.py +++ b/tests/system/shared/hook_utils.py @@ -179,10 +179,10 @@ def __getMkspecFromQMakeConf__(qmakeConf): return os.path.basename(mkspec) def __getMkspecFromQmake__(qmakeCall): - if getOutputFromCmdline("%s -query QT_VERSION" % qmakeCall).strip().startswith("5."): - return getOutputFromCmdline("%s -query QMAKE_XSPEC" % qmakeCall).strip() + if getOutputFromCmdline([qmakeCall, "-query", "QT_VERSION"]).strip().startswith("5."): + return getOutputFromCmdline([qmakeCall, "-query", "QMAKE_XSPEC"]).strip() else: - QmakeConfPath = getOutputFromCmdline("%s -query QMAKE_MKSPECS" % qmakeCall).strip() + QmakeConfPath = getOutputFromCmdline([qmakeCall, "-query", "QMAKE_MKSPECS"]).strip() for tmpPath in QmakeConfPath.split(os.pathsep): tmpPath = tmpPath + os.sep + "default" + os.sep +"qmake.conf" result = __getMkspecFromQMakeConf__(tmpPath) @@ -326,7 +326,7 @@ def __isWinFirewallRunning__(): if not platform.system() in ('Microsoft' 'Windows'): __isWinFirewallRunning__.fireWallState = False return False - result = getOutputFromCmdline("netsh firewall show state") + result = getOutputFromCmdline(["netsh", "firewall", "show", "state"]) for line in result.splitlines(): if "Operational mode" in line: __isWinFirewallRunning__.fireWallState = not "Disable" in line diff --git a/tests/system/shared/project_explorer.py b/tests/system/shared/project_explorer.py index c98421788fb..5103d72269a 100644 --- a/tests/system/shared/project_explorer.py +++ b/tests/system/shared/project_explorer.py @@ -277,7 +277,7 @@ def getQtInformationByQMakeCall(qtDir, which): else: test.fatal("You're trying to fetch an unknown information (%s)" % which) return None - return getOutputFromCmdline("%s -query %s" % (qmake, query)).strip() + return getOutputFromCmdline([qmake, "-query", query]).strip() def invokeContextMenuOnProject(projectName, menuItem): try: diff --git a/tests/system/shared/qtcreator.py b/tests/system/shared/qtcreator.py index c9d2ee27826..b33d5f6170d 100644 --- a/tests/system/shared/qtcreator.py +++ b/tests/system/shared/qtcreator.py @@ -118,7 +118,8 @@ def waitForCleanShutdown(timeOut=10): if not shutdownDone and datetime.utcnow() > endtime: break if platform.system() == 'Linux' and JIRA.isBugStillOpen(15749): - pgrepOutput = getOutputFromCmdline('pgrep -f qtcreator_process_stub') + pgrepOutput = getOutputFromCmdline(["pgrep", "-f", "qtcreator_process_stub"], + acceptedError=1) pids = pgrepOutput.splitlines() if len(pids): print("Killing %d qtcreator_process_stub instances" % len(pids)) diff --git a/tests/system/shared/utils.py b/tests/system/shared/utils.py index 85cfb2f096d..bdd64fcdcd8 100644 --- a/tests/system/shared/utils.py +++ b/tests/system/shared/utils.py @@ -139,7 +139,7 @@ def which(program): command = "where" else: command = "which" - foundPath = getOutputFromCmdline(command + " " + program) + foundPath = getOutputFromCmdline([command, program], acceptedError=1) if foundPath: return foundPath.splitlines()[0] else: @@ -216,11 +216,12 @@ def logApplicationOutput(): return None # get the output from a given cmdline call -def getOutputFromCmdline(cmdline): +def getOutputFromCmdline(cmdline, environment=None, acceptedError=0): try: - return subprocess.check_output(cmdline, shell=True) # TODO: do not use shell=True + return subprocess.check_output(cmdline, env=environment) except subprocess.CalledProcessError as e: - test.warning("Command '%s' returned %d" % (e.cmd, e.returncode)) + if e.returncode != acceptedError: + test.warning("Command '%s' returned %d" % (e.cmd, e.returncode)) return e.output def selectFromFileDialog(fileName, waitForFile=False): diff --git a/tests/system/shared/workarounds.py b/tests/system/shared/workarounds.py index ae9cc9609a1..d0a7ab0145d 100644 --- a/tests/system/shared/workarounds.py +++ b/tests/system/shared/workarounds.py @@ -224,16 +224,18 @@ class JIRA: def __tryExternalTools__(self, proxy=None): global JIRA_URL if proxy: - cmdAndArgs = { 'curl':'-k --proxy %s' % proxy, - 'wget':'-qO-'} + cmdAndArgs = { 'curl':['-k', '--proxy', proxy], + 'wget':['-qO-']} else: - cmdAndArgs = { 'curl':'-k', 'wget':'-qO-' } + cmdAndArgs = { 'curl':['-k'], 'wget':['-qO-']} for call in cmdAndArgs: prog = which(call) if prog: if call == 'wget' and proxy and os.getenv("https_proxy", None) == None: test.warning("Missing environment variable https_proxy for using wget with proxy!") - return getOutputFromCmdline('"%s" %s %s/%s-%d' % (prog, cmdAndArgs[call], JIRA_URL, self._bugType, self._number)) + cmdline = [prog] + cmdAndArgs[call] + cmdline += ['%s/%s-%d' % (JIRA_URL, self._bugType, self._number)] + return getOutputFromCmdline(cmdline) return None # this function crops multiple whitespaces from fetched and searches for expected diff --git a/tests/system/suite_debugger/tst_simple_analyze/testdata/events_qt5.tsv b/tests/system/suite_debugger/tst_simple_analyze/testdata/events_qt5.tsv index 3cc221462a9..b7422391d58 100644 --- a/tests/system/suite_debugger/tst_simple_analyze/testdata/events_qt5.tsv +++ b/tests/system/suite_debugger/tst_simple_analyze/testdata/events_qt5.tsv @@ -1,15 +1,15 @@ "0" "1" "6" "11" "" "" "1" "Main Program" "main.qml:4" "Create" "2" "QtQuick.Window/Window" -"main.qml:12" "Signal" "2" "onTriggered: { runCount += 1; var i; for (i = 1; i < 2500; ++i) { var j = i * i; console.log(j); } }" -"main.qml:12" "JavaScript" "2" "onTriggered" -"main.qml:30" "Create" "2" "QtQuick/Text" +"main.qml:15" "Signal" "2" "onTriggered: { runCount += 1; var i; for (i = 1; i < 2500; ++i) { var j = i * i; console.log(j); } }" +"main.qml:15" "JavaScript" "2" "onTriggered" +"main.qml:33" "Create" "2" "QtQuick/Text" "main.qml:1" "Compile" "1" "main.qml" -"main.qml:7" "Create" "2" "QtQuick/Timer" -"main.qml:32" "Binding" "1" "anchors.centerIn: parent" -"main.qml:23" "Create" "2" "QtQuick/MouseArea" -"main.qml:11" "Binding" "3" "running: runCount < 2" -"main.qml:32" "JavaScript" "1" "expression for centerIn" -"main.qml:24" "Binding" "1" "anchors.fill: parent" -"main.qml:11" "JavaScript" "3" "expression for running" -"main.qml:24" "JavaScript" "1" "expression for fill" +"main.qml:10" "Create" "2" "QtQuick/Timer" +"main.qml:35" "Binding" "1" "anchors.centerIn: parent" +"main.qml:26" "Create" "2" "QtQuick/MouseArea" +"main.qml:14" "Binding" "3" "running: runCount < 2" +"main.qml:35" "JavaScript" "1" "expression for centerIn" +"main.qml:27" "Binding" "1" "anchors.fill: parent" +"main.qml:14" "JavaScript" "3" "expression for running" +"main.qml:27" "JavaScript" "1" "expression for fill" diff --git a/tests/system/suite_debugger/tst_simple_debug/test.py b/tests/system/suite_debugger/tst_simple_debug/test.py index 205ef99cfca..43f1e720992 100644 --- a/tests/system/suite_debugger/tst_simple_debug/test.py +++ b/tests/system/suite_debugger/tst_simple_debug/test.py @@ -51,7 +51,7 @@ def main(): result = setBreakpointsForCurrentProject(filesAndLines) if result: expectedBreakpointsOrder = [{os.path.join(workingDir, projectName, "main.cpp"):8}, - {os.path.join(workingDir, projectName, "main.qml"):10}] + {os.path.join(workingDir, projectName, "main.qml"):13}] # Only use 4.7.4 to work around QTBUG-25187 availableConfigs = iterateBuildConfigs(len(checkedTargets), "Debug") progressBarWait() diff --git a/tests/system/suite_general/tst_default_settings/test.py b/tests/system/suite_general/tst_default_settings/test.py index b7bc5f41daf..1568c6e114a 100644 --- a/tests/system/suite_general/tst_default_settings/test.py +++ b/tests/system/suite_general/tst_default_settings/test.py @@ -165,7 +165,7 @@ def __getExpectedCompilers__(): if platform.system() in ('Linux', 'Darwin'): compilers.extend(["g++-4.0", "g++-4.2", "clang++"]) if platform.system() == 'Darwin': - xcodeClang = getOutputFromCmdline("xcrun --find clang++").strip("\n") + xcodeClang = getOutputFromCmdline(["xcrun", "--find", "clang++"]).strip("\n") if xcodeClang and os.path.exists(xcodeClang) and xcodeClang not in expected: expected.append(xcodeClang) for compiler in compilers: @@ -217,7 +217,7 @@ def __getExpectedDebuggers__(): result.extend(filter(lambda s: not ("lldb-platform" in s or "lldb-gdbserver" in s), findAllFilesInPATH("lldb-*"))) if platform.system() == 'Darwin': - xcodeLLDB = getOutputFromCmdline("xcrun --find lldb").strip("\n") + xcodeLLDB = getOutputFromCmdline(["xcrun", "--find", "lldb"]).strip("\n") if xcodeLLDB and os.path.exists(xcodeLLDB) and xcodeLLDB not in result: result.append(xcodeLLDB) return result diff --git a/tests/system/suite_tools/tst_external_sort/test.py b/tests/system/suite_tools/tst_external_sort/test.py index 68d36841eab..95d8d93126e 100644 --- a/tests/system/suite_tools/tst_external_sort/test.py +++ b/tests/system/suite_tools/tst_external_sort/test.py @@ -31,10 +31,10 @@ def main(): return invokeMenuItem("File", "Open File or Project...") unsortedFile = os.path.join(os.getcwd(), "testdata", "unsorted.txt") - locale = "" + locale = None if not platform.system() in ('Windows', 'Microsoft'): - locale = "LC_ALL=C " - sorted = getOutputFromCmdline("%ssort %s" % (locale, unsortedFile)).replace("\r", "") + locale = {"LC_ALL":"C"} + sorted = getOutputFromCmdline(["sort", unsortedFile], locale).replace("\r", "") selectFromFileDialog(unsortedFile) editor = waitForObject("{type='TextEditor::TextEditorWidget' unnamed='1' " "visible='1' window=':Qt Creator_Core::Internal::MainWindow'}", 3000)