forked from qt-creator/qt-creator
TaskTree test: Simplify subprocess name
Fix the qbs build.
Amends 63bfeba87f
Change-Id: I271e5059ba8becf4aade8ce21ff9f40201f3734b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
add_subdirectory(testsleep)
|
||||
|
||||
add_qtc_test(tst_qprocesstask
|
||||
DEFINES "PROCESS_TESTAPP=\"${CMAKE_CURRENT_BINARY_DIR}/testsleep\""
|
||||
DEFINES "PROCESS_TESTAPP=\"${CMAKE_CURRENT_BINARY_DIR}/testsleep/testsleep\""
|
||||
DEPENDS Tasking Qt::Network
|
||||
SOURCES tst_qprocesstask.cpp
|
||||
)
|
||||
|
@@ -15,7 +15,7 @@ Project {
|
||||
if (qbs.targetOS === "windows")
|
||||
defines.push("_CRT_SECURE_NO_WARNINGS");
|
||||
defines.push('PROCESS_TESTAPP="'
|
||||
+ FileInfo.joinPaths(destinationDirectory, "testsleep") + '"');
|
||||
+ FileInfo.joinPaths(destinationDirectory, "testsleep/testsleep") + '"');
|
||||
return defines;
|
||||
}
|
||||
destinationDirectory: project.buildDirectory + '/'
|
||||
|
@@ -9,4 +9,7 @@ QtApplication {
|
||||
files: [
|
||||
"main.cpp",
|
||||
]
|
||||
|
||||
destinationDirectory: project.buildDirectory + '/'
|
||||
+ FileInfo.relativePath(project.ide_source_tree, sourceDirectory)
|
||||
}
|
||||
|
@@ -15,16 +15,10 @@ private slots:
|
||||
void qProcessTask();
|
||||
};
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
static const char s_processName[] = "testsleep.exe";
|
||||
#else
|
||||
static const char s_processName[] = "testsleep";
|
||||
#endif
|
||||
|
||||
void tst_QProcessTask::qProcessTask()
|
||||
{
|
||||
const auto setupProcess = [](QProcess &process) {
|
||||
process.setProgram(QLatin1String(PROCESS_TESTAPP) + '/' + s_processName);
|
||||
process.setProgram(QLatin1String(PROCESS_TESTAPP));
|
||||
};
|
||||
|
||||
{
|
||||
|
Reference in New Issue
Block a user