2018-01-27 16:04:17 +01:00
|
|
|
#include "../syncthingtestinstance.h"
|
|
|
|
|
|
|
|
#include <c++utilities/tests/testutils.h>
|
|
|
|
|
|
|
|
#include <iostream>
|
|
|
|
|
|
|
|
using namespace std;
|
2019-06-10 22:48:26 +02:00
|
|
|
using namespace CppUtilities;
|
2018-01-27 16:04:17 +01:00
|
|
|
|
|
|
|
/*!
|
|
|
|
* \brief Launches a Syncthing test instance for manual testing.
|
|
|
|
*/
|
|
|
|
int main(int argc, char **argv)
|
|
|
|
{
|
|
|
|
TestApplication testApp(argc, argv);
|
|
|
|
if (!testApp) {
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
|
|
|
|
SyncthingTestInstance testInstance;
|
|
|
|
auto &syncthingProcess(testInstance.syncthingProcess());
|
2019-07-07 12:14:23 +02:00
|
|
|
syncthingProcess.setProcessChannelMode(QProcess::ForwardedChannels);
|
|
|
|
QObject::connect(&syncthingProcess, static_cast<void (QProcess::*)(int, QProcess::ExitStatus)>(&QProcess::finished), &QCoreApplication::exit);
|
2018-01-27 16:04:17 +01:00
|
|
|
testInstance.start();
|
|
|
|
|
|
|
|
const int res = testInstance.application().exec();
|
|
|
|
testInstance.stop();
|
|
|
|
return res;
|
|
|
|
}
|