File: manualtesting.cpp

package info (click to toggle)
syncthingtray 1.7.5-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 6,804 kB
  • sloc: cpp: 31,085; xml: 1,694; java: 570; sh: 81; javascript: 53; makefile: 25
file content (30 lines) | stat: -rw-r--r-- 833 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#include "../syncthingtestinstance.h"

#include <c++utilities/tests/testutils.h>

#include <iostream>

using namespace std;
using namespace CppUtilities;

/*!
 * \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());
    //syncthingProcess.setProcessChannelMode(QProcess::ForwardedChannels);
    QObject::connect(&syncthingProcess, static_cast<void (Data::SyncthingProcess::*)(int, QProcess::ExitStatus)>(&Data::SyncthingProcess::finished),
        &QCoreApplication::exit);
    testInstance.start();

    const int res = testInstance.application().exec();
    testInstance.stop();
    return res;
}