[llvm] f32ccc2 - [lit] fix a bug in 4cd1c96d375aa
Yuanfang Chen via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 15 14:37:14 PDT 2022
Author: Yuanfang Chen
Date: 2022-07-15T14:37:06-07:00
New Revision: f32ccc2cca1df39e0f5b5aac0ec30d490104b58c
URL: https://github.com/llvm/llvm-project/commit/f32ccc2cca1df39e0f5b5aac0ec30d490104b58c
DIFF: https://github.com/llvm/llvm-project/commit/f32ccc2cca1df39e0f5b5aac0ec30d490104b58c.diff
LOG: [lit] fix a bug in 4cd1c96d375aa
Only report failure for tests that actually runs.
Added:
Modified:
llvm/utils/lit/lit/formats/googletest.py
Removed:
################################################################################
diff --git a/llvm/utils/lit/lit/formats/googletest.py b/llvm/utils/lit/lit/formats/googletest.py
index ed3a19e93982..d77547b73651 100644
--- a/llvm/utils/lit/lit/formats/googletest.py
+++ b/llvm/utils/lit/lit/formats/googletest.py
@@ -228,15 +228,16 @@ def remove_gtest(tests):
selected_tests = remove_gtest(selected_tests)
has_failure = False
for test in gtests:
- if test.isFailure():
- has_failure = True
-
- # In case gtest has bugs such that no JSON file was emitted.
+ # In case gtest has bugs such that no JSON file was emitted. Or, a selected
+ # test is not found.
if not os.path.exists(test.gtest_json_file):
selected_tests.append(test)
discovered_tests.append(test)
continue
+ if test.isFailure():
+ has_failure = True
+
start_time = test.result.start or 0.0
# Load json file to retrieve results.
More information about the llvm-commits
mailing list