| 92 | } |
| 93 | |
| 94 | static void test() |
| 95 | { |
| 96 | LaunchOptions options; |
| 97 | options.setUiMode(LaunchOptions::NoUi); |
| 98 | // setting the probe is not strictly needed but we silence a runtime warning this way |
| 99 | options.setProbeABI(ProbeFinder::listProbeABIs().at(0)); |
| 100 | options.setWorkingDirectory(QCoreApplication::applicationDirPath()); |
| 101 | options.setLaunchArguments(QStringList() << QCoreApplication::applicationDirPath() + QStringLiteral("/sleep") << QStringLiteral("1")); |
| 102 | options.setProbeSetting(QStringLiteral("ServerAddress"), GAMMARAY_DEFAULT_LOCAL_TCP_URL); |
| 103 | Launcher launcher(options); |
| 104 | |
| 105 | QSignalSpy spy(&launcher, &Launcher::finished); |
| 106 | |
| 107 | QVERIFY(launcher.start()); |
| 108 | |
| 109 | spy.wait(10000); |
| 110 | |
| 111 | QCOMPARE(spy.size(), 1); |
| 112 | } |
| 113 | |
| 114 | void testStop_data() |
| 115 | { |
nothing calls this directly
no test coverage detected