diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-05-23 14:43:26 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-05-23 14:43:26 +0200 |
commit | c9f26c4cbca654417d304c9214aa3a7709631159 (patch) | |
tree | fd19cab23dbea2364f6c381d67d68fdd943f63a2 /common/resourceaccess.cpp | |
parent | 422950c63f830e4d01315afc37d0144f79bf10db (diff) | |
download | sink-c9f26c4cbca654417d304c9214aa3a7709631159.tar.gz sink-c9f26c4cbca654417d304c9214aa3a7709631159.zip |
Propagate test-mode to resources.
This way we can run tests in completely separate data-directories.
Diffstat (limited to 'common/resourceaccess.cpp')
-rw-r--r-- | common/resourceaccess.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/common/resourceaccess.cpp b/common/resourceaccess.cpp index b294221..6dcc898 100644 --- a/common/resourceaccess.cpp +++ b/common/resourceaccess.cpp | |||
@@ -33,6 +33,7 @@ | |||
33 | #include "common/inspection_generated.h" | 33 | #include "common/inspection_generated.h" |
34 | #include "common/entitybuffer.h" | 34 | #include "common/entitybuffer.h" |
35 | #include "common/bufferutils.h" | 35 | #include "common/bufferutils.h" |
36 | #include "common/test.h" | ||
36 | #include "log.h" | 37 | #include "log.h" |
37 | 38 | ||
38 | #include <QCoreApplication> | 39 | #include <QCoreApplication> |
@@ -204,6 +205,9 @@ KAsync::Job<void> ResourceAccess::Private::initializeSocket() | |||
204 | TracePrivate() << "Failed to connect, starting resource"; | 205 | TracePrivate() << "Failed to connect, starting resource"; |
205 | // We failed to connect, so let's start the resource | 206 | // We failed to connect, so let's start the resource |
206 | QStringList args; | 207 | QStringList args; |
208 | if (Sink::Test::testModeEnabled()) { | ||
209 | args << "--test"; | ||
210 | } | ||
207 | args << resourceInstanceIdentifier << resourceName; | 211 | args << resourceInstanceIdentifier << resourceName; |
208 | qint64 pid = 0; | 212 | qint64 pid = 0; |
209 | if (QProcess::startDetached("sink_synchronizer", args, QDir::homePath(), &pid)) { | 213 | if (QProcess::startDetached("sink_synchronizer", args, QDir::homePath(), &pid)) { |