| 47 | }; |
| 48 | |
| 49 | const InvokeResult QtTestStep::invokeStepBody() { |
| 50 | const TemporaryFileWrapper file{}; |
| 51 | if (!file.exists()) { |
| 52 | return InvokeResult::failure("Unable to open temporary file needed for this test"); |
| 53 | } |
| 54 | |
| 55 | QtTestObject testObject{this}; |
| 56 | const QStringList args{"test", "-o", file.name() + ",tap"}; |
| 57 | const int returnValue = QTest::qExec(&testObject, args); |
| 58 | |
| 59 | if (returnValue == 0) { |
| 60 | return InvokeResult::success(); |
| 61 | } else { |
| 62 | return InvokeResult::failure(file.read().toLocal8Bit()); |
| 63 | } |
| 64 | } |
| 65 | |
| 66 | } |
| 67 | } |