| 7 | namespace build_style |
| 8 | { |
| 9 | std::pair<bool, QString> RunCurrentStyleTests() |
| 10 | { |
| 11 | QString const program = GetExternalPath("style_tests", "style_tests.app/Contents/MacOS", ""); |
| 12 | QString const resourcesDir = QString::fromStdString(GetPlatform().ResourcesDir()); |
| 13 | QString const output = ExecProcess(program, { |
| 14 | "--user_resource_path=" + resourcesDir, |
| 15 | "--data_path=" + resourcesDir, |
| 16 | }); |
| 17 | |
| 18 | // Unfortunately test process returns 0 even if some test failed, |
| 19 | // therefore phrase 'All tests passed.' is looked to be sure that everything is OK. |
| 20 | return std::make_pair(output.contains("All tests passed."), output); |
| 21 | } |
| 22 | } // namespace build_style |
no test coverage detected