Daniel Dunbar | 235aa41 | 2009-07-18 07:16:15 +0000 | [diff] [blame] | 1 | import buildbot |
| 2 | import buildbot.process.factory |
David Dean | f8b3544 | 2012-12-11 00:35:12 +0000 | [diff] [blame] | 3 | import os |
| 4 | |
| 5 | from buildbot.process.properties import WithProperties |
David Blaikie | 8cbf62f | 2013-01-12 21:32:31 +0000 | [diff] [blame] | 6 | from buildbot.steps.shell import Configure, ShellCommand, SetProperty |
Daniel Dunbar | 44abe74 | 2009-07-19 01:59:03 +0000 | [diff] [blame] | 7 | from buildbot.steps.shell import WarningCountingShellCommand |
David Dean | f8b3544 | 2012-12-11 00:35:12 +0000 | [diff] [blame] | 8 | from buildbot.steps.source import SVN |
Daniel Dunbar | 44abe74 | 2009-07-19 01:59:03 +0000 | [diff] [blame] | 9 | from buildbot.steps.transfer import FileDownload |
David Dean | f8b3544 | 2012-12-11 00:35:12 +0000 | [diff] [blame] | 10 | from zorg.buildbot.Artifacts import GetCompilerArtifacts, uploadArtifacts |
Daniel Dunbar | 2b67e8f | 2011-02-11 21:03:41 +0000 | [diff] [blame] | 11 | from zorg.buildbot.builders.Util import getConfigArgs |
David Blaikie | 7c3cbca | 2013-01-12 08:14:35 +0000 | [diff] [blame] | 12 | from zorg.buildbot.commands import DejaGNUCommand |
David Blaikie | 17ef889 | 2013-01-12 08:09:00 +0000 | [diff] [blame] | 13 | from zorg.buildbot.commands import SuppressionDejaGNUCommand |
David Dean | f8b3544 | 2012-12-11 00:35:12 +0000 | [diff] [blame] | 14 | from zorg.buildbot.commands.BatchFileDownload import BatchFileDownload |
David Blaikie | 8ec3752 | 2013-01-09 21:24:24 +0000 | [diff] [blame] | 15 | from zorg.buildbot.commands.LitTestCommand import LitTestCommand |
David Dean | f8b3544 | 2012-12-11 00:35:12 +0000 | [diff] [blame] | 16 | from zorg.buildbot.PhasedBuilderUtils import GetLatestValidated, find_cc |
Michael Gottesman | c8294c5 | 2013-03-30 23:43:59 +0000 | [diff] [blame] | 17 | from zorg.buildbot.PhasedBuilderUtils import find_liblto, SVNCleanupStep |
Daniel Dunbar | 8a89a6f | 2009-11-25 04:27:32 +0000 | [diff] [blame] | 18 | |
Galina Kistanova | f4d7935 | 2011-10-20 20:46:52 +0000 | [diff] [blame] | 19 | def getClangBuildFactory( |
| 20 | triple=None, |
| 21 | clean=True, |
| 22 | test=True, |
| 23 | package_dst=None, |
| 24 | run_cxx_tests=False, |
| 25 | examples=False, |
| 26 | valgrind=False, |
| 27 | valgrindLeakCheck=False, |
| 28 | outOfDir=False, |
| 29 | useTwoStage=False, |
| 30 | completely_clean=False, |
Galina Kistanova | f4d7935 | 2011-10-20 20:46:52 +0000 | [diff] [blame] | 31 | make='make', |
| 32 | jobs="%(jobs)s", |
| 33 | stage1_config='Debug+Asserts', |
| 34 | stage2_config='Release+Asserts', |
| 35 | env={}, # Environmental variables for all steps. |
| 36 | extra_configure_args=[], |
| 37 | use_pty_in_tests=False, |
Peter Collingbourne | d49ac28 | 2011-10-25 14:38:45 +0000 | [diff] [blame] | 38 | trunk_revision=None, |
| 39 | force_checkout=False, |
Peter Collingbourne | 7a95b0c | 2011-10-26 16:40:17 +0000 | [diff] [blame] | 40 | extra_clean_step=None, |
David Blaikie | a76da84 | 2012-08-13 22:24:46 +0000 | [diff] [blame] | 41 | checkout_compiler_rt=False, |
| 42 | run_gdb=False, |
David Blaikie | dad03d5 | 2012-11-16 22:37:12 +0000 | [diff] [blame] | 43 | run_modern_gdb=False, |
David Blaikie | 41d09c3 | 2013-01-02 21:11:09 +0000 | [diff] [blame] | 44 | run_gcc=False): |
Galina Kistanova | f4d7935 | 2011-10-20 20:46:52 +0000 | [diff] [blame] | 45 | # Prepare environmental variables. Set here all env we want everywhere. |
| 46 | merged_env = { |
| 47 | 'TERM' : 'dumb' # Make sure Clang doesn't use color escape sequences. |
| 48 | } |
| 49 | if env is not None: |
| 50 | # Overwrite pre-set items with the given ones, so user can set anything. |
| 51 | merged_env.update(env) |
David Blaikie | 2f7eb28 | 2012-08-24 18:37:00 +0000 | [diff] [blame] | 52 | |
David Blaikie | dad03d5 | 2012-11-16 22:37:12 +0000 | [diff] [blame] | 53 | if run_gdb or run_gcc or run_modern_gdb: |
David Blaikie | 88511c7 | 2012-08-24 23:14:06 +0000 | [diff] [blame] | 54 | outOfDir = True |
Galina Kistanova | f4d7935 | 2011-10-20 20:46:52 +0000 | [diff] [blame] | 55 | |
Daniel Dunbar | 8a89a6f | 2009-11-25 04:27:32 +0000 | [diff] [blame] | 56 | # Don't use in-dir builds with a two stage build process. |
Daniel Dunbar | 3efb782 | 2010-02-26 19:20:00 +0000 | [diff] [blame] | 57 | inDir = not outOfDir and not useTwoStage |
Daniel Dunbar | 8a89a6f | 2009-11-25 04:27:32 +0000 | [diff] [blame] | 58 | if inDir: |
| 59 | llvm_srcdir = "llvm" |
| 60 | llvm_1_objdir = "llvm" |
David Blaikie | 88511c7 | 2012-08-24 23:14:06 +0000 | [diff] [blame] | 61 | llvm_1_installdir = None |
Daniel Dunbar | 8a89a6f | 2009-11-25 04:27:32 +0000 | [diff] [blame] | 62 | else: |
| 63 | llvm_srcdir = "llvm.src" |
| 64 | llvm_1_objdir = "llvm.obj" |
| 65 | llvm_1_installdir = "llvm.install.1" |
| 66 | llvm_2_objdir = "llvm.obj.2" |
Daniel Dunbar | 22d594a | 2010-07-31 05:29:16 +0000 | [diff] [blame] | 67 | llvm_2_installdir = "llvm.install" |
Daniel Dunbar | 8a89a6f | 2009-11-25 04:27:32 +0000 | [diff] [blame] | 68 | |
Daniel Dunbar | 235aa41 | 2009-07-18 07:16:15 +0000 | [diff] [blame] | 69 | f = buildbot.process.factory.BuildFactory() |
Daniel Dunbar | b51f6ab | 2009-11-09 03:09:23 +0000 | [diff] [blame] | 70 | |
| 71 | # Determine the build directory. |
| 72 | f.addStep(buildbot.steps.shell.SetProperty(name="get_builddir", |
| 73 | command=["pwd"], |
| 74 | property="builddir", |
| 75 | description="set build dir", |
Galina Kistanova | f4d7935 | 2011-10-20 20:46:52 +0000 | [diff] [blame] | 76 | workdir=".", |
| 77 | env=merged_env)) |
Daniel Dunbar | b51f6ab | 2009-11-09 03:09:23 +0000 | [diff] [blame] | 78 | |
Daniel Dunbar | 06b20f1 | 2010-04-08 18:29:38 +0000 | [diff] [blame] | 79 | # Blow away completely, if requested. |
| 80 | if completely_clean: |
| 81 | f.addStep(ShellCommand(name="rm-llvm.src", |
| 82 | command=["rm", "-rf", llvm_srcdir], |
| 83 | haltOnFailure=True, |
| 84 | description=["rm src dir", "llvm"], |
Galina Kistanova | f4d7935 | 2011-10-20 20:46:52 +0000 | [diff] [blame] | 85 | workdir=".", |
| 86 | env=merged_env)) |
Daniel Dunbar | 06b20f1 | 2010-04-08 18:29:38 +0000 | [diff] [blame] | 87 | |
Daniel Dunbar | b51f6ab | 2009-11-09 03:09:23 +0000 | [diff] [blame] | 88 | # Checkout sources. |
Peter Collingbourne | d49ac28 | 2011-10-25 14:38:45 +0000 | [diff] [blame] | 89 | if trunk_revision: |
| 90 | # The SVN build step provides no mechanism to check out a specific revision |
| 91 | # based on a property, so just run the commands directly here. |
| 92 | svn_co = ['svn', 'checkout'] |
| 93 | if force_checkout: |
| 94 | svn_co += ['--force'] |
| 95 | svn_co += ['--revision', WithProperties(trunk_revision)] |
| 96 | |
| 97 | svn_co_llvm = svn_co + \ |
| 98 | [WithProperties('http://llvm.org/svn/llvm-project/llvm/trunk@%s' % |
| 99 | trunk_revision), |
| 100 | llvm_srcdir] |
| 101 | svn_co_clang = svn_co + \ |
| 102 | [WithProperties('http://llvm.org/svn/llvm-project/cfe/trunk@%s' % |
| 103 | trunk_revision), |
| 104 | '%s/tools/clang' % llvm_srcdir] |
David Blaikie | 845ae0d | 2012-08-10 00:51:38 +0000 | [diff] [blame] | 105 | svn_co_clang_tools_extra = svn_co + \ |
| 106 | [WithProperties('http://llvm.org/svn/llvm-project/clang-tools-extra/trunk@%s' % |
| 107 | trunk_revision), |
| 108 | '%s/tools/clang/tools/extra' % llvm_srcdir] |
Peter Collingbourne | d49ac28 | 2011-10-25 14:38:45 +0000 | [diff] [blame] | 109 | |
| 110 | f.addStep(ShellCommand(name='svn-llvm', |
| 111 | command=svn_co_llvm, |
| 112 | haltOnFailure=True, |
| 113 | workdir='.')) |
| 114 | f.addStep(ShellCommand(name='svn-clang', |
| 115 | command=svn_co_clang, |
| 116 | haltOnFailure=True, |
| 117 | workdir='.')) |
David Blaikie | 845ae0d | 2012-08-10 00:51:38 +0000 | [diff] [blame] | 118 | f.addStep(ShellCommand(name='svn-clang-tools-extra', |
| 119 | command=svn_co_clang_tools_extra, |
| 120 | haltOnFailure=True, |
| 121 | workdir='.')) |
Peter Collingbourne | d49ac28 | 2011-10-25 14:38:45 +0000 | [diff] [blame] | 122 | else: |
| 123 | f.addStep(SVN(name='svn-llvm', |
Daniel Dunbar | f4e23eb | 2010-09-20 21:13:02 +0000 | [diff] [blame] | 124 | mode='update', |
Peter Collingbourne | d49ac28 | 2011-10-25 14:38:45 +0000 | [diff] [blame] | 125 | baseURL='http://llvm.org/svn/llvm-project/llvm/', |
Daniel Dunbar | f4e23eb | 2010-09-20 21:13:02 +0000 | [diff] [blame] | 126 | defaultBranch='trunk', |
Peter Collingbourne | d49ac28 | 2011-10-25 14:38:45 +0000 | [diff] [blame] | 127 | workdir=llvm_srcdir)) |
| 128 | f.addStep(SVN(name='svn-clang', |
| 129 | mode='update', |
| 130 | baseURL='http://llvm.org/svn/llvm-project/cfe/', |
| 131 | defaultBranch='trunk', |
| 132 | workdir='%s/tools/clang' % llvm_srcdir)) |
David Blaikie | 845ae0d | 2012-08-10 00:51:38 +0000 | [diff] [blame] | 133 | f.addStep(SVN(name='svn-clang-tools-extra', |
| 134 | mode='update', |
| 135 | baseURL='http://llvm.org/svn/llvm-project/clang-tools-extra/', |
| 136 | defaultBranch='trunk', |
| 137 | workdir='%s/tools/clang/tools/extra' % llvm_srcdir)) |
Peter Collingbourne | d49ac28 | 2011-10-25 14:38:45 +0000 | [diff] [blame] | 138 | if checkout_compiler_rt: |
| 139 | f.addStep(SVN(name='svn-compiler-rt', |
| 140 | mode='update', |
| 141 | baseURL='http://llvm.org/svn/llvm-project/compiler-rt/', |
| 142 | defaultBranch='trunk', |
| 143 | workdir='%s/projects/compiler-rt' % llvm_srcdir)) |
Daniel Dunbar | fa0e022 | 2009-11-09 06:08:28 +0000 | [diff] [blame] | 144 | |
Daniel Dunbar | 8a89a6f | 2009-11-25 04:27:32 +0000 | [diff] [blame] | 145 | # Clean up llvm (stage 1); unless in-dir. |
| 146 | if clean and llvm_srcdir != llvm_1_objdir: |
| 147 | f.addStep(ShellCommand(name="rm-llvm.obj.stage1", |
| 148 | command=["rm", "-rf", llvm_1_objdir], |
| 149 | haltOnFailure=True, |
| 150 | description=["rm build dir", "llvm"], |
Galina Kistanova | f4d7935 | 2011-10-20 20:46:52 +0000 | [diff] [blame] | 151 | workdir=".", |
| 152 | env=merged_env)) |
Andrew Trick | 70fa9d2 | 2011-08-25 23:38:51 +0000 | [diff] [blame] | 153 | |
Daniel Dunbar | fa0e022 | 2009-11-09 06:08:28 +0000 | [diff] [blame] | 154 | # Force without llvm-gcc so we don't run afoul of Frontend test failures. |
Daniel Dunbar | 8a89a6f | 2009-11-25 04:27:32 +0000 | [diff] [blame] | 155 | base_configure_args = [WithProperties("%%(builddir)s/%s/configure" % llvm_srcdir), |
Daniel Dunbar | 8a89a6f | 2009-11-25 04:27:32 +0000 | [diff] [blame] | 156 | '--disable-bindings'] |
| 157 | base_configure_args += extra_configure_args |
Daniel Dunbar | fa0e022 | 2009-11-09 06:08:28 +0000 | [diff] [blame] | 158 | if triple: |
Andrew Trick | 70fa9d2 | 2011-08-25 23:38:51 +0000 | [diff] [blame] | 159 | base_configure_args += ['--build=%s' % triple, |
David Dean | 7da2286 | 2012-10-01 19:57:30 +0000 | [diff] [blame] | 160 | '--host=%s' % triple] |
Daniel Dunbar | 8a89a6f | 2009-11-25 04:27:32 +0000 | [diff] [blame] | 161 | args = base_configure_args + ["--without-llvmgcc", "--without-llvmgxx"] |
Daniel Dunbar | 3efb782 | 2010-02-26 19:20:00 +0000 | [diff] [blame] | 162 | args.append(WithProperties("--prefix=%%(builddir)s/%s" % llvm_1_installdir)) |
Daniel Dunbar | 8a89a6f | 2009-11-25 04:27:32 +0000 | [diff] [blame] | 163 | args += getConfigArgs(stage1_config) |
David Blaikie | 8cbf62f | 2013-01-12 21:32:31 +0000 | [diff] [blame] | 164 | if not clean: |
| 165 | f.addStep(SetProperty(name="Makefile_isready", |
| 166 | workdir=llvm_1_objdir, |
| 167 | command=["sh", "-c", |
Galina Kistanova | f7275a4 | 2013-03-22 21:42:55 +0000 | [diff] [blame] | 168 | "test -e Makefile.config && echo OK || echo Missing"], |
David Blaikie | 8cbf62f | 2013-01-12 21:32:31 +0000 | [diff] [blame] | 169 | flunkOnFailure=False, |
| 170 | property="exists_Makefile")) |
Daniel Dunbar | 8a89a6f | 2009-11-25 04:27:32 +0000 | [diff] [blame] | 171 | f.addStep(Configure(command=args, |
| 172 | workdir=llvm_1_objdir, |
| 173 | description=['configuring',stage1_config], |
Galina Kistanova | f4d7935 | 2011-10-20 20:46:52 +0000 | [diff] [blame] | 174 | descriptionDone=['configure',stage1_config], |
David Blaikie | 8cbf62f | 2013-01-12 21:32:31 +0000 | [diff] [blame] | 175 | env=merged_env, |
| 176 | doStepIf=lambda step: step.build.getProperty("exists_Makefile") != "OK")) |
Daniel Dunbar | 8a89a6f | 2009-11-25 04:27:32 +0000 | [diff] [blame] | 177 | |
| 178 | # Make clean if using in-dir builds. |
| 179 | if clean and llvm_srcdir == llvm_1_objdir: |
Daniel Dunbar | b51f6ab | 2009-11-09 03:09:23 +0000 | [diff] [blame] | 180 | f.addStep(WarningCountingShellCommand(name="clean-llvm", |
Daniel Dunbar | d20468a | 2009-11-24 18:27:23 +0000 | [diff] [blame] | 181 | command=[make, "clean"], |
Daniel Dunbar | b51f6ab | 2009-11-09 03:09:23 +0000 | [diff] [blame] | 182 | haltOnFailure=True, |
| 183 | description="cleaning llvm", |
| 184 | descriptionDone="clean llvm", |
Galina Kistanova | f4d7935 | 2011-10-20 20:46:52 +0000 | [diff] [blame] | 185 | workdir=llvm_1_objdir, |
Peter Collingbourne | 7a95b0c | 2011-10-26 16:40:17 +0000 | [diff] [blame] | 186 | doStepIf=clean, |
Galina Kistanova | f4d7935 | 2011-10-20 20:46:52 +0000 | [diff] [blame] | 187 | env=merged_env)) |
Daniel Dunbar | 8a89a6f | 2009-11-25 04:27:32 +0000 | [diff] [blame] | 188 | |
Peter Collingbourne | 7a95b0c | 2011-10-26 16:40:17 +0000 | [diff] [blame] | 189 | if extra_clean_step: |
| 190 | f.addStep(extra_clean_step) |
| 191 | |
Daniel Dunbar | 7e959c8 | 2009-09-28 04:01:19 +0000 | [diff] [blame] | 192 | f.addStep(WarningCountingShellCommand(name="compile", |
Daniel Dunbar | d20468a | 2009-11-24 18:27:23 +0000 | [diff] [blame] | 193 | command=['nice', '-n', '10', |
| 194 | make, WithProperties("-j%s" % jobs)], |
Daniel Dunbar | 7e959c8 | 2009-09-28 04:01:19 +0000 | [diff] [blame] | 195 | haltOnFailure=True, |
Daniel Dunbar | 8a89a6f | 2009-11-25 04:27:32 +0000 | [diff] [blame] | 196 | description=["compiling", stage1_config], |
| 197 | descriptionDone=["compile", stage1_config], |
Galina Kistanova | f4d7935 | 2011-10-20 20:46:52 +0000 | [diff] [blame] | 198 | workdir=llvm_1_objdir, |
| 199 | env=merged_env)) |
Daniel Dunbar | 256fed4 | 2009-11-25 21:11:08 +0000 | [diff] [blame] | 200 | |
| 201 | if examples: |
| 202 | f.addStep(WarningCountingShellCommand(name="compile.examples", |
| 203 | command=['nice', '-n', '10', |
| 204 | make, WithProperties("-j%s" % jobs), |
| 205 | "BUILD_EXAMPLES=1"], |
| 206 | haltOnFailure=True, |
| 207 | description=["compilinge", stage1_config, "examples"], |
| 208 | descriptionDone=["compile", stage1_config, "examples"], |
Galina Kistanova | f4d7935 | 2011-10-20 20:46:52 +0000 | [diff] [blame] | 209 | workdir=llvm_1_objdir, |
| 210 | env=merged_env)) |
Daniel Dunbar | 256fed4 | 2009-11-25 21:11:08 +0000 | [diff] [blame] | 211 | |
NAKAMURA Takumi | 1a4666b | 2013-01-19 03:39:07 +0000 | [diff] [blame] | 212 | clangTestArgs = '-v -j %s' % jobs |
Daniel Dunbar | fa0e022 | 2009-11-09 06:08:28 +0000 | [diff] [blame] | 213 | if valgrind: |
Daniel Dunbar | 89184b9 | 2010-04-18 19:09:32 +0000 | [diff] [blame] | 214 | clangTestArgs += ' --vg' |
Daniel Dunbar | a1bebce | 2010-03-21 01:24:00 +0000 | [diff] [blame] | 215 | if valgrindLeakCheck: |
| 216 | clangTestArgs += ' --vg-leak' |
Nick Lewycky | 8d26e47 | 2011-08-27 21:18:56 +0000 | [diff] [blame] | 217 | clangTestArgs += ' --vg-arg --suppressions=%(builddir)s/llvm/tools/clang/utils/valgrind/x86_64-pc-linux-gnu_gcc-4.3.3.supp --vg-arg --suppressions=%(builddir)s/llvm/utils/valgrind/x86_64-pc-linux-gnu.supp' |
Daniel Dunbar | fa0e022 | 2009-11-09 06:08:28 +0000 | [diff] [blame] | 218 | extraTestDirs = '' |
| 219 | if run_cxx_tests: |
| 220 | extraTestDirs += '%(builddir)s/llvm/tools/clang/utils/C++Tests' |
Daniel Dunbar | b51f6ab | 2009-11-09 03:09:23 +0000 | [diff] [blame] | 221 | if test: |
David Blaikie | 7a99cd5 | 2013-01-12 20:50:32 +0000 | [diff] [blame] | 222 | f.addStep(LitTestCommand(name='check-all', |
David Blaikie | 7e6f8a1 | 2012-08-31 20:46:27 +0000 | [diff] [blame] | 223 | command=[make, "check-all", "VERBOSE=1", |
NAKAMURA Takumi | 1a4666b | 2013-01-19 03:39:07 +0000 | [diff] [blame] | 224 | WithProperties("LIT_ARGS=%s" % clangTestArgs), |
David Blaikie | bc68401 | 2012-12-27 20:44:19 +0000 | [diff] [blame] | 225 | WithProperties("EXTRA_TESTDIRS=%s" % extraTestDirs)], |
David Blaikie | 7e6f8a1 | 2012-08-31 20:46:27 +0000 | [diff] [blame] | 226 | description=["checking"], |
| 227 | descriptionDone=["checked"], |
Daniel Dunbar | 469e8ca | 2010-05-19 21:26:48 +0000 | [diff] [blame] | 228 | workdir=llvm_1_objdir, |
Galina Kistanova | f4d7935 | 2011-10-20 20:46:52 +0000 | [diff] [blame] | 229 | usePTY=use_pty_in_tests, |
| 230 | env=merged_env)) |
Daniel Dunbar | 8a89a6f | 2009-11-25 04:27:32 +0000 | [diff] [blame] | 231 | |
| 232 | # Install llvm and clang. |
| 233 | if llvm_1_installdir: |
Daniel Dunbar | 9870de3 | 2010-03-28 22:25:31 +0000 | [diff] [blame] | 234 | f.addStep(ShellCommand(name="rm-install.clang.stage1", |
| 235 | command=["rm", "-rf", llvm_1_installdir], |
| 236 | haltOnFailure=True, |
| 237 | description=["rm install dir", "clang"], |
Galina Kistanova | f4d7935 | 2011-10-20 20:46:52 +0000 | [diff] [blame] | 238 | workdir=".", |
| 239 | env=merged_env)) |
Daniel Dunbar | 9870de3 | 2010-03-28 22:25:31 +0000 | [diff] [blame] | 240 | f.addStep(WarningCountingShellCommand(name="install.clang.stage1", |
| 241 | command = ['nice', '-n', '10', |
| 242 | make, 'install-clang'], |
Daniel Dunbar | 8a89a6f | 2009-11-25 04:27:32 +0000 | [diff] [blame] | 243 | haltOnFailure=True, |
Daniel Dunbar | 9870de3 | 2010-03-28 22:25:31 +0000 | [diff] [blame] | 244 | description=["install", "clang", |
| 245 | stage1_config], |
Galina Kistanova | f4d7935 | 2011-10-20 20:46:52 +0000 | [diff] [blame] | 246 | workdir=llvm_1_objdir, |
| 247 | env=merged_env)) |
Daniel Dunbar | 8a89a6f | 2009-11-25 04:27:32 +0000 | [diff] [blame] | 248 | |
David Blaikie | dad03d5 | 2012-11-16 22:37:12 +0000 | [diff] [blame] | 249 | if run_gdb or run_gcc or run_modern_gdb: |
David Blaikie | a76da84 | 2012-08-13 22:24:46 +0000 | [diff] [blame] | 250 | ignores = getClangTestsIgnoresFromPath(os.path.expanduser('~/public/clang-tests'), 'clang-x86_64-darwin10') |
| 251 | install_prefix = "%%(builddir)s/%s" % llvm_1_installdir |
| 252 | if run_gdb: |
| 253 | addClangGDBTests(f, ignores, install_prefix) |
David Blaikie | dad03d5 | 2012-11-16 22:37:12 +0000 | [diff] [blame] | 254 | if run_modern_gdb: |
David Blaikie | 41d09c3 | 2013-01-02 21:11:09 +0000 | [diff] [blame] | 255 | addModernClangGDBTests(f, jobs, install_prefix) |
David Blaikie | a76da84 | 2012-08-13 22:24:46 +0000 | [diff] [blame] | 256 | if run_gcc: |
| 257 | addClangGCCTests(f, ignores, install_prefix) |
| 258 | |
Daniel Dunbar | 8a89a6f | 2009-11-25 04:27:32 +0000 | [diff] [blame] | 259 | if not useTwoStage: |
Daniel Dunbar | dedf657 | 2010-11-13 00:23:34 +0000 | [diff] [blame] | 260 | if package_dst: |
| 261 | name = WithProperties( |
| 262 | "%(builddir)s/" + llvm_1_objdir + |
| 263 | "/clang-r%(got_revision)s-b%(buildnumber)s.tgz") |
| 264 | f.addStep(ShellCommand(name='pkg.tar', |
| 265 | description="tar root", |
| 266 | command=["tar", "zcvf", name, "./"], |
| 267 | workdir=llvm_1_installdir, |
| 268 | warnOnFailure=True, |
| 269 | flunkOnFailure=False, |
Galina Kistanova | f4d7935 | 2011-10-20 20:46:52 +0000 | [diff] [blame] | 270 | haltOnFailure=False, |
| 271 | env=merged_env)) |
Daniel Dunbar | dedf657 | 2010-11-13 00:23:34 +0000 | [diff] [blame] | 272 | f.addStep(ShellCommand(name='pkg.upload', |
Andrew Trick | 70fa9d2 | 2011-08-25 23:38:51 +0000 | [diff] [blame] | 273 | description="upload root", |
Daniel Dunbar | dedf657 | 2010-11-13 00:23:34 +0000 | [diff] [blame] | 274 | command=["scp", name, |
| 275 | WithProperties( |
| 276 | package_dst + "/%(buildername)s")], |
| 277 | workdir=".", |
| 278 | warnOnFailure=True, |
| 279 | flunkOnFailure=False, |
Galina Kistanova | f4d7935 | 2011-10-20 20:46:52 +0000 | [diff] [blame] | 280 | haltOnFailure=False, |
| 281 | env=merged_env)) |
Daniel Dunbar | dedf657 | 2010-11-13 00:23:34 +0000 | [diff] [blame] | 282 | |
Daniel Dunbar | 8a89a6f | 2009-11-25 04:27:32 +0000 | [diff] [blame] | 283 | return f |
| 284 | |
| 285 | # Clean up llvm (stage 2). |
| 286 | if clean: |
| 287 | f.addStep(ShellCommand(name="rm-llvm.obj.stage2", |
| 288 | command=["rm", "-rf", llvm_2_objdir], |
| 289 | haltOnFailure=True, |
| 290 | description=["rm build dir", "llvm", "(stage 2)"], |
Galina Kistanova | f4d7935 | 2011-10-20 20:46:52 +0000 | [diff] [blame] | 291 | workdir=".", |
| 292 | env=merged_env)) |
Daniel Dunbar | 8a89a6f | 2009-11-25 04:27:32 +0000 | [diff] [blame] | 293 | |
| 294 | # Configure llvm (stage 2). |
| 295 | args = base_configure_args + ["--without-llvmgcc", "--without-llvmgxx"] |
Daniel Dunbar | 3efb782 | 2010-02-26 19:20:00 +0000 | [diff] [blame] | 296 | args.append(WithProperties("--prefix=%(builddir)s/" + llvm_2_installdir)) |
Daniel Dunbar | 8a89a6f | 2009-11-25 04:27:32 +0000 | [diff] [blame] | 297 | args += getConfigArgs(stage2_config) |
Benjamin Kramer | 9c6fed7 | 2012-07-20 10:18:32 +0000 | [diff] [blame] | 298 | local_env = dict(merged_env) |
| 299 | local_env.update({ |
Galina Kistanova | f4d7935 | 2011-10-20 20:46:52 +0000 | [diff] [blame] | 300 | 'CC' : WithProperties("%%(builddir)s/%s/bin/clang" % llvm_1_installdir), |
| 301 | 'CXX' : WithProperties("%%(builddir)s/%s/bin/clang++" % llvm_1_installdir)}) |
| 302 | |
Daniel Dunbar | 8a89a6f | 2009-11-25 04:27:32 +0000 | [diff] [blame] | 303 | f.addStep(Configure(name="configure.llvm.stage2", |
| 304 | command=args, |
Daniel Dunbar | 8a89a6f | 2009-11-25 04:27:32 +0000 | [diff] [blame] | 305 | haltOnFailure=True, |
| 306 | workdir=llvm_2_objdir, |
| 307 | description=["configure", "llvm", "(stage 2)", |
Galina Kistanova | f4d7935 | 2011-10-20 20:46:52 +0000 | [diff] [blame] | 308 | stage2_config], |
| 309 | env=local_env)) |
Daniel Dunbar | 8a89a6f | 2009-11-25 04:27:32 +0000 | [diff] [blame] | 310 | |
| 311 | # Build llvm (stage 2). |
| 312 | f.addStep(WarningCountingShellCommand(name="compile.llvm.stage2", |
| 313 | command=['nice', '-n', '10', |
| 314 | make, WithProperties("-j%s" % jobs)], |
| 315 | haltOnFailure=True, |
| 316 | description=["compiling", "(stage 2)", |
| 317 | stage2_config], |
| 318 | descriptionDone=["compile", "(stage 2)", |
| 319 | stage2_config], |
Galina Kistanova | f4d7935 | 2011-10-20 20:46:52 +0000 | [diff] [blame] | 320 | workdir=llvm_2_objdir, |
| 321 | env=merged_env)) |
Daniel Dunbar | 8a89a6f | 2009-11-25 04:27:32 +0000 | [diff] [blame] | 322 | |
| 323 | if test: |
David Blaikie | f52bb94 | 2013-01-12 20:53:55 +0000 | [diff] [blame] | 324 | f.addStep(LitTestCommand(name='check-all', |
David Blaikie | 7e6f8a1 | 2012-08-31 20:46:27 +0000 | [diff] [blame] | 325 | command=[make, "check-all", "VERBOSE=1", |
NAKAMURA Takumi | 1a4666b | 2013-01-19 03:39:07 +0000 | [diff] [blame] | 326 | WithProperties("LIT_ARGS=%s" % clangTestArgs), |
David Blaikie | bc68401 | 2012-12-27 20:44:19 +0000 | [diff] [blame] | 327 | WithProperties("EXTRA_TESTDIRS=%s" % extraTestDirs)], |
David Blaikie | 7e6f8a1 | 2012-08-31 20:46:27 +0000 | [diff] [blame] | 328 | description=["checking"], |
| 329 | descriptionDone=["checked"], |
Daniel Dunbar | 469e8ca | 2010-05-19 21:26:48 +0000 | [diff] [blame] | 330 | workdir=llvm_2_objdir, |
Galina Kistanova | f4d7935 | 2011-10-20 20:46:52 +0000 | [diff] [blame] | 331 | usePTY=use_pty_in_tests, |
| 332 | env=merged_env)) |
Daniel Dunbar | 8a89a6f | 2009-11-25 04:27:32 +0000 | [diff] [blame] | 333 | |
Daniel Dunbar | 3efb782 | 2010-02-26 19:20:00 +0000 | [diff] [blame] | 334 | # Install clang (stage 2). |
Daniel Dunbar | 9870de3 | 2010-03-28 22:25:31 +0000 | [diff] [blame] | 335 | f.addStep(ShellCommand(name="rm-install.clang.stage2", |
| 336 | command=["rm", "-rf", llvm_2_installdir], |
| 337 | haltOnFailure=True, |
| 338 | description=["rm install dir", "clang"], |
Galina Kistanova | f4d7935 | 2011-10-20 20:46:52 +0000 | [diff] [blame] | 339 | workdir=".", |
| 340 | env=merged_env)) |
Daniel Dunbar | 3efb782 | 2010-02-26 19:20:00 +0000 | [diff] [blame] | 341 | f.addStep(WarningCountingShellCommand(name="install.clang.stage2", |
| 342 | command = ['nice', '-n', '10', |
| 343 | make, 'install-clang'], |
| 344 | haltOnFailure=True, |
| 345 | description=["install", "clang", |
| 346 | "(stage 2)"], |
Galina Kistanova | f4d7935 | 2011-10-20 20:46:52 +0000 | [diff] [blame] | 347 | workdir=llvm_2_objdir, |
| 348 | env=merged_env)) |
Daniel Dunbar | 3efb782 | 2010-02-26 19:20:00 +0000 | [diff] [blame] | 349 | |
| 350 | if package_dst: |
| 351 | name = WithProperties( |
| 352 | "%(builddir)s/" + llvm_2_objdir + |
| 353 | "/clang-r%(got_revision)s-b%(buildnumber)s.tgz") |
| 354 | f.addStep(ShellCommand(name='pkg.tar', |
| 355 | description="tar root", |
| 356 | command=["tar", "zcvf", name, "./"], |
| 357 | workdir=llvm_2_installdir, |
| 358 | warnOnFailure=True, |
| 359 | flunkOnFailure=False, |
Galina Kistanova | f4d7935 | 2011-10-20 20:46:52 +0000 | [diff] [blame] | 360 | haltOnFailure=False, |
| 361 | env=merged_env)) |
Daniel Dunbar | 3efb782 | 2010-02-26 19:20:00 +0000 | [diff] [blame] | 362 | f.addStep(ShellCommand(name='pkg.upload', |
Andrew Trick | 70fa9d2 | 2011-08-25 23:38:51 +0000 | [diff] [blame] | 363 | description="upload root", |
Daniel Dunbar | 3efb782 | 2010-02-26 19:20:00 +0000 | [diff] [blame] | 364 | command=["scp", name, |
| 365 | WithProperties( |
| 366 | package_dst + "/%(buildername)s")], |
| 367 | workdir=".", |
| 368 | warnOnFailure=True, |
| 369 | flunkOnFailure=False, |
Galina Kistanova | f4d7935 | 2011-10-20 20:46:52 +0000 | [diff] [blame] | 370 | haltOnFailure=False, |
| 371 | env=merged_env)) |
Daniel Dunbar | 3efb782 | 2010-02-26 19:20:00 +0000 | [diff] [blame] | 372 | |
Daniel Dunbar | 235aa41 | 2009-07-18 07:16:15 +0000 | [diff] [blame] | 373 | return f |
Daniel Dunbar | 44abe74 | 2009-07-19 01:59:03 +0000 | [diff] [blame] | 374 | |
Daniel Dunbar | c51a59e | 2010-09-23 14:57:45 +0000 | [diff] [blame] | 375 | def getClangMSVCBuildFactory(update=True, clean=True, vcDrive='c', jobs=1, cmake=r"cmake"): |
Daniel Dunbar | 44abe74 | 2009-07-19 01:59:03 +0000 | [diff] [blame] | 376 | f = buildbot.process.factory.BuildFactory() |
| 377 | |
Daniel Dunbar | b51f6ab | 2009-11-09 03:09:23 +0000 | [diff] [blame] | 378 | if update: |
Daniel Dunbar | 44abe74 | 2009-07-19 01:59:03 +0000 | [diff] [blame] | 379 | f.addStep(SVN(name='svn-llvm', |
| 380 | mode='update', baseURL='http://llvm.org/svn/llvm-project/llvm/', |
| 381 | defaultBranch='trunk', |
| 382 | workdir='llvm')) |
Daniel Dunbar | 44abe74 | 2009-07-19 01:59:03 +0000 | [diff] [blame] | 383 | f.addStep(SVN(name='svn-clang', |
Daniel Dunbar | 7e959c8 | 2009-09-28 04:01:19 +0000 | [diff] [blame] | 384 | mode='update', baseURL='http://llvm.org/svn/llvm-project/cfe/', |
Daniel Dunbar | 44abe74 | 2009-07-19 01:59:03 +0000 | [diff] [blame] | 385 | defaultBranch='trunk', |
| 386 | workdir='llvm/tools/clang')) |
David Blaikie | 845ae0d | 2012-08-10 00:51:38 +0000 | [diff] [blame] | 387 | f.addStep(SVN(name='svn-clang-tools-extra', |
| 388 | mode='update', baseURL='http://llvm.org/svn/llvm-project/clang-tools-extra/', |
| 389 | defaultBranch='trunk', |
| 390 | workdir='llvm/tools/clang/tools/extra')) |
Daniel Dunbar | 44abe74 | 2009-07-19 01:59:03 +0000 | [diff] [blame] | 391 | |
| 392 | # Full & fast clean. |
Daniel Dunbar | b51f6ab | 2009-11-09 03:09:23 +0000 | [diff] [blame] | 393 | if clean: |
Daniel Dunbar | 44abe74 | 2009-07-19 01:59:03 +0000 | [diff] [blame] | 394 | f.addStep(ShellCommand(name='clean-1', |
| 395 | command=['del','/s/q','build'], |
Daniel Dunbar | 7e959c8 | 2009-09-28 04:01:19 +0000 | [diff] [blame] | 396 | warnOnFailure=True, |
Daniel Dunbar | 44abe74 | 2009-07-19 01:59:03 +0000 | [diff] [blame] | 397 | description='cleaning', |
| 398 | descriptionDone='clean', |
| 399 | workdir='llvm')) |
| 400 | f.addStep(ShellCommand(name='clean-2', |
| 401 | command=['rmdir','/s/q','build'], |
Daniel Dunbar | 7e959c8 | 2009-09-28 04:01:19 +0000 | [diff] [blame] | 402 | warnOnFailure=True, |
Daniel Dunbar | 44abe74 | 2009-07-19 01:59:03 +0000 | [diff] [blame] | 403 | description='cleaning', |
| 404 | descriptionDone='clean', |
| 405 | workdir='llvm')) |
| 406 | |
| 407 | # Create the project files. |
Daniel Dunbar | 7e959c8 | 2009-09-28 04:01:19 +0000 | [diff] [blame] | 408 | |
Daniel Dunbar | b51f6ab | 2009-11-09 03:09:23 +0000 | [diff] [blame] | 409 | # Use batch files instead of ShellCommand directly, Windows quoting is |
| 410 | # borked. FIXME: See buildbot ticket #595 and buildbot ticket #377. |
| 411 | f.addStep(BatchFileDownload(name='cmakegen', |
Daniel Dunbar | 06b20f1 | 2010-04-08 18:29:38 +0000 | [diff] [blame] | 412 | command=[cmake, |
Daniel Dunbar | b51f6ab | 2009-11-09 03:09:23 +0000 | [diff] [blame] | 413 | "-DLLVM_TARGETS_TO_BUILD:=X86", |
Daniel Dunbar | 1ddedce | 2010-09-24 19:57:34 +0000 | [diff] [blame] | 414 | "-DLLVM_INCLUDE_EXAMPLES:=OFF", |
| 415 | "-DLLVM_INCLUDE_TESTS:=OFF", |
| 416 | "-DLLVM_TARGETS_TO_BUILD:=X86", |
Daniel Dunbar | b51f6ab | 2009-11-09 03:09:23 +0000 | [diff] [blame] | 417 | "-G", |
| 418 | "Visual Studio 9 2008", |
| 419 | ".."], |
| 420 | workdir="llvm\\build")) |
Daniel Dunbar | 44abe74 | 2009-07-19 01:59:03 +0000 | [diff] [blame] | 421 | f.addStep(ShellCommand(name='cmake', |
| 422 | command=['cmakegen.bat'], |
Daniel Dunbar | 7e959c8 | 2009-09-28 04:01:19 +0000 | [diff] [blame] | 423 | haltOnFailure=True, |
Daniel Dunbar | 44abe74 | 2009-07-19 01:59:03 +0000 | [diff] [blame] | 424 | description='cmake gen', |
| 425 | workdir='llvm\\build')) |
| 426 | |
| 427 | # Build it. |
Daniel Dunbar | b51f6ab | 2009-11-09 03:09:23 +0000 | [diff] [blame] | 428 | f.addStep(BatchFileDownload(name='vcbuild', |
| 429 | command=[vcDrive + r""":\Program Files\Microsoft Visual Studio 9.0\VC\VCPackages\vcbuild.exe""", |
| 430 | "/M%d" % jobs, |
| 431 | "LLVM.sln", |
| 432 | "Debug|Win32"], |
| 433 | workdir="llvm\\build")) |
Daniel Dunbar | 44abe74 | 2009-07-19 01:59:03 +0000 | [diff] [blame] | 434 | f.addStep(WarningCountingShellCommand(name='vcbuild', |
| 435 | command=['vcbuild.bat'], |
Daniel Dunbar | 7e959c8 | 2009-09-28 04:01:19 +0000 | [diff] [blame] | 436 | haltOnFailure=True, |
Daniel Dunbar | 44abe74 | 2009-07-19 01:59:03 +0000 | [diff] [blame] | 437 | description='vcbuild', |
| 438 | workdir='llvm\\build', |
| 439 | warningPattern=" warning C.*:")) |
Daniel Dunbar | b51f6ab | 2009-11-09 03:09:23 +0000 | [diff] [blame] | 440 | |
| 441 | # Build clang-test project. |
| 442 | f.addStep(BatchFileDownload(name='vcbuild_test', |
| 443 | command=[vcDrive + r""":\Program Files\Microsoft Visual Studio 9.0\VC\VCPackages\vcbuild.exe""", |
| 444 | "clang-test.vcproj", |
| 445 | "Debug|Win32"], |
| 446 | workdir="llvm\\build\\tools\\clang\\test")) |
David Blaikie | f52bb94 | 2013-01-12 20:53:55 +0000 | [diff] [blame] | 447 | f.addStep(LitTestCommand(name='test-clang', |
Daniel Dunbar | b51f6ab | 2009-11-09 03:09:23 +0000 | [diff] [blame] | 448 | command=["vcbuild_test.bat"], |
| 449 | workdir="llvm\\build\\tools\\clang\\test")) |
| 450 | |
Daniel Dunbar | 44abe74 | 2009-07-19 01:59:03 +0000 | [diff] [blame] | 451 | return f |
Daniel Dunbar | 22d594a | 2010-07-31 05:29:16 +0000 | [diff] [blame] | 452 | |
Galina Kistanova | 2a97a3b | 2012-06-06 20:50:33 +0000 | [diff] [blame] | 453 | # Builds on Windows using CMake, MinGW(32|64), and no Microsoft tools. |
Galina Kistanova | 5e97edf | 2012-06-19 20:10:21 +0000 | [diff] [blame] | 454 | def getClangMinGWBuildFactory(update=True, clean=True, jobs=6, cmake=r"cmake"): |
Galina Kistanova | 2a97a3b | 2012-06-06 20:50:33 +0000 | [diff] [blame] | 455 | f = buildbot.process.factory.BuildFactory() |
| 456 | |
| 457 | if update: |
| 458 | f.addStep(SVN(name='svn-llvm', |
| 459 | mode='update', baseURL='http://llvm.org/svn/llvm-project/llvm/', |
| 460 | defaultBranch='trunk', |
| 461 | workdir='llvm')) |
Galina Kistanova | 2a97a3b | 2012-06-06 20:50:33 +0000 | [diff] [blame] | 462 | f.addStep(SVN(name='svn-clang', |
| 463 | mode='update', baseURL='http://llvm.org/svn/llvm-project/cfe/', |
| 464 | defaultBranch='trunk', |
| 465 | workdir='llvm/tools/clang')) |
David Blaikie | 845ae0d | 2012-08-10 00:51:38 +0000 | [diff] [blame] | 466 | f.addStep(SVN(name='svn-clang-tools-extra', |
| 467 | mode='update', baseURL='http://llvm.org/svn/llvm-project/clang-tools-extra/', |
| 468 | defaultBranch='trunk', |
| 469 | workdir='llvm/tools/clang/tools/extra')) |
Galina Kistanova | 2a97a3b | 2012-06-06 20:50:33 +0000 | [diff] [blame] | 470 | |
| 471 | # Full & fast clean. |
| 472 | if clean: |
| 473 | # note: This command is redundant as the next command removes everything |
| 474 | f.addStep(ShellCommand(name='clean-1', |
| 475 | command=['del','/s/q','build'], |
| 476 | warnOnFailure=True, |
| 477 | description='cleaning', |
| 478 | descriptionDone='clean', |
| 479 | workdir='llvm')) |
| 480 | f.addStep(ShellCommand(name='clean-2', |
| 481 | command=['rmdir','/s/q','build'], |
| 482 | warnOnFailure=True, |
| 483 | description='cleaning', |
| 484 | descriptionDone='clean', |
| 485 | workdir='llvm')) |
| 486 | |
| 487 | # Create the Makefiles. |
| 488 | |
| 489 | # Use batch files instead of ShellCommand directly, Windows quoting is |
| 490 | # borked. FIXME: See buildbot ticket #595 and buildbot ticket #377. |
| 491 | f.addStep(BatchFileDownload(name='cmakegen', |
| 492 | command=[cmake, |
| 493 | "-DLLVM_TARGETS_TO_BUILD:=X86", |
| 494 | "-DLLVM_INCLUDE_EXAMPLES:=OFF", |
| 495 | "-DLLVM_INCLUDE_TESTS:=OFF", |
| 496 | "-DLLVM_TARGETS_TO_BUILD:=X86", |
| 497 | "-G", |
Galina Kistanova | 5e97edf | 2012-06-19 20:10:21 +0000 | [diff] [blame] | 498 | "Ninja", |
Galina Kistanova | 2a97a3b | 2012-06-06 20:50:33 +0000 | [diff] [blame] | 499 | ".."], |
| 500 | workdir="llvm\\build")) |
| 501 | f.addStep(ShellCommand(name='cmake', |
| 502 | command=['cmakegen.bat'], |
| 503 | haltOnFailure=True, |
| 504 | description='cmake gen', |
| 505 | workdir='llvm\\build')) |
| 506 | |
| 507 | # Build it. |
| 508 | f.addStep(BatchFileDownload(name='makeall', |
Galina Kistanova | 5e97edf | 2012-06-19 20:10:21 +0000 | [diff] [blame] | 509 | command=["ninja", "-j", "%d" % jobs], |
Galina Kistanova | 2a97a3b | 2012-06-06 20:50:33 +0000 | [diff] [blame] | 510 | haltOnFailure=True, |
| 511 | workdir='llvm\\build')) |
| 512 | |
| 513 | f.addStep(WarningCountingShellCommand(name='makeall', |
| 514 | command=['makeall.bat'], |
| 515 | haltOnFailure=True, |
| 516 | description='makeall', |
| 517 | workdir='llvm\\build')) |
| 518 | |
Galina Kistanova | 5e97edf | 2012-06-19 20:10:21 +0000 | [diff] [blame] | 519 | # Build global check project (make check) (sources not checked out...). |
| 520 | if 0: |
| 521 | f.addStep(BatchFileDownload(name='makecheck', |
| 522 | command=["ninja", "check"], |
| 523 | workdir='llvm\\build')) |
| 524 | f.addStep(WarningCountingShellCommand(name='check', |
| 525 | command=['makecheck.bat'], |
| 526 | description='make check', |
| 527 | workdir='llvm\\build')) |
Galina Kistanova | 049d76c | 2012-06-09 00:56:05 +0000 | [diff] [blame] | 528 | |
| 529 | # Build clang-test project (make clang-test). |
Galina Kistanova | 2a97a3b | 2012-06-06 20:50:33 +0000 | [diff] [blame] | 530 | f.addStep(BatchFileDownload(name='maketest', |
Galina Kistanova | 5e97edf | 2012-06-19 20:10:21 +0000 | [diff] [blame] | 531 | command=["ninja", "clang-test"], |
Galina Kistanova | 049d76c | 2012-06-09 00:56:05 +0000 | [diff] [blame] | 532 | workdir="llvm\\build")) |
David Blaikie | f52bb94 | 2013-01-12 20:53:55 +0000 | [diff] [blame] | 533 | f.addStep(LitTestCommand(name='clang-test', |
Galina Kistanova | 2a97a3b | 2012-06-06 20:50:33 +0000 | [diff] [blame] | 534 | command=["maketest.bat"], |
Galina Kistanova | 049d76c | 2012-06-09 00:56:05 +0000 | [diff] [blame] | 535 | workdir="llvm\\build")) |
Galina Kistanova | 2a97a3b | 2012-06-06 20:50:33 +0000 | [diff] [blame] | 536 | |
| 537 | return f |
| 538 | |
Daniel Dunbar | 7363d03 | 2011-02-27 03:22:35 +0000 | [diff] [blame] | 539 | def addClangGCCTests(f, ignores={}, install_prefix="%(builddir)s/llvm.install", |
| 540 | languages = ('gcc', 'g++', 'objc', 'obj-c++')): |
Daniel Dunbar | 22d594a | 2010-07-31 05:29:16 +0000 | [diff] [blame] | 541 | make_vars = [WithProperties( |
Daniel Dunbar | 2b67e8f | 2011-02-11 21:03:41 +0000 | [diff] [blame] | 542 | 'CC_UNDER_TEST=%s/bin/clang' % install_prefix), |
Daniel Dunbar | 22d594a | 2010-07-31 05:29:16 +0000 | [diff] [blame] | 543 | WithProperties( |
Daniel Dunbar | 2b67e8f | 2011-02-11 21:03:41 +0000 | [diff] [blame] | 544 | 'CXX_UNDER_TEST=%s/bin/clang++' % install_prefix)] |
Daniel Dunbar | 22d594a | 2010-07-31 05:29:16 +0000 | [diff] [blame] | 545 | f.addStep(SVN(name='svn-clang-tests', mode='update', |
| 546 | baseURL='http://llvm.org/svn/llvm-project/clang-tests/', |
| 547 | defaultBranch='trunk', workdir='clang-tests')) |
| 548 | gcc_dg_ignores = ignores.get('gcc-4_2-testsuite', {}) |
Daniel Dunbar | 2b67e8f | 2011-02-11 21:03:41 +0000 | [diff] [blame] | 549 | for lang in languages: |
David Blaikie | 17ef889 | 2013-01-12 08:09:00 +0000 | [diff] [blame] | 550 | f.addStep(SuppressionDejaGNUCommand.SuppressionDejaGNUCommand( |
Daniel Dunbar | 22d594a | 2010-07-31 05:29:16 +0000 | [diff] [blame] | 551 | name='test-gcc-4_2-testsuite-%s' % lang, |
| 552 | command=["make", "-k", "check-%s" % lang] + make_vars, |
| 553 | description="gcc-4_2-testsuite (%s)" % lang, |
| 554 | workdir='clang-tests/gcc-4_2-testsuite', |
David Dean | 2bd0c3a | 2011-10-18 16:36:28 +0000 | [diff] [blame] | 555 | logfiles={ 'dg.sum' : 'obj/%s/%s.sum' % (lang, lang), |
| 556 | '%s.log' % lang : 'obj/%s/%s.log' % (lang, lang)}, |
Daniel Dunbar | 22d594a | 2010-07-31 05:29:16 +0000 | [diff] [blame] | 557 | ignore=gcc_dg_ignores.get(lang, []))) |
Daniel Dunbar | 2b67e8f | 2011-02-11 21:03:41 +0000 | [diff] [blame] | 558 | |
Daniel Dunbar | 7363d03 | 2011-02-27 03:22:35 +0000 | [diff] [blame] | 559 | def addClangGDBTests(f, ignores={}, install_prefix="%(builddir)s/llvm.install"): |
| 560 | make_vars = [WithProperties( |
| 561 | 'CC_UNDER_TEST=%s/bin/clang' % install_prefix), |
| 562 | WithProperties( |
| 563 | 'CXX_UNDER_TEST=%s/bin/clang++' % install_prefix)] |
| 564 | f.addStep(SVN(name='svn-clang-tests', mode='update', |
| 565 | baseURL='http://llvm.org/svn/llvm-project/clang-tests/', |
| 566 | defaultBranch='trunk', workdir='clang-tests')) |
David Blaikie | 17ef889 | 2013-01-12 08:09:00 +0000 | [diff] [blame] | 567 | f.addStep(SuppressionDejaGNUCommand.SuppressionDejaGNUCommand( |
Daniel Dunbar | 7363d03 | 2011-02-27 03:22:35 +0000 | [diff] [blame] | 568 | name='test-gdb-1472-testsuite', |
| 569 | command=["make", "-k", "check"] + make_vars, |
| 570 | description="gdb-1472-testsuite", |
| 571 | workdir='clang-tests/gdb-1472-testsuite', |
David Blaikie | 7ec695f | 2012-10-09 22:17:09 +0000 | [diff] [blame] | 572 | logfiles={ 'dg.sum' : 'obj/filtered.gdb.sum', |
David Blaikie | 624f439 | 2012-11-05 22:34:35 +0000 | [diff] [blame] | 573 | 'gdb.log' : 'obj/gdb.log' })) |
Daniel Dunbar | 7363d03 | 2011-02-27 03:22:35 +0000 | [diff] [blame] | 574 | |
David Blaikie | 41d09c3 | 2013-01-02 21:11:09 +0000 | [diff] [blame] | 575 | def addModernClangGDBTests(f, jobs, install_prefix): |
David Blaikie | 1bc5c37 | 2012-12-05 05:29:12 +0000 | [diff] [blame] | 576 | make_vars = [WithProperties('RUNTESTFLAGS=CC_FOR_TARGET=\'{0}/bin/clang\' ' |
| 577 | 'CXX_FOR_TARGET=\'{0}/bin/clang++\' ' |
David Blaikie | 41d09c3 | 2013-01-02 21:11:09 +0000 | [diff] [blame] | 578 | 'CFLAGS_FOR_TARGET=\'-w -fno-omit-frame-pointer ' |
| 579 | '-mno-omit-leaf-frame-pointer -fno-limit-debug-info\'' |
David Blaikie | f89877b | 2013-01-29 23:46:26 +0000 | [diff] [blame] | 580 | .format(install_prefix))] |
David Blaikie | dad03d5 | 2012-11-16 22:37:12 +0000 | [diff] [blame] | 581 | f.addStep(SVN(name='svn-clang-tests', mode='update', |
David Blaikie | f3f300b | 2012-11-17 01:13:41 +0000 | [diff] [blame] | 582 | svnurl='http://llvm.org/svn/llvm-project/clang-tests-external/trunk/gdb/7.5', |
David Blaikie | dad03d5 | 2012-11-16 22:37:12 +0000 | [diff] [blame] | 583 | workdir='clang-tests/src')) |
David Blaikie | b83bfdf | 2012-12-05 04:33:42 +0000 | [diff] [blame] | 584 | f.addStep(Configure(command='../src/configure', |
David Blaikie | f3f300b | 2012-11-17 01:13:41 +0000 | [diff] [blame] | 585 | workdir='clang-tests/build/')) |
David Blaikie | b83bfdf | 2012-12-05 04:33:42 +0000 | [diff] [blame] | 586 | f.addStep(WarningCountingShellCommand(name='gdb-75-build', |
| 587 | command=['make', WithProperties('-j%s' % jobs)], |
| 588 | haltOnFailure=True, |
| 589 | workdir='clang-tests/build')) |
David Blaikie | 7c3cbca | 2013-01-12 08:14:35 +0000 | [diff] [blame] | 590 | f.addStep(DejaGNUCommand.DejaGNUCommand( |
David Blaikie | dad03d5 | 2012-11-16 22:37:12 +0000 | [diff] [blame] | 591 | name='gdb-75-check', |
David Blaikie | b83bfdf | 2012-12-05 04:33:42 +0000 | [diff] [blame] | 592 | command=['make', '-k', WithProperties('-j%s' % jobs), 'check'] + make_vars, |
David Blaikie | dad03d5 | 2012-11-16 22:37:12 +0000 | [diff] [blame] | 593 | workdir='clang-tests/build', |
David Blaikie | 1bc5c37 | 2012-12-05 05:29:12 +0000 | [diff] [blame] | 594 | logfiles={'dg.sum':'gdb/testsuite/gdb.sum', |
| 595 | 'gdb.log':'gdb/testsuite/gdb.log'})) |
David Blaikie | dad03d5 | 2012-11-16 22:37:12 +0000 | [diff] [blame] | 596 | |
| 597 | |
| 598 | |
Daniel Dunbar | 7363d03 | 2011-02-27 03:22:35 +0000 | [diff] [blame] | 599 | # FIXME: Deprecated. |
| 600 | addClangTests = addClangGCCTests |
| 601 | |
Daniel Dunbar | 2b67e8f | 2011-02-11 21:03:41 +0000 | [diff] [blame] | 602 | def getClangTestsIgnoresFromPath(path, key): |
| 603 | def readList(path): |
| 604 | if not os.path.exists(path): |
| 605 | return [] |
| 606 | |
| 607 | f = open(path) |
| 608 | lines = [ln.strip() for ln in f] |
| 609 | f.close() |
| 610 | return lines |
| 611 | |
| 612 | ignores = {} |
| 613 | |
| 614 | gcc_dg_ignores = {} |
| 615 | for lang in ('gcc', 'g++', 'objc', 'obj-c++'): |
| 616 | lang_path = os.path.join(path, 'gcc-4_2-testsuite', 'expected_results', |
| 617 | key, lang) |
| 618 | gcc_dg_ignores[lang] = ( |
| 619 | readList(os.path.join(lang_path, 'FAIL.txt')) + |
| 620 | readList(os.path.join(lang_path, 'UNRESOLVED.txt')) + |
| 621 | readList(os.path.join(lang_path, 'XPASS.txt'))) |
| 622 | ignores['gcc-4_2-testsuite' ] = gcc_dg_ignores |
| 623 | |
Daniel Dunbar | 7363d03 | 2011-02-27 03:22:35 +0000 | [diff] [blame] | 624 | ignores_path = os.path.join(path, 'gdb-1472-testsuite', 'expected_results', |
| 625 | key) |
| 626 | gdb_dg_ignores = ( |
| 627 | readList(os.path.join(ignores_path, 'FAIL.txt')) + |
| 628 | readList(os.path.join(ignores_path, 'UNRESOLVED.txt')) + |
| 629 | readList(os.path.join(ignores_path, 'XPASS.txt'))) |
| 630 | ignores['gdb-1472-testsuite' ] = gdb_dg_ignores |
| 631 | |
Daniel Dunbar | 2b67e8f | 2011-02-11 21:03:41 +0000 | [diff] [blame] | 632 | return ignores |
David Dean | f8b3544 | 2012-12-11 00:35:12 +0000 | [diff] [blame] | 633 | |
| 634 | from zorg.buildbot.PhasedBuilderUtils import getBuildDir, setProperty |
Michael Gottesman | 94e9ee4 | 2013-04-04 06:52:04 +0000 | [diff] [blame^] | 635 | from zorg.buildbot.builders.Util import _did_last_build_fail |
David Dean | f8b3544 | 2012-12-11 00:35:12 +0000 | [diff] [blame] | 636 | from buildbot.steps.source.svn import SVN as HostSVN |
| 637 | |
Michael Gottesman | 94e9ee4 | 2013-04-04 06:52:04 +0000 | [diff] [blame^] | 638 | def phasedClang(config_options, is_bootstrap=True, use_lto=False, |
| 639 | incremental=False): |
David Dean | f8b3544 | 2012-12-11 00:35:12 +0000 | [diff] [blame] | 640 | # Create an instance of the Builder. |
| 641 | f = buildbot.process.factory.BuildFactory() |
| 642 | # Determine the build directory. |
| 643 | f = getBuildDir(f) |
| 644 | # get rid of old archives from prior builds |
| 645 | f.addStep(buildbot.steps.shell.ShellCommand( |
| 646 | name='rm.archives', command=['sh', '-c', 'rm -rfv *gz'], |
| 647 | haltOnFailure=False, description=['rm archives'], |
| 648 | workdir=WithProperties('%(builddir)s'))) |
| 649 | # Clean the build directory. |
| 650 | clang_build_dir = 'clang-build' |
Michael Gottesman | 94e9ee4 | 2013-04-04 06:52:04 +0000 | [diff] [blame^] | 651 | if incremental: |
| 652 | f.addStep(buildbot.steps.shell.ShellCommand( |
| 653 | name='rm.clang-build', command=['rm', '-rfv', clang_build_dir], |
| 654 | haltOnFailure=False, description=['rm dir', clang_build_dir], |
| 655 | workdir=WithProperties('%(builddir)s'), |
| 656 | doStepIf=_did_last_build_fail)) |
| 657 | else: |
| 658 | f.addStep(buildbot.steps.shell.ShellCommand( |
| 659 | name='rm.clang-build', command=['rm', '-rfv', clang_build_dir], |
| 660 | haltOnFailure=False, description=['rm dir', clang_build_dir], |
| 661 | workdir=WithProperties('%(builddir)s'))) |
| 662 | |
David Dean | f8b3544 | 2012-12-11 00:35:12 +0000 | [diff] [blame] | 663 | # Cleanup the clang link, which buildbot's SVN always_purge does not know |
| 664 | # (in 8.5 this changed to method='fresh') |
| 665 | # how to remove correctly. If we don't do this, the LLVM update steps will |
| 666 | # end up doing a clobber every time. |
| 667 | # |
| 668 | # FIXME: Should file a Trac for this, but I am lazy. |
| 669 | f.addStep(buildbot.steps.shell.ShellCommand( |
| 670 | name='rm.clang-sources-link', |
| 671 | command=['rm', '-rfv', 'llvm/tools/clang'], |
| 672 | haltOnFailure=False, description=['rm', 'clang sources link'], |
| 673 | workdir=WithProperties('%(builddir)s'))) |
| 674 | f.addStep(buildbot.steps.shell.ShellCommand( |
| 675 | name='rm.compiler-rt-sources-link', |
| 676 | command=['rm', '-rfv', 'llvm/projects/compiler-rt'], |
| 677 | haltOnFailure=False, description=['rm', 'compiler-rt sources link'], |
| 678 | workdir=WithProperties('%(builddir)s'))) |
| 679 | # Pull sources. |
Michael Gottesman | c8294c5 | 2013-03-30 23:43:59 +0000 | [diff] [blame] | 680 | f = SVNCleanupStep(f, 'llvm') |
David Dean | f8b3544 | 2012-12-11 00:35:12 +0000 | [diff] [blame] | 681 | f.addStep(HostSVN(name='pull.llvm', mode='incremental', method='fresh', |
| 682 | repourl='http://llvm.org/svn/llvm-project/llvm/trunk', |
Michael Gottesman | f8748fb | 2013-03-28 06:21:03 +0000 | [diff] [blame] | 683 | retry=(60, 5), workdir='llvm', description='pull.llvm', |
| 684 | alwaysUseLatest=False)) |
Michael Gottesman | c8294c5 | 2013-03-30 23:43:59 +0000 | [diff] [blame] | 685 | f = SVNCleanupStep(f, 'clang.src') |
David Dean | f8b3544 | 2012-12-11 00:35:12 +0000 | [diff] [blame] | 686 | f.addStep(HostSVN(name='pull.clang', mode='incremental', method='fresh', |
| 687 | repourl='http://llvm.org/svn/llvm-project/cfe/trunk', |
Michael Gottesman | f8748fb | 2013-03-28 06:21:03 +0000 | [diff] [blame] | 688 | workdir='clang.src', retry=(60, 5), |
David Dean | f8b3544 | 2012-12-11 00:35:12 +0000 | [diff] [blame] | 689 | description='pull.clang', alwaysUseLatest=False)) |
Michael Gottesman | c8294c5 | 2013-03-30 23:43:59 +0000 | [diff] [blame] | 690 | f = SVNCleanupStep(f, 'clang-tools-extra.src') |
Michael Gottesman | 1dcf8f8 | 2013-03-28 06:20:57 +0000 | [diff] [blame] | 691 | f.addStep(HostSVN(name='pull.clang-tools-extra', mode='incremental', |
| 692 | method='fresh', |
Michael Gottesman | f8748fb | 2013-03-28 06:21:03 +0000 | [diff] [blame] | 693 | repourl='http://llvm.org/svn/llvm-project/' |
| 694 | 'clang-tools-extra/trunk', |
Michael Gottesman | 1dcf8f8 | 2013-03-28 06:20:57 +0000 | [diff] [blame] | 695 | workdir='clang-tools-extra.src', alwaysUseLatest=False, |
| 696 | retry=(60, 5), description='pull.clang-tools-extra')) |
Michael Gottesman | c8294c5 | 2013-03-30 23:43:59 +0000 | [diff] [blame] | 697 | f = SVNCleanupStep(f, 'compiler-rt.src') |
Michael Gottesman | f8748fb | 2013-03-28 06:21:03 +0000 | [diff] [blame] | 698 | f.addStep(HostSVN(name='pull.compiler-rt', mode='incremental', |
| 699 | method='fresh', |
| 700 | repourl='http://llvm.org/svn/llvm-project/compiler-rt/' |
| 701 | 'trunk', |
| 702 | workdir='compiler-rt.src', alwaysUseLatest=False, |
| 703 | retry=(60, 5), description='pull.compiler-rt')) |
| 704 | # Create symlinks to the clang compiler-rt sources inside the LLVM tree. |
David Dean | f8b3544 | 2012-12-11 00:35:12 +0000 | [diff] [blame] | 705 | # We don't actually check out the sources there, because the SVN purge |
| 706 | # would always remove them then. |
| 707 | f.addStep(buildbot.steps.shell.ShellCommand( |
| 708 | name='ln.clang-sources', haltOnFailure=True, |
| 709 | command=['ln', '-sfv', '../../clang.src', 'clang'], |
Michael Gottesman | f8748fb | 2013-03-28 06:21:03 +0000 | [diff] [blame] | 710 | workdir='llvm/tools', description=['ln', 'clang sources'])) |
David Dean | f8b3544 | 2012-12-11 00:35:12 +0000 | [diff] [blame] | 711 | f.addStep(buildbot.steps.shell.ShellCommand( |
| 712 | name='ln.compiler-rt-sources', |
| 713 | command=['ln', '-sfv', '../../compiler-rt.src', 'compiler-rt'], |
| 714 | haltOnFailure=True, workdir='llvm/projects', |
Michael Gottesman | f8748fb | 2013-03-28 06:21:03 +0000 | [diff] [blame] | 715 | description=['ln', 'compiler-rt sources'])) |
Michael Gottesman | bcab199 | 2013-03-28 18:37:21 +0000 | [diff] [blame] | 716 | # TODO: We used to use a symlink here but it seems to not work. I am trying |
| 717 | # to get this builder to work so I am just going to copy it instead. |
Michael Gottesman | 1dcf8f8 | 2013-03-28 06:20:57 +0000 | [diff] [blame] | 718 | f.addStep(buildbot.steps.shell.ShellCommand( |
Michael Gottesman | 4a68b87 | 2013-03-28 19:03:52 +0000 | [diff] [blame] | 719 | name='rm.clang-tools-extra-source', |
| 720 | command=['rm', '-rfv', 'extra'], |
| 721 | haltOnFailure=True, workdir='clang.src/tools', |
| 722 | description=['rm', 'clang-tools-extra sources'])) |
| 723 | f.addStep(buildbot.steps.shell.ShellCommand( |
Michael Gottesman | bcab199 | 2013-03-28 18:37:21 +0000 | [diff] [blame] | 724 | name='cp.clang-tools-extra-sources', |
Michael Gottesman | 0349592 | 2013-03-28 18:40:44 +0000 | [diff] [blame] | 725 | command=['cp', '-Rfv', '../../clang-tools-extra.src', 'extra'], |
Michael Gottesman | 1dcf8f8 | 2013-03-28 06:20:57 +0000 | [diff] [blame] | 726 | haltOnFailure=True, workdir='clang.src/tools', |
Michael Gottesman | bcab199 | 2013-03-28 18:37:21 +0000 | [diff] [blame] | 727 | description=['cp', 'clang-tools-extra sources'])) |
David Dean | f8b3544 | 2012-12-11 00:35:12 +0000 | [diff] [blame] | 728 | # Checkout the supplemental 'debuginfo-tests' repository. |
| 729 | debuginfo_url = 'http://llvm.org/svn/llvm-project/debuginfo-tests/trunk' |
| 730 | f.addStep(HostSVN(name='pull.debug-info tests', mode='incremental', |
| 731 | repourl=debuginfo_url, |
| 732 | method='fresh', |
| 733 | workdir='llvm/tools/clang/test/debuginfo-tests', |
| 734 | alwaysUseLatest=False, retry = (60, 5), |
| 735 | description='pull.debug-info tests')) |
| 736 | # Clean the install directory. |
| 737 | f.addStep(buildbot.steps.shell.ShellCommand( |
| 738 | name='rm.clang-install', command=['rm', '-rfv', 'clang-install'], |
| 739 | haltOnFailure=False, description=['rm dir', 'clang-install'], |
| 740 | workdir=WithProperties('%(builddir)s'))) |
| 741 | # Construct the configure arguments. |
| 742 | configure_args = ['../llvm/configure'] |
| 743 | configure_args.extend(config_options) |
| 744 | configure_args.extend(['--disable-bindings', '--with-llvmcc=clang', |
| 745 | '--without-llvmgcc', '--without-llvmgxx', |
| 746 | '--enable-keep-symbols']) |
| 747 | configure_args.append( |
Michael Gottesman | 65d940f | 2013-03-13 21:51:16 +0000 | [diff] [blame] | 748 | WithProperties('--prefix=%(builddir)s/clang-install')) |
Michael Gottesman | ca56e8f | 2013-03-06 22:27:38 +0000 | [diff] [blame] | 749 | |
David Dean | f8b3544 | 2012-12-11 00:35:12 +0000 | [diff] [blame] | 750 | # If we are using a previously built compiler, download it and override CC |
| 751 | # and CXX. |
| 752 | if is_bootstrap: |
| 753 | f = GetCompilerArtifacts(f) |
| 754 | else: |
| 755 | f = GetLatestValidated(f) |
| 756 | cc_command = ['find', 'host-compiler', '-name', 'clang'] |
| 757 | f.addStep(buildbot.steps.shell.SetProperty( |
| 758 | name='find.cc', |
| 759 | command=cc_command, |
| 760 | extract_fn=find_cc, |
| 761 | workdir=WithProperties('%(builddir)s'))) |
| 762 | f.addStep(buildbot.steps.shell.ShellCommand( |
| 763 | name='sanity.test', haltOnFailure=True, |
| 764 | command=[WithProperties('%(builddir)s/%(cc_path)s'), '-v'], |
| 765 | description=['sanity test'])) |
| 766 | configure_args.extend([ |
| 767 | WithProperties('CC=%(builddir)s/%(cc_path)s'), |
| 768 | WithProperties('CXX=%(builddir)s/%(cc_path)s++')]) |
Michael Gottesman | 65d940f | 2013-03-13 21:51:16 +0000 | [diff] [blame] | 769 | |
| 770 | # If we need to use lto, find liblto, add in proper flags here, etc. |
| 771 | if use_lto: |
Michael Gottesman | 01f0a62 | 2013-03-13 22:38:38 +0000 | [diff] [blame] | 772 | liblto_command = ['find', WithProperties('%(builddir)s/host-compiler'), |
| 773 | '-name', 'libLTO.dylib'] |
Michael Gottesman | 1da57ae | 2013-03-13 21:54:23 +0000 | [diff] [blame] | 774 | f.addStep(buildbot.steps.shell.SetProperty( |
Michael Gottesman | 65d940f | 2013-03-13 21:51:16 +0000 | [diff] [blame] | 775 | name='find.liblto', |
| 776 | command=liblto_command, |
| 777 | extract_fn=find_liblto, |
| 778 | workdir=WithProperties('%(builddir)s'))) |
| 779 | configure_args.append( |
| 780 | '--with-extra-options=-flto -gline-tables-only') |
| 781 | |
David Dean | f8b3544 | 2012-12-11 00:35:12 +0000 | [diff] [blame] | 782 | # Configure the LLVM build. |
| 783 | f.addStep(buildbot.steps.shell.ShellCommand( |
| 784 | name='configure.with.host', command=configure_args, |
| 785 | haltOnFailure=True, description=['configure'], |
| 786 | workdir=clang_build_dir)) |
| 787 | # Build the compiler. |
Michael Gottesman | 65d940f | 2013-03-13 21:51:16 +0000 | [diff] [blame] | 788 | make_command = ['make', '-j', WithProperties('%(jobs)s')] |
Michael Gottesman | bab77ac | 2013-03-14 05:36:53 +0000 | [diff] [blame] | 789 | timeout = 20*60 # Normal timeout is 20 minutes. |
Michael Gottesman | 65d940f | 2013-03-13 21:51:16 +0000 | [diff] [blame] | 790 | if use_lto: |
| 791 | make_command.append(WithProperties('DYLD_LIBRARY_PATH=%(liblto_path)s')) |
Michael Gottesman | 4ec74de | 2013-03-25 20:23:45 +0000 | [diff] [blame] | 792 | timeout = 120*60 # LTO timeout is 120 minutes. |
Michael Gottesman | 65d940f | 2013-03-13 21:51:16 +0000 | [diff] [blame] | 793 | |
David Dean | f8b3544 | 2012-12-11 00:35:12 +0000 | [diff] [blame] | 794 | f.addStep(buildbot.steps.shell.ShellCommand( |
Michael Gottesman | 65d940f | 2013-03-13 21:51:16 +0000 | [diff] [blame] | 795 | name='make', command=make_command, |
Michael Gottesman | bab77ac | 2013-03-14 05:36:53 +0000 | [diff] [blame] | 796 | haltOnFailure=True, description=['make'], workdir=clang_build_dir, |
| 797 | timeout=timeout)) |
David Dean | f8b3544 | 2012-12-11 00:35:12 +0000 | [diff] [blame] | 798 | # Use make install-clang to produce minimal archive for use by downstream |
| 799 | # builders. |
| 800 | f.addStep(buildbot.steps.shell.ShellCommand( |
| 801 | name='make.install-clang', haltOnFailure=True, |
Michael Gottesman | f8748fb | 2013-03-28 06:21:03 +0000 | [diff] [blame] | 802 | command=['make', 'install-clang', '-j', |
| 803 | WithProperties('%(jobs)s'), |
| 804 | 'RC_SUPPORTED_ARCHS=armv7 i386 x86_64'], |
David Dean | f8b3544 | 2012-12-11 00:35:12 +0000 | [diff] [blame] | 805 | description=['make install'], workdir=clang_build_dir)) |
| 806 | # Save artifacts of this build for use by other builders. |
| 807 | f = uploadArtifacts(f) |
| 808 | # Run the LLVM and Clang regression tests. |
David Blaikie | 8ec3752 | 2013-01-09 21:24:24 +0000 | [diff] [blame] | 809 | f.addStep(LitTestCommand(name='run.llvm.tests', haltOnFailure=True, |
David Dean | f8b3544 | 2012-12-11 00:35:12 +0000 | [diff] [blame] | 810 | command=['make', '-j', WithProperties('%(jobs)s'), |
David Blaikie | 4715cb4 | 2013-01-02 21:53:19 +0000 | [diff] [blame] | 811 | 'VERBOSE=1', 'check-all'], |
| 812 | description=['all', 'tests'], |
David Blaikie | ee45c6e | 2013-01-02 21:50:47 +0000 | [diff] [blame] | 813 | workdir=clang_build_dir)) |
David Dean | f8b3544 | 2012-12-11 00:35:12 +0000 | [diff] [blame] | 814 | return f |