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 default timeout is being set to 600. +# 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 Index: zorg/jenkins/monorepo_build.py =================================================================== --- zorg/jenkins/monorepo_build.py +++ zorg/jenkins/monorepo_build.py @@ -28,7 +28,6 @@ import dep # noqa - def readme_name(repo): """Given a repo, return the name of the readme file.""" if repo == "libcxx": @@ -308,7 +307,8 @@ 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'] + timeout_flag = '--timeout=' + str(conf.timeout) + lit_flags = ['--xunit-xml-output=testresults.xunit.xml', '-v', '-vv', timeout_flag] if conf.max_parallel_tests: lit_flags += ['-j', conf.max_parallel_tests] cmake_cmd += ['-DLLVM_LIT_ARGS={}'.format(' '.join(lit_flags))] @@ -448,7 +448,9 @@ 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'] + timeout_flag = '--timeout=' + str(conf.timeout) + lit_flags = ['--xunit-xml-output=testresults.xunit.xml', '-v', '-vv', timeout_flag] + if conf.max_parallel_tests: lit_flags += ['-j', conf.max_parallel_tests] cmake_command.extend( @@ -531,15 +533,15 @@ # Construct dotest.py arguments. dotest_args=['--arch', 'x86_64', '--build-dir', - conf.lldbbuilddir()+'/lldb-test-build.noindex', - '-s='+log_dir, - '-t', - '--env', 'TERM=vt100'] + conf.lldbbuilddir()+'/lldb-test-build.noindex', + '-s='+log_dir, + '-t', + '--env', 'TERM=vt100'] dotest_args.extend(conf.dotest_flags) # Construct lit arguments. lit_args = ['-v', '--time-tests', '--shuffle', - '--xunit-xml-output={}'.format(results_file), '-v'] + '--xunit-xml-output={}'.format(results_file), '-v'] if conf.max_parallel_tests: lit_args.extend(['-j', conf.max_parallel_tests]) if variant == 'sanitized': @@ -591,7 +593,6 @@ '-DCMAKE_CXX_COMPILER=' + conf.CC() + "++" ]) - header("Clean") delete_module_caches(conf.workspace) footer() @@ -1038,7 +1039,8 @@ 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, default='600', + help='individual test timeout in seconds.') args = parser.parse_args() if args.thinlto: args.lto = True