diff --git a/test/jenkins/test_monorepo_build.py b/test/jenkins/test_monorepo_build.py --- a/test/jenkins/test_monorepo_build.py +++ b/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 diff --git a/zorg/jenkins/monorepo_build.py b/zorg/jenkins/monorepo_build.py --- a/zorg/jenkins/monorepo_build.py +++ b/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