[PATCH] D35402: [zorg] Enable running 'lnt runtest test-suite' instead of 'lnt runtest nt'.
Kristof Beyls via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 14 01:17:14 PDT 2017
kristof.beyls created this revision.
Herald added a subscriber: aemerson.
With this patch, a typical configuration for a builder using 'lnt runtest test-suite' 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.
https://reviews.llvm.org/D35402
Files:
zorg/buildbot/builders/ClangBuilder.py
Index: zorg/buildbot/builders/ClangBuilder.py
===================================================================
--- zorg/buildbot/builders/ClangBuilder.py
+++ zorg/buildbot/builders/ClangBuilder.py
@@ -461,6 +461,7 @@
# Test-suite
runTestSuite=False,
nt_flags=[],
+ testsuite_flags=[],
submitURL=None,
testerName=None,
@@ -483,7 +484,8 @@
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 @@
# Test-suite
runTestSuite=False,
nt_flags=[],
+ testsuite_flags=[],
submitURL=None,
testerName=None,
@@ -529,7 +532,8 @@
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 @@
# Test-suite
runTestSuite=False,
nt_flags=[],
+ testsuite_flags=[],
submitURL=None,
testerName=None,
@@ -769,22 +774,37 @@
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)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D35402.106585.patch
Type: text/x-patch
Size: 4429 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170714/2460728d/attachment.bin>
More information about the llvm-commits
mailing list