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 @@ -621,17 +621,25 @@ 'tags' : ["clang", "ppc", "ppc64le"], 'workernames' : ["ppc64le-clang-rhel-test"], 'builddir': "clang-ppc64le-rhel", - 'factory' : UnifiedTreeBuilder.getCmakeWithNinjaBuildFactory( - depends_on_projects=["llvm", "clang", "clang-tools-extra", "lld", "compiler-rt"], - checks=["check"], - enable_runtimes="auto", - extra_configure_args=[ + 'factory' : ClangBuilder.getClangCMakeBuildFactory( + clean=False, + checkout_compiler_rt=False, + checkout_lld=True, + test=True, + useTwoStage=False, + runTestSuite=True, + cmakeTestSuite=True, + nt_flags=['--threads=16', '--build-threads=16'], + extra_cmake_args=[ + '-DLLVM_ENABLE_PROJECTS=clang;llvm;clang-tools-extra;lld', + '-DLLVM_ENABLE_RUNTIMES=compiler-rt', "-DLLVM_ENABLE_ASSERTIONS=On", "-DCMAKE_C_COMPILER=clang", "-DCMAKE_CXX_COMPILER=clang++", "-DCLANG_DEFAULT_LINKER=lld", "-DCMAKE_C_COMPILER_EXTERNAL_TOOLCHAIN:PATH=/opt/rh/devtoolset-7/root/usr", "-DCMAKE_CXX_COMPILER_EXTERNAL_TOOLCHAIN:PATH=/opt/rh/devtoolset-7/root/usr", - "-DLLVM_BINUTILS_INCDIR=/usr/include", "-DBUILD_SHARED_LIBS=ON", "-DLLVM_ENABLE_WERROR=ON", + "-DLLVM_BINUTILS_INCDIR=/usr/include", + "-DBUILD_SHARED_LIBS=ON", "-DLLVM_ENABLE_WERROR=ON", "-DCMAKE_BUILD_TYPE=Release", "-DLLVM_LIT_ARGS=-vj 20"])}, 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 @@ -150,6 +150,7 @@ # Test-suite runTestSuite=False, + cmakeTestSuite=False, nt_flags=None, testsuite_flags=None, submitURL=None, @@ -179,7 +180,8 @@ checkout_compiler_rt=checkout_compiler_rt, checkout_libcxx=checkout_libcxx, checkout_flang=checkout_flang, - checkout_test_suite=checkout_test_suite) + checkout_test_suite=checkout_test_suite, + cmakeTestSuite=cmakeTestSuite) def _getClangCMakeBuildFactory( clean=True, @@ -204,6 +206,7 @@ testsuite_flags=None, submitURL=None, testerName=None, + cmakeTestSuite=False, # Environmental variables for all steps. env=None, @@ -465,10 +468,13 @@ workdir=stage2_build, env=env)) + if not cmakeTestSuite: # 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') + 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') + else: + lit = WithProperties('%(builddir)s/'+stage1_build+'/bin/llvm-lit') # Paths sandbox = WithProperties('%(builddir)s/test/sandbox') @@ -481,7 +487,7 @@ # 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: + if not use_runtest_testsuite and not cmakeTestSuite: test_suite_cmd = [python, lnt, 'runtest', 'nt', '--no-timestamp', '--sandbox', sandbox, @@ -490,7 +496,7 @@ '--cxx', cxx] # Append any option provided by the user test_suite_cmd.extend(nt_flags) - else: + elif not cmakeTestSuite: lit = WithProperties('%(builddir)s/'+stage1_build+'/bin/llvm-lit') test_suite_cmd = [python, lnt, 'runtest', 'test-suite', '--no-timestamp', @@ -537,22 +543,44 @@ description='recreating sandbox', workdir='test', env=env)) - f.addStep(ShellCommand(name='setup lit', - command=[python, lnt_setup, 'develop'], - haltOnFailure=True, - description='setting up LNT in sandbox', - workdir='test/sandbox', - env=env)) - f.addStep(LitTestCommand( - name='test-suite', - command=test_suite_cmd, - haltOnFailure=True, - description=['running the test suite'], - workdir='test/sandbox', - logfiles={'configure.log' : 'build/configure.log', - 'build-tools.log' : 'build/build-tools.log', - 'test.log' : 'build/test.log', - 'report.json' : 'build/report.json'}, - env=test_suite_env)) + + if not cmakeTestSuite: + f.addStep(ShellCommand(name='setup lit', + command=[python, lnt_setup, 'develop'], + haltOnFailure=True, + description='setting up LNT in sandbox', + workdir='test/sandbox', + env=env)) + f.addStep(LitTestCommand( + name='test-suite', + command=test_suite_cmd, + haltOnFailure=True, + description=['running the test suite'], + workdir='test/sandbox', + logfiles={'configure.log' : 'build/configure.log', + 'build-tools.log' : 'build/build-tools.log', + 'test.log' : 'build/test.log', + 'report.json' : 'build/report.json'}, + env=test_suite_env)) + else: + f.addStep(ShellCommand(name='cmake Test Suite', + haltOnFailure=True, + description='Running cmake on Test Suite dir', + workdir='test/sandbox/test-suite', + command=[cmake, '-G', 'Unix Makefiles', + util.Interpolate('-DCMAKE_C_COMPILER=' + '%(prop:builddir)s/'+compiler_path+'/bin/clang'), + util.Interpolate('-DCMAKE_CXX_COMPILER=' + '%(prop:builddir)s/'+compiler_path+'/bin/clang++'), + '-DTEST_SUITE_LIT:FILEPATH=llvm-lit', + test_suite_dir])) + f.addStep(ShellCommand(name='make Test Suite', + command=['make', '-k', '-j20'], + haltOnFailure=True, + description='Running make on Test Suite dir', + workdir='test/sandbox/test-suite')) + f.addStep(ShellCommand(name='Run Test Suite with lit', + haltOnFailure=True, + description='Running test suite tests', + workdir='test/sandbox/test-suite', + command=[lit, '-v', '-j20', '.'])) return f