Skip to content

Commit 1c51d86

Browse files
[green-dragon-migration] Rename build scripts (#156)
Follow up from #155 * rename build.py -> old_build.py (and associated test file) * rename monorepo_build.py -> build.py (and associated test file) * create symlink from monorepo_build.py -> build.py
1 parent 80b6589 commit 1c51d86

File tree

6 files changed

+1787
-1785
lines changed

6 files changed

+1787
-1785
lines changed

test/jenkins/test_build.py

Lines changed: 32 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,12 @@
33
# RUN: export TESTING=1
44
# RUN: export JOB_NAME="FOO"
55
# RUN: export BUILD_NUMBER=321
6-
# RUN: export BRANCH=master
6+
# RUN: export BRANCH=main
77
# Tell build.py to just print commands instead of running.
8-
# RUN: export LLVM_REV=1234
9-
# RUN: mkdir -p %t.SANDBOX/host-compiler/lib %t.SANDBOX/host-compiler/bin %t.SANDBOX/llvm.src %t.SANDBOX/clang.src %t.SANDBOX/libcxx.src %t.SANDBOX/compiler-rt.src %t.SANDBOX/debuginfo-tests.src %t.SANDBOX/clang-tools-extra.src %t.SANDBOX/lldb.src
8+
# RUN: mkdir -p %t.SANDBOX/host-compiler/lib %t.SANDBOX/host-compiler/bin %t.SANDBOX/llvm-project/llvm %t.SANDBOX/llvm-project/clang %t.SANDBOX/llvm-project/compiler-rt %t.SANDBOX/llvm-project/debuginfo-tests %t.SANDBOX/llvm-project/clang-tools-extra %t.SANDBOX/llvm-project/lldb
109
# RUN: touch %t.SANDBOX/host-compiler/bin/clang
1110
# RUN: python %{src_root}/zorg/jenkins/build.py clang all > %t.log
1211
# RUN: FileCheck --check-prefix CHECK-SIMPLE < %t.log %s
13-
# CHECK-SIMPLE: @@@ Setup debug-info tests @@@
14-
# CHECK-SIMPLE: cd
15-
# CHECK-SIMPLE: 'rm' '-rf' 'llvm/tools/clang/test/debuginfo-tests'
16-
# CHECK-SIMPLE: cd
17-
# CHECK-SIMPLE: 'ln'
18-
# CHECK-SIMPLE: @@@@@@
1912
# CHECK-SIMPLE: @@@ Build Directory @@@
2013
# CHECK-SIMPLE: cd
2114
# CHECK-SIMPLE: 'mkdir' '-p'
@@ -27,6 +20,7 @@
2720
# CHECK-SIMPLE: '/usr/local/bin/cmake' '-G' 'Ninja' '-C'
2821
# CHECK-SIMPLE: '-DLLVM_ENABLE_ASSERTIONS:BOOL=FALSE'
2922
# CHECK-SIMPLE: '-DCMAKE_BUILD_TYPE=RelWithDebInfo'
23+
# CHECK-SIMPLE: '-DLLVM_ENABLE_PROJECTS=clang;clang-tools-extra;compiler-rt'
3024
# CHECK-SIMPLE: '-DCMAKE_MAKE_PROGRAM=/usr/local/bin/ninja'
3125
# CHECK-SIMPLE: '-DLLVM_VERSION_PATCH=99'
3226
# CHECK-SIMPLE: '-DLLVM_VERSION_SUFFIX=""'
@@ -35,9 +29,7 @@
3529
# CHECK-SIMPLE: Apple.cmake'
3630
# CHECK-SIMPLE: '-DCOMPILER_RT_BUILD_SANITIZERS=On'
3731
# CHECK-SIMPLE: '-DCMAKE_INSTALL_PREFIX
38-
# CHECK-SIMPLE: '-DLLVM_REPOSITORY=/foo/workspace/llvm.src'
3932
# CHECK-SIMPLE: '-DCLANG_APPEND_VC_REV=On'
40-
# CHECK-SIMPLE: '-DSVN_REVISION=1234'
4133
# CHECK-SIMPLE: '-DLLVM_BUILD_TESTS=On'
4234
# CHECK-SIMPLE: '-DLLVM_INCLUDE_TESTS=On'
4335
# CHECK-SIMPLE: '-DCLANG_INCLUDE_TESTS=On'
@@ -62,6 +54,13 @@
6254
# CHECK-ASSERT: '/usr/local/bin/cmake' '-G' 'Ninja' '-C'
6355
# CHECK-ASSERT: '-DLLVM_ENABLE_ASSERTIONS:BOOL=TRUE'
6456

57+
# Check that sccache is enabled when --sccache arg is passed
58+
# RUN: python %{src_root}/zorg/jenkins/build.py clang all --sccache > %t-sccache.log
59+
# RUN: FileCheck --check-prefix CHECK-SCCACHE < %t-sccache.log %s
60+
# CHECK-SCCACHE: '/usr/local/bin/cmake' '-G' 'Ninja' '-C'
61+
# CHECK-SCCACHE: '-DCMAKE_C_COMPILER_LAUNCHER=/usr/local/bin/sccache'
62+
# CHECK-SCCACHE: '-DCMAKE_CXX_COMPILER_LAUNCHER=/usr/local/bin/sccache'
63+
6564
# Check LTO
6665

6766
# RUN: python %{src_root}/zorg/jenkins/build.py clang all --lto > %t-lto.log
@@ -84,7 +83,7 @@
8483
# CHECK-CMAKE: -DLLVM_BUILD_EXAMPLES=On
8584
# CHECK-CMAKE: '-DCMAKE_BUILD_TYPE=Debug'
8685
# CHECK-CMAKE: '-DLLVM_ENABLE_ASSERTIONS=Off'
87-
# CHECK-CMAKE: -DLLVM_LIT_ARGS=--xunit-xml-output=testresults.xunit.xml -v --timeout=600
86+
# CHECK-CMAKE: -DLLVM_LIT_ARGS=--xunit-xml-output=testresults.xunit.xml -v -vv --timeout=600
8887
# CHECK-CMAKE: '/usr/local/bin/ninja' '-v' 'all'
8988
# CHECK-CMAKE: '/usr/local/bin/ninja' '-v' '-k' '0' 'check-all'
9089

@@ -93,43 +92,12 @@
9392
# RUN: python %{src_root}/zorg/jenkins/build.py cmake test
9493
# RUN: python %{src_root}/zorg/jenkins/build.py cmake testlong
9594

96-
# Derive Functions
97-
98-
# RUN: cd %t.SANDBOX; python %{src_root}/zorg/jenkins/build.py derive > %t-derive.log
99-
# RUN: FileCheck --check-prefix CHECK-DERIVE < %t-derive.log %s
100-
# CHECK-DERIVE: @@@ Derive Source @@@
101-
# CHECK-DERIVE: cd
102-
# CHCEK-DERIVE: Output/test_build.py.tmp.SANDBOX/llvm
103-
# CHECK-DERIVE: 'rsync' '-auvh' '--delete' '--exclude=.svn/' '--exclude=/tools/clang' '--exclude=/projects/libcxx' '--exclude=/tools/clang/tools/extra' '--exclude=/projects/compiler-rt'
104-
# CHECK-DERIVE: /llvm.src/'
105-
# CHECK-DERIVE: test_build.py.tmp.SANDBOX/llvm'
106-
# CHECK-DERIVE: 'rsync' '-auvh' '--delete' '--exclude=.svn/' '--exclude=/tools/clang/tools/extra'
107-
# CHECK-DERIVE: test_build.py.tmp.SANDBOX/clang.src/'
108-
# CHECK-DERIVE: test_build.py.tmp.SANDBOX/llvm/tools/clang'
109-
# CHECK-DERIVE: 'rsync' '-auvh' '--delete' '--exclude=.svn/'
110-
# CHECK-DERIVE: test_build.py.tmp.SANDBOX/libcxx.src/'
111-
# CHECK-DERIVE:test_build.py.tmp.SANDBOX/llvm/projects/libcxx'
112-
# CHECK-DERIVE: 'rsync' '-auvh' '--delete' '--exclude=.svn/'
113-
# CHECK-DERIVE: test_build.py.tmp.SANDBOX/clang-tools-extra.src/'
114-
# CHECK-DERIVE: test_build.py.tmp.SANDBOX/llvm/tools/clang/tools/extra'
115-
# CHECK-DERIVE: 'rsync' '-auvh' '--delete' '--exclude=.svn/'
116-
# CHECK-DERIVE: test_build.py.tmp.SANDBOX/compiler-rt.src/'
117-
# CHECK-DERIVE: test_build.py.tmp.SANDBOX/llvm/projects/compiler-rt'
118-
# CHECK-DERIVE: @@@@@@
119-
120-
121-
122-
# RUN: cd %t.SANDBOX; python %{src_root}/zorg/jenkins/build.py derive-lldb
123-
# RUN: cd %t.SANDBOX; python %{src_root}/zorg/jenkins/build.py derive-llvm+clang
124-
# RUN: cd %t.SANDBOX; python %{src_root}/zorg/jenkins/build.py derive-llvm
125-
12695
# RUN: python %{src_root}/zorg/jenkins/build.py cmake all --lto | FileCheck --check-prefix CHECK-CMAKELTO %s
12796
# CHECK-CMAKELTO: '/usr/local/bin/cmake' '-G' 'Ninja'
12897
# CHECK-CMAKELTO: '-DLLVM_BUILD_EXAMPLES=Off'
12998
# CHECK-CMAKELTO-NOT:: '-DLLVM_ENABLE_LTO=Off
13099
# CHECK-CMAKELTO: '-DLLVM_PARALLEL_LINK_JOBS=1'
131100
# CHECK-CMAKELTO: '-DCMAKE_BUILD_TYPE=Release'
132-
# CHECK-CMAKELTO: '-DSVN_REVISION=1234'
133101

134102
# RUN: env MAX_PARALLEL_LINKS=2 python %{src_root}/zorg/jenkins/build.py cmake all --lto | FileCheck --check-prefix CHECK-CMAKE-PAR-LTO %s
135103
# CHECK-CMAKE-PAR-LTO: '/usr/local/bin/cmake' '-G' 'Ninja'
@@ -140,7 +108,7 @@
140108

141109
# RUN: env MAX_PARALLEL_TESTS=2 python %{src_root}/zorg/jenkins/build.py cmake all | FileCheck --check-prefix CHECK-CMAKE-2-TESTS %s
142110
# CHECK-CMAKE-2-TESTS: '/usr/local/bin/cmake' '-G' 'Ninja'
143-
# CHECK-CMAKE-2-TESTS: '-DLLVM_LIT_ARGS=--xunit-xml-output=testresults.xunit.xml -v --timeout=600 -j 2'
111+
# CHECK-CMAKE-2-TESTS: '-DLLVM_LIT_ARGS=--xunit-xml-output=testresults.xunit.xml -v -vv --timeout=600 -j 2'
144112

145113
# RUN: python %{src_root}/zorg/jenkins/build.py cmake all --cmake-type=RelWithDebugInfo | FileCheck --check-prefix CHECK-CMAKE-UPLOADS %s
146114
# CHECK-CMAKE-UPLOADS: @@@ Uploading Artifact @@@
@@ -169,3 +137,23 @@
169137
# Test long should always do check-all, since that is what many bots expect.
170138
# RUN: python %{src_root}/zorg/jenkins/build.py cmake testlong | FileCheck --check-prefix CHECK-TTARGETS2 %s
171139
# CHECK-TTARGETS2: '/usr/local/bin/ninja' '-v' '-k' '0' 'check-all'
140+
141+
# Test to check if timeout flag is actually being set.
142+
# RUN: python %{src_root}/zorg/jenkins/build.py cmake all --timeout=900 > %t-timeout.log
143+
# RUN: FileCheck --check-prefix CHECK-TIMEOUT < %t-timeout.log %s
144+
# CHECK-TIMEOUT: --timeout=900
145+
146+
# Test to check if default timeout is being set to 600.
147+
# RUN: python %{src_root}/zorg/jenkins/build.py cmake all > %t-timeout-default.log
148+
# RUN: FileCheck --check-prefix CHECK-TIMEOUT-DEFAULT < %t-timeout-default.log %s
149+
# CHECK-TIMEOUT-DEFAULT: --timeout=600
150+
151+
# RUN: python %{src_root}/zorg/jenkins/build.py lldb-cmake-matrix configure \
152+
# RUN: --lldb-test-compiler="MY_LLDB_TEST_COMPILER" \
153+
# RUN: --cmake-flag=-DLLVM_TARGETS_TO_BUILD=X86 > %t-lldb-configure.log
154+
# RUN: FileCheck --check-prefix CHECK-LLDB-CONFIG < %t-lldb-configure.log %s
155+
156+
# CHECK-LLDB-CONFIG: -DLLDB_TEST_COMPILER=MY_LLDB_TEST_COMPILER
157+
# CHECK-LLDB-CONFIG: -DLLVM_TARGETS_TO_BUILD=X86
158+
# there may be other "target to build", but the one above should be the last:
159+
# CHECK-LLDB-CONFIG-NOT: -DLLVM_TARGETS_TO_BUILD

test/jenkins/test_monorepo_build.py

Lines changed: 0 additions & 159 deletions
This file was deleted.

0 commit comments

Comments
 (0)