[PATCH] D85173: [zorg] build.py: Allow lit test timeout value to be configurable
Omar Habra via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 3 16:44:30 PDT 2020
bro4all created this revision.
bro4all added a reviewer: azharudd.
bro4all requested review of this revision.
The test timeout value that is set thru the LLVM_LIT_ARGS is currently hardcoded. This change makes timeout flag configurable.
Repository:
rZORG LLVM Github Zorg
https://reviews.llvm.org/D85173
Files:
test/jenkins/test_monorepo_build.py
zorg/jenkins/monorepo_build.py
Index: zorg/jenkins/monorepo_build.py
===================================================================
--- zorg/jenkins/monorepo_build.py
+++ zorg/jenkins/monorepo_build.py
@@ -1,3 +1,4 @@
+
"""Build and test clangs."""
from __future__ import print_function
@@ -308,7 +309,7 @@
cmake_cmd += ['-DCMAKE_C_COMPILER_LAUNCHER=' + conf.sccache_path]
cmake_cmd += ['-DCMAKE_CXX_COMPILER_LAUNCHER=' + conf.sccache_path]
- lit_flags = ['--xunit-xml-output=testresults.xunit.xml', '-v', '-vv', '--timeout=600']
+ lit_flags = ['--xunit-xml-output=testresults.xunit.xml', '-v', '-vv', '--timeout='+str(conf.timeout)]
if conf.max_parallel_tests:
lit_flags += ['-j', conf.max_parallel_tests]
cmake_cmd += ['-DLLVM_LIT_ARGS={}'.format(' '.join(lit_flags))]
@@ -448,7 +449,8 @@
cmake_command.extend(['-DCMAKE_C_COMPILER=' + conf.CC(),
'-DCMAKE_CXX_COMPILER=' + conf.CC() + "++"])
- lit_flags = ['--xunit-xml-output=testresults.xunit.xml', '-v', '-vv', '--timeout=600']
+ lit_flags = ['--xunit-xml-output=testresults.xunit.xml', '-v', '-vv', '--timeout='+str(conf.timeout)]
+
if conf.max_parallel_tests:
lit_flags += ['-j', conf.max_parallel_tests]
cmake_command.extend(
@@ -1038,7 +1040,7 @@
parser.add_argument('--projects', dest='llvm_enable_projects',
default="clang;clang-tools-extra;compiler-rt;libcxx",
help="Semicolon seperated list of projects to build.")
-
+ parser.add_argument('--timeout',dest= 'timeout', type=int, help='job_Timeout', default='600' )
args = parser.parse_args()
if args.thinlto:
args.lto = True
Index: test/jenkins/test_monorepo_build.py
===================================================================
--- test/jenkins/test_monorepo_build.py
+++ test/jenkins/test_monorepo_build.py
@@ -137,3 +137,13 @@
# Test long should always do check-all, since that is what many bots expect.
# RUN: python %{src_root}/zorg/jenkins/monorepo_build.py cmake testlong | FileCheck --check-prefix CHECK-TTARGETS2 %s
# CHECK-TTARGETS2: '/usr/local/bin/ninja' '-v' '-k' '0' 'check-all'
+
+#Test to check if timeout flag is actually being set
+# RUN: python %{src_root}/zorg/jenkins/monorepo_build.py cmake all --timeout=900 > %t-timeout.log
+# RUN: FileCheck --check-prefix CHECK-TIMEOUT < %t-timeout.log %s
+# CHECK-TIMEOUT: '--timeout=900'
+
+#Test to check if timeout flag is actually being set
+# RUN: python %{src_root}/zorg/jenkins/monorepo_build.py cmake all > %t-timeout-default.log
+# RUN: FileCheck --check-prefix CHECK-TIMEOUT-DEFAULT < %t-timeout-default.log %s
+# CHECK-TIMEOUT-DEFAULT: '--timeout=600'
\ No newline at end of file
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D85173.282767.patch
Type: text/x-patch
Size: 2796 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200803/200a072b/attachment.bin>
More information about the llvm-commits
mailing list