Test scripts should call this function to indicate that the test failed. A note is recorded that the test did not succeed, and this note is checked later from the main thread so that CTest can be notified of the result. The main thread is the only one that can signal test failure
(testName)
| 274 | # Test scripts call this function to indicate failure of their test |
| 275 | # ============================================================================= |
| 276 | def test_fail(testName): |
| 277 | """ |
| 278 | Test scripts should call this function to indicate that the test failed. A |
| 279 | note is recorded that the test did not succeed, and this note is checked |
| 280 | later from the main thread so that CTest can be notified of the result. |
| 281 | |
| 282 | The main thread is the only one that can signal test failure in |
| 283 | CTest framework, and the main thread won't have a chance to check for |
| 284 | passage or failure of the test until the main loop has terminated. So |
| 285 | here we just record the failure result, then we check this result in the |
| 286 | processTestResults() function, throwing an exception at that point to |
| 287 | indicate to CTest that the test failed. |
| 288 | """ |
| 289 | |
| 290 | global test_module_comm_queue |
| 291 | resultObj = {testName: "fail"} |
| 292 | test_module_comm_queue.put(resultObj) |
| 293 | |
| 294 | |
| 295 | # ============================================================================= |
no test coverage detected