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

Side by Side Diff: build_tools/buildbot_selector.sh

Issue 937133004: Add support for nacl-clang bots (Closed) Base URL: https://chromium.googlesource.com/external/naclports.git@master
Patch Set: Created 5 years, 10 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/bin/bash 1 #!/bin/bash
2 # Copyright (c) 2012 The Native Client Authors. All rights reserved. 2 # Copyright (c) 2012 The Native Client Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 # Use of this source code is governed by a BSD-style license that can be 6 # Use of this source code is governed by a BSD-style license that can be
7 # found in the LICENSE file. 7 # found in the LICENSE file.
8 8
9 # Main entry point for buildbots. 9 # Main entry point for buildbots.
10 # For local testing set BUILDBOT_BUILDERNAME and TEST_BUILDBOT, e.g: 10 # For local testing set BUILDBOT_BUILDERNAME and TEST_BUILDBOT, e.g:
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 readonly TRYBOT=1 90 readonly TRYBOT=1
91 readonly NIGHTLY=0 91 readonly NIGHTLY=0
92 elif [ "${PREFIX}" = "nightly-" ]; then 92 elif [ "${PREFIX}" = "nightly-" ]; then
93 readonly TRYBOT=0 93 readonly TRYBOT=0
94 readonly NIGHTLY=1 94 readonly NIGHTLY=1
95 else 95 else
96 readonly TRYBOT=0 96 readonly TRYBOT=0
97 readonly NIGHTLY=0 97 readonly NIGHTLY=0
98 fi 98 fi
99 readonly OS=${BASH_REMATCH[2]} 99 readonly OS=${BASH_REMATCH[2]}
100 readonly LIBC=${BASH_REMATCH[3]} 100 readonly BOT_TYPE=${BASH_REMATCH[3]}
101 readonly SHARD=${BASH_REMATCH[4]} 101 readonly SHARD=${BASH_REMATCH[4]}
102 else 102 else
103 echo "Bad BUILDBOT_BUILDERNAME: ${BUILDBOT_BUILDERNAME}" 1>&2 103 echo "Bad BUILDBOT_BUILDERNAME: ${BUILDBOT_BUILDERNAME}" 1>&2
104 exit 1 104 exit 1
105 fi 105 fi
106 106
107 # Don't upload periodic or trybot builds. 107 # Don't upload periodic or trybot builds.
108 if [ "${TRYBOT}" = "1" -o "${NIGHTLY}" = "1" ]; then 108 if [ "${TRYBOT}" = "1" -o "${NIGHTLY}" = "1" ]; then
109 NACLPORTS_NO_UPLOAD=1 109 NACLPORTS_NO_UPLOAD=1
110 fi 110 fi
111 111
112 # Select platform specific things. 112 # Select platform specific things.
113 if [ "${OS}" = "win" ]; then 113 if [ "${OS}" = "win" ]; then
114 PYTHON=python.bat 114 PYTHON=python.bat
115 fi 115 fi
116 116
117 # Select libc 117 # Convert toolchain contains in the bot name to valid TOOLCHAIN value
118 if [ "${LIBC}" = "glibc" ]; then 118 # as expected by the SDK tools.
119 TOOLCHAIN=glibc 119 # TODO(sbc): remove this first case once that bot names contain 'pnacl'
120 elif [ "${LIBC}" = "newlib" ]; then 120 # rather than 'pancl_newlib'.
121 TOOLCHAIN=newlib 121 if [ "${BOT_TYPE}" = "pnacl_newlib" ]; then
122 elif [ "${LIBC}" = "pnacl_newlib" ]; then
123 TOOLCHAIN=pnacl 122 TOOLCHAIN=pnacl
124 elif [ "${LIBC}" = "bionic" ]; then 123 elif [ "${BOT_TYPE}" = "clang" ]; then
125 TOOLCHAIN=bionic 124 TOOLCHAIN=clang-newlib
126 else 125 else
127 echo "Bad LIBC: ${LIBC}" 1>&2 126 TOOLCHAIN=${BOT_TYPE}
128 exit 1
129 fi 127 fi
130 128
131 # Select shard count 129 # Select shard count
132 if [ "${OS}" = "mac" ]; then 130 if [ "${OS}" = "mac" ]; then
133 SHARDS=2 131 SHARDS=2
134 elif [ "${OS}" = "linux" ]; then 132 elif [ "${OS}" = "linux" ]; then
135 if [ "${TOOLCHAIN}" = "glibc" ]; then 133 if [ "${TOOLCHAIN}" = "bionic" ]; then
134 SHARDS=1
135 else
136 SHARDS=5 136 SHARDS=5
137 elif [ "${TOOLCHAIN}" = "newlib" ]; then
138 SHARDS=5
139 elif [ "${TOOLCHAIN}" = "bionic" ]; then
140 SHARDS=1
141 elif [ "${TOOLCHAIN}" = "pnacl" ]; then
142 SHARDS=5
143 else
144 echo "Unspecified sharding for TOOLCHAIN: ${TOOLCHAIN}" 1>&2
145 fi 137 fi
146 else 138 else
147 echo "Unspecified sharding for OS: ${OS}" 1>&2 139 echo "Unspecified sharding for OS: ${OS}" 1>&2
148 fi 140 fi
149 141
150 # For the trybots we have 5 shards for each toolchain 142 # For the trybots we have 5 shards for each toolchain
151 if [ "${TRYBOT}" = "1" ]; then 143 if [ "${TRYBOT}" = "1" ]; then
152 SHARDS=5 144 SHARDS=5
153 fi 145 fi
154 fi 146 fi
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 Publish 218 Publish
227 fi 219 fi
228 220
229 echo "@@@BUILD_STEP Summary@@@" 221 echo "@@@BUILD_STEP Summary@@@"
230 if [ "${RESULT}" != "0" ] ; then 222 if [ "${RESULT}" != "0" ] ; then
231 echo "@@@STEP_FAILURE@@@" 223 echo "@@@STEP_FAILURE@@@"
232 echo -e "${MESSAGES}" 224 echo -e "${MESSAGES}"
233 fi 225 fi
234 226
235 exit ${RESULT} 227 exit ${RESULT}
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698