diff --git a/test_common/harness/testHarness.cpp b/test_common/harness/testHarness.cpp index 6b4c7201..5d96c43f 100644 --- a/test_common/harness/testHarness.cpp +++ b/test_common/harness/testHarness.cpp @@ -713,20 +713,20 @@ int parseAndCallCommandLineTests(int argc, const char *argv[], ret = saveResultsToJson(filename, argv[0], testList, selectedTestList, resultTestList, testNum); } - } - if (std::any_of(resultTestList, resultTestList + testNum, - [](test_status result) { - switch (result) - { - case TEST_PASS: - case TEST_SKIP: return false; - case TEST_FAIL: - default: return true; - }; - })) - { - ret = EXIT_FAILURE; + if (std::any_of(resultTestList, resultTestList + testNum, + [](test_status result) { + switch (result) + { + case TEST_PASS: + case TEST_SKIP: return false; + case TEST_FAIL: + default: return true; + }; + })) + { + ret = EXIT_FAILURE; + } } free(selectedTestList);