Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(74)

Side by Side Diff: buildbot/buildbot_pnacl_merge.sh

Issue 7524023: New LLVM merging bots (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client/
Patch Set: '' Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « buildbot/buildbot_pnacl2.sh ('k') | buildbot/buildbot_selector.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #!/bin/bash
2 # Copyright (c) 2011 The Native Client Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file.
5
6 set -u
7 set -e
8
9 # Script assumed to be run in native_client/
10 if [[ $(pwd) != */native_client ]]; then
11 echo 'ERROR: must be run in native_client/ directory!'
12 echo " (Current directory is $(pwd))"
13 exit 1
14 fi
15
16 RETCODE=0
17
18 export UTMAN_BUILDBOT=true
19 export UTMAN_USE_MQ=false
20 export UTMAN_UPSTREAM=true
21 export UTMAN_UPSTREAM_SKIP_UPDATE=true
22
23 UTMAN=tools/llvm/utman.sh
24 MERGE_TOOL=tools/llvm/merge-tool.sh
25 SPEC2K_SCRIPT=buildbot/buildbot_spec2k.sh
26 UTMAN_TEST=tools/llvm/utman-test.sh
27
28 clobber() {
29 echo @@@BUILD_STEP clobber@@@
30 rm -rf scons-out compiler ../xcodebuild ../sconsbuild ../out \
31 src/third_party/nacl_sdk/arm-newlib
32 rm -rf toolchain/pnacl* toolchain/hg* toolchain/test-log
33 rm -rf ../toolchain
34 # Try to clobber /tmp/ contents to clear temporary chrome files.
35 rm -rf /tmp/.org.chromium.Chromium.*
36 }
37
38 show-config() {
39 echo @@@BUILD_STEP show-config@@@
40 ${UTMAN} show-config
41 }
42
43 build-pnacl() {
44 echo @@@BUILD_STEP compile_toolchain@@@
45 ${UTMAN} clean
46 ${UTMAN} everything-translator
47 }
48
49 utman-test() {
50 local testname=$1
51 echo @@@BUILD_STEP ${testname}@@@
52 ${UTMAN_TEST} ${testname} ||
53 { RETCODE=$? && echo @@@STEP_FAILURE@@@;}
54
55 }
56
57 # The slow-bot runs every available test on the last committed merge.
58 # This includes the scons tests, chrome browser tests, and Spec2K.
59 # When this bot is all green, we know the merge is in perfect condition,
60 # and can safely be used in the PNaCl toolchain.
61 slow-bot() {
62 clobber
63 show-config
64 ${UTMAN} hg-update-upstream
65 build-pnacl
66
67 # SCons Tests
68 utman-test test-x86-32
69 utman-test test-x86-32-pic
70 utman-test test-x86-32-browser
71 utman-test test-x86-64
72 utman-test test-x86-64-pic
73 utman-test test-x86-64-browser
74 # TODO(pdox): Enable after MC bug is fixed
75 # utman-test test-arm
76 # utman-test test-arm-pic
77
78 # Spec2K
79 CLOBBER=no ${SPEC2K_SCRIPT} pnacl-x8632
80 CLOBBER=no ${SPEC2K_SCRIPT} pnacl-x8664
81 # TODO(pdox): Enable after MC bug is fixed
82 # CLOBBER=no ${SPEC2K_SCRIPT} pnacl-arm
83 }
84
85 # The fast bot performs the actual merges.
86 #
87 # Given a new LLVM SVN revision, it performs an automatic merge,
88 # compiles the toolchain, and then runs some basic tests.
89 # If those tests pass, then the merge is committed.
90 #
91 # This bot must remain 'fast' to keep up with commits on the LLVM tree.
92 # Otherwise, it becomes difficult to track which upstream revision broke
93 # the merge. This is why this bot only runs a small sampling of tests.
94 #
95 # As a result, imperfect merges may be committed, but those will be
96 # discovered by the slow-bot.
97 fast-bot() {
98 clobber
99 show-config
100
101 # Disable this bot until we are merged
102 # up to the tip and all tests are passing
103 return 0
104
105 ${MERGE_TOOL} auto
106 build-pnacl
107 utman-test test-x86-32
108 utman-test test-x86-64
109 utman-test test-arm
110 # TODO(pdox): Add a few Spec2K tests
111 commit-and-push-merge
112 }
113
114 commit-and-push-merge() {
115 echo "@@@BUILD_STEP commit-and-push-merge@@@"
116 if [ ${RETCODE} -eq 0 ]; then
117 ${MERGE_TOOL} final-commit
118 echo "@@@STEP_SUCCESS@@@"
119 else
120 echo "Skipping due to prior failure(s)"
121 echo "@@@STEP_FAILURE@@@"
122 fi
123 }
124
125 if [[ $# -eq 0 ]] ; then
126 echo "you must specify a mode on the commandline:"
127 exit 1
128 fi
129
130 if [ "$(type -t $1)" != "function" ]; then
131 Usage
132 echo "ERROR: unknown mode '$1'." >&2
133 exit 1
134 fi
135
136 "$@"
137
138 if [[ ${RETCODE} != 0 ]]; then
139 echo "@@@BUILD_STEP summary@@@"
140 echo There were failed stages.
141 exit ${RETCODE}
142 fi
OLDNEW
« no previous file with comments | « buildbot/buildbot_pnacl2.sh ('k') | buildbot/buildbot_selector.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698