diff --git a/buildbot/osuosl/master/config/builders.py b/buildbot/osuosl/master/config/builders.py --- a/buildbot/osuosl/master/config/builders.py +++ b/buildbot/osuosl/master/config/builders.py @@ -629,6 +629,7 @@ checkout_libcxx=False, useTwoStage=False, runTestSuite=True, + cmake_test_suite=True, stage1_config='Release', nt_flags=['--threads=16', '--build-threads=16'], extra_cmake_args=[ diff --git a/zorg/buildbot/builders/ClangBuilder.py b/zorg/buildbot/builders/ClangBuilder.py --- a/zorg/buildbot/builders/ClangBuilder.py +++ b/zorg/buildbot/builders/ClangBuilder.py @@ -119,9 +119,9 @@ vs_target_arch=vs_target_arch, useTwoStage=useTwoStage, testStage1=testStage1, stage1_config=stage1_config, stage2_config=stage2_config, runTestSuite=runTestSuite, - nt_flags=nt_flags, testsuite_flags=testsuite_flags, - submitURL=submitURL, testerName=testerName, - env=env, extra_cmake_args=extra_cmake_args, + cmake_test_suite=cmake_test_suite, 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, checkout_lld=checkout_lld, @@ -150,6 +150,7 @@ # Test-suite runTestSuite=False, + cmake_test_suite=False, nt_flags=None, testsuite_flags=None, submitURL=None, @@ -171,9 +172,9 @@ vs_target_arch=vs_target_arch, useTwoStage=useTwoStage, testStage1=testStage1, stage1_config=stage1_config, stage2_config=stage2_config, runTestSuite=runTestSuite, - nt_flags=nt_flags, testsuite_flags=testsuite_flags, - submitURL=submitURL, testerName=testerName, - env=env, extra_cmake_args=extra_cmake_args, + cmake_test_suite=cmake_test_suite, 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, checkout_compiler_rt=checkout_compiler_rt, @@ -200,6 +201,7 @@ # Test-suite runTestSuite=False, + cmake_test_suite=False, nt_flags=None, testsuite_flags=None, submitURL=None, @@ -270,10 +272,11 @@ # and the test-suite separately. Le's do this first, # so we wouldn't poison got_revision property. if runTestSuite or checkout_test_suite: - f.addGetSourcecodeForProject( - project='lnt', - src_dir='test/lnt', - alwaysUseLatest=True) + if not cmake_test_suite: + f.addGetSourcecodeForProject( + project='lnt', + src_dir='test/lnt', + alwaysUseLatest=True) f.addGetSourcecodeForProject( project='test-suite', src_dir='test/test-suite', @@ -467,8 +470,9 @@ # Get generated python, lnt python = WithProperties('%(builddir)s/test/sandbox/bin/python') - lnt = WithProperties('%(builddir)s/test/sandbox/bin/lnt') - lnt_setup = WithProperties('%(builddir)s/test/lnt/setup.py') + if not cmake_test_suite: + lnt = WithProperties('%(builddir)s/test/sandbox/bin/lnt') + lnt_setup = WithProperties('%(builddir)s/test/lnt/setup.py') # Paths sandbox = WithProperties('%(builddir)s/test/sandbox') @@ -481,7 +485,16 @@ # LNT Command line (don't pass -jN. Users need to pass both --threads # 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: + # with LNT, the workdir needs to be test/sandbox, + # but the CMakeList.txt and Makefiles are in %(builddir)s/test/test-suite. + test_suite_work_dir = 'test/sandbox' + if cmake_test_suite: + cmake_test_suite_cmd = ['cmake', '-G', 'Unix', 'Makefiles', + '--cc', cc, + '--cxx', cxx] + test_suite_cmd = ['make', '-k'] + test_suite_work_dir = test_suite_dir + elif not use_runtest_testsuite: test_suite_cmd = [python, lnt, 'runtest', 'nt', '--no-timestamp', '--sandbox', sandbox, @@ -543,12 +556,20 @@ description='setting up LNT in sandbox', workdir='test/sandbox', env=env)) + if cmake_test_suite: + f.addStep(ShellCommand( + name='cmake test-suite', + command=cmake_test_suite_cmd, + haltOnFailure=True, + description=['running cmake for test suite'], + workdir=test_suite_work_dir, + env=test_suite_env)) f.addStep(LitTestCommand( name='test-suite', command=test_suite_cmd, haltOnFailure=True, description=['running the test suite'], - workdir='test/sandbox', + workdir=test_suite_work_dir, logfiles={'configure.log' : 'build/configure.log', 'build-tools.log' : 'build/build-tools.log', 'test.log' : 'build/test.log',