[zorg] r310557 - Enable running 'lnt runtest test-suite' instead of 'lnt runtest nt'.
Kristof Beyls via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 10 01:53:52 PDT 2017
Author: kbeyls
Date: Thu Aug 10 01:53:52 2017
New Revision: 310557
URL: http://llvm.org/viewvc/llvm-project?rev=310557&view=rev
Log:
Enable running 'lnt runtest test-suite' instead of 'lnt runtest nt'.
A typical configuration for a builder using this to track performance
of code generated by LLVM could be:
{
'name': "builder-name",
'slavenames': ["slave-name"],
'builddir': "builder-builddir",
'factory': ClangBuilder.getClangCMakeBuildFactory(
jobs=8,
clean=False,
checkout_compiler_rt=False,
checkout_lld=False,
test=False,
useTwoStage=False,
runTestSuite=True,
env={'PATH':'/usr/lib/ccache:/usr/local/sbin:'+
'/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'},
testsuite_flags=['--cppflags', '-O3',
'--threads=1',
'--build-threads=8',
'--use-perf=all',
'--run-under', 'taskset -c 1',
'--benchmarking-only',
'--exec-multisample=3',
'--exclude-stat-from-submission=compile'],
extra_cmake_args=["-DLLVM_TARGETS_TO_BUILD='AArch64'",
"-DLLVM_PARALLEL_LINK_JOBS=4"],
submitURL='http://lnt.llvm.org/submitRun',
testerName='LNT-AArch64-O3'),
'category': 'clang'
}
The only difference to using the somewhat deprecated 'lnt runtest nt'
is that a "testsuite_flags" parameter is defined instead of an
"nt_flags" parameter.
Differential Revision: https://reviews.llvm.org/D35402
Modified:
zorg/trunk/zorg/buildbot/builders/ClangBuilder.py
Modified: zorg/trunk/zorg/buildbot/builders/ClangBuilder.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/zorg/buildbot/builders/ClangBuilder.py?rev=310557&r1=310556&r2=310557&view=diff
==============================================================================
--- zorg/trunk/zorg/buildbot/builders/ClangBuilder.py (original)
+++ zorg/trunk/zorg/buildbot/builders/ClangBuilder.py Thu Aug 10 01:53:52 2017
@@ -461,6 +461,7 @@ def getClangCMakeGCSBuildFactory(
# Test-suite
runTestSuite=False,
nt_flags=[],
+ testsuite_flags=[],
submitURL=None,
testerName=None,
@@ -483,7 +484,8 @@ def getClangCMakeGCSBuildFactory(
vs_target_arch=vs_target_arch, useTwoStage=useTwoStage,
testStage1=testStage1, stage1_config=stage1_config,
stage2_config=stage2_config, runTestSuite=runTestSuite,
- nt_flags=nt_flags, submitURL=submitURL, testerName=testerName,
+ nt_flags=nt_flags, testsuite_flags=testsuite_flags,
+ submitURL=submitURL, testerName=testerName,
env=env, extra_cmake_args=extra_cmake_args,
checkout_clang_tools_extra=checkout_clang_tools_extra,
checkout_compiler_rt=checkout_compiler_rt,
@@ -511,6 +513,7 @@ def getClangCMakeBuildFactory(
# Test-suite
runTestSuite=False,
nt_flags=[],
+ testsuite_flags=[],
submitURL=None,
testerName=None,
@@ -529,7 +532,8 @@ def getClangCMakeBuildFactory(
vs_target_arch=vs_target_arch, useTwoStage=useTwoStage,
testStage1=testStage1, stage1_config=stage1_config,
stage2_config=stage2_config, runTestSuite=runTestSuite,
- nt_flags=nt_flags, submitURL=submitURL, testerName=testerName,
+ nt_flags=nt_flags, testsuite_flags=testsuite_flags,
+ submitURL=submitURL, testerName=testerName,
env=env, extra_cmake_args=extra_cmake_args,
checkout_clang_tools_extra=checkout_clang_tools_extra,
checkout_lld=checkout_lld,
@@ -557,6 +561,7 @@ def _getClangCMakeBuildFactory(
# Test-suite
runTestSuite=False,
nt_flags=[],
+ testsuite_flags=[],
submitURL=None,
testerName=None,
@@ -769,22 +774,37 @@ def _getClangCMakeBuildFactory(
cxx = WithProperties('%(workdir)s/'+compiler_path+'/bin/'+cxx)
# LNT Command line (don't pass -jN. Users need to pass both --threads
- # and --build-threads in nt_flags to get the same effect)
- test_suite_cmd = [python, lnt, 'runtest', 'nt',
- '--no-timestamp',
- '--sandbox', sandbox,
- '--test-suite', test_suite_dir,
- '--cc', cc,
- '--cxx', cxx]
- # Append any option provided by the user
- test_suite_cmd.extend(nt_flags)
+ # and --build-threads in nt_flags/test_suite_flags to get the same effect)
+ use_runtest_testsuite = len(nt_flags) == 0
+ if not use_runtest_testsuite:
+ test_suite_cmd = [python, lnt, 'runtest', 'nt',
+ '--no-timestamp',
+ '--sandbox', sandbox,
+ '--test-suite', test_suite_dir,
+ '--cc', cc,
+ '--cxx', cxx]
+ # Append any option provided by the user
+ test_suite_cmd.extend(nt_flags)
+ else:
+ lit = WithProperties('%(workdir)s/'+stage1_build+'/bin/llvm-lit')
+ test_suite_cmd = [python, lnt, 'runtest', 'test-suite',
+ '--no-timestamp',
+ '--sandbox', sandbox,
+ '--test-suite', test_suite_dir,
+ '--cc', cc,
+ '--cxx', cxx,
+ '--use-lit', lit]
+ # Append any option provided by the user
+ test_suite_cmd.extend(testsuite_flags)
+
# Only submit if a URL has been specified
if submitURL is not None:
if not isinstance(submitURL, list):
submitURL = [submitURL]
for url in submitURL:
test_suite_cmd.extend(['--submit', url])
- if testerName:
+ # lnt runtest test-suite doesn't understand --no-machdep-info:
+ if testerName and not use_runtest_testsuite:
test_suite_cmd.extend(['--no-machdep-info', testerName])
# CC and CXX are needed as env for build-tools
test_suite_env = copy.deepcopy(env)
More information about the llvm-commits
mailing list