OLD | NEW |
---|---|
(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@@@ | |
jvoung - send to chromium...
2011/07/28 23:48:54
should this check if the clobber env var is set?
pdox
2011/07/29 00:05:55
CLOBBER is probably not useful here.
| |
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 | |
jvoung - send to chromium...
2011/07/28 23:48:54
this leaves "sdk" around for spec testing right?
pdox
2011/07/29 00:05:55
yes, but that's not critical.
scons uses its own
| |
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 slow-bot() { | |
jvoung - send to chromium...
2011/07/28 23:48:54
Comment on difference between slow-bot and fast-bo
pdox
2011/07/29 00:05:55
Done.
| |
58 clobber | |
59 show-config | |
60 ${UTMAN} hg-update-upstream | |
61 build-pnacl | |
62 | |
63 # SCons Tests | |
64 utman-test test-x86-32 | |
65 utman-test test-x86-32-pic | |
66 utman-test test-x86-32-browser | |
67 utman-test test-x86-64 | |
68 utman-test test-x86-64-pic | |
69 utman-test test-x86-64-browser | |
70 # TODO(pdox): Enable after MC bug is fixed | |
71 # utman-test test-arm | |
72 # utman-test test-arm-pic | |
73 | |
74 # Spec2K | |
75 CLOBBER=no ${SPEC2K_SCRIPT} pnacl-x8632 | |
76 CLOBBER=no ${SPEC2K_SCRIPT} pnacl-x8664 | |
77 # TODO(pdox): Enable after MC bug is fixed | |
78 # CLOBBER=no ${SPEC2K_SCRIPT} pnacl-arm | |
79 } | |
80 | |
81 fast-bot() { | |
82 clobber | |
83 show-config | |
84 | |
85 # Disable this bot until we are merged | |
86 # up to the tip and all tests are passing | |
87 return 0 | |
88 | |
89 ${MERGE_TOOL} auto | |
jvoung - send to chromium...
2011/07/28 23:48:54
is there a change to merge tool to add an "auto" f
pdox
2011/07/29 00:05:55
yes, added. It is not quite ready, but 90% there.
| |
90 build-pnacl | |
91 utman-test test-x86-32 | |
92 utman-test test-x86-64 | |
93 utman-test test-arm | |
94 # TODO(pdox): Add a few Spec2K tests | |
95 commit-and-push-merge | |
96 } | |
97 | |
98 commit-and-push-merge() { | |
99 echo "@@@BUILD_STEP commit-and-push-merge@@@" | |
100 if [ ${RETCODE} -eq 0 ]; then | |
101 ${MERGE_TOOL} final-commit | |
102 echo "@@@STEP_SUCCESS@@@" | |
103 else | |
104 echo "Skipping due to prior failure(s)" | |
105 echo "@@@STEP_FAILURE@@@" | |
106 fi | |
107 } | |
108 | |
109 if [[ $# -eq 0 ]] ; then | |
110 echo "you must specify a mode on the commandline:" | |
111 exit 1 | |
112 fi | |
113 | |
114 if [ "$(type -t $1)" != "function" ]; then | |
115 Usage | |
116 echo "ERROR: unknown mode '$1'." >&2 | |
117 exit 1 | |
118 fi | |
119 | |
120 "$@" | |
121 | |
122 if [[ ${RETCODE} != 0 ]]; then | |
123 echo "@@@BUILD_STEP summary@@@" | |
124 echo There were failed stages. | |
125 exit ${RETCODE} | |
126 fi | |
OLD | NEW |