From 125995b2cdc9e9b82e1ca21d40c171f912efd206 Mon Sep 17 00:00:00 2001 From: Alexey Bader Date: Fri, 12 Jul 2019 12:48:43 +0000 Subject: [PATCH] [LIT] Emit timeout error message only if timeout was reached Summary: This improves readability of LIT output: previously error messages gets emitted that say that there was no error: error: command reached timeout: False Patch by Alexey Sachkov. Reviewers: ddunbar, mgorny, modocache Reviewed By: mgorny Subscribers: delcypher, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D64240 llvm-svn: 365895 --- utils/lit/lit/TestRunner.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/lit/lit/TestRunner.py b/utils/lit/lit/TestRunner.py index 69fa4e0d47b..ac627d51c1c 100644 --- a/utils/lit/lit/TestRunner.py +++ b/utils/lit/lit/TestRunner.py @@ -1119,7 +1119,7 @@ def executeScriptInternal(test, litConfig, tmpBase, commands, cwd): codeStr = str(result.exitCode) out += "error: command failed with exit status: %s\n" % ( codeStr,) - if litConfig.maxIndividualTestTime > 0: + if litConfig.maxIndividualTestTime > 0 and result.timeoutReached: out += 'error: command reached timeout: %s\n' % ( str(result.timeoutReached),)