| OLD | NEW |
| 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 set -o xtrace | 6 set -o xtrace |
| 7 set -o nounset | 7 set -o nounset |
| 8 set -o errexit | 8 set -o errexit |
| 9 | 9 |
| 10 ###################################################################### | 10 ###################################################################### |
| 11 # SCRIPT CONFIG | 11 # SCRIPT CONFIG |
| 12 ###################################################################### | 12 ###################################################################### |
| 13 | 13 |
| 14 CLOBBER=${CLOBBER:-yes} | 14 readonly CLOBBER=${CLOBBER:-yes} |
| 15 SCONS_TRUSTED="./scons --mode=opt-host -j8" | 15 readonly SCONS_TRUSTED="./scons --mode=opt-host -j8" |
| 16 SCONS_NACL="./scons --mode=opt-host,nacl -j8" | 16 readonly SCONS_NACL="./scons --mode=opt-host,nacl -j8" |
| 17 SPEC_HARNESS=${SPEC_HARNESS:-${HOME}/cpu2000-redhat64-ia32}/ | 17 readonly SPEC_HARNESS=${SPEC_HARNESS:-${HOME}/cpu2000-redhat64-ia32}/ |
| 18 | 18 |
| 19 TRYBOT_TESTS="176.gcc 179.art 181.mcf 197.parser 252.eon 254.gap" | 19 readonly TRYBOT_TESTS="176.gcc 179.art 181.mcf 197.parser 252.eon 254.gap" |
| 20 TRYBOT_TRANSLATOR_TESTS="176.gcc" | 20 readonly TRYBOT_TRANSLATOR_TESTS="176.gcc" |
| 21 TRYBOT_X86_64_ZERO_BASED_SANDBOX_TESTS="176.gcc" | 21 readonly TRYBOT_X86_64_ZERO_BASED_SANDBOX_TESTS="176.gcc" |
| 22 | 22 |
| 23 readonly BUILDBOT_PNACL="buildbot/buildbot_pnacl.sh" | 23 readonly BUILDBOT_PNACL="buildbot/buildbot_pnacl.sh" |
| 24 readonly UP_DOWN_LOAD="buildbot/file_up_down_load.sh" | 24 readonly UP_DOWN_LOAD="buildbot/file_up_down_load.sh" |
| 25 | 25 |
| 26 SPEC_BASE="tests/spec2k" | 26 readonly SPEC_BASE="tests/spec2k" |
| 27 readonly ARCHIVE_NAME=$(${SPEC_BASE}/run_all.sh GetTestArchiveName) | 27 readonly ARCHIVE_NAME=$(${SPEC_BASE}/run_all.sh GetTestArchiveName) |
| 28 | 28 |
| 29 readonly NAME_ARM_TRY_UPLOAD=$(${BUILDBOT_PNACL} NAME_ARM_TRY_UPLOAD) | 29 readonly NAME_ARM_TRY_UPLOAD=$(${BUILDBOT_PNACL} NAME_ARM_TRY_UPLOAD) |
| 30 readonly NAME_ARM_TRY_DOWNLOAD=$(${BUILDBOT_PNACL} NAME_ARM_TRY_DOWNLOAD) | 30 readonly NAME_ARM_TRY_DOWNLOAD=$(${BUILDBOT_PNACL} NAME_ARM_TRY_DOWNLOAD) |
| 31 readonly NAME_ARM_UPLOAD=$(${BUILDBOT_PNACL} NAME_ARM_UPLOAD) | 31 readonly NAME_ARM_UPLOAD=$(${BUILDBOT_PNACL} NAME_ARM_UPLOAD) |
| 32 readonly NAME_ARM_DOWNLOAD=$(${BUILDBOT_PNACL} NAME_ARM_DOWNLOAD) | 32 readonly NAME_ARM_DOWNLOAD=$(${BUILDBOT_PNACL} NAME_ARM_DOWNLOAD) |
| 33 | 33 |
| 34 readonly QEMU_TOOL="$(pwd)/toolchain/linux_arm-trusted/run_under_qemu_arm" |
| 35 |
| 36 # Note: the tool for updating the canned nexes lives at: |
| 37 # tools/canned_nexe_tool.sh |
| 38 readonly CANNED_NEXE_REV=1001 |
| 39 |
| 34 # If true, terminate script when first error is encountered. | 40 # If true, terminate script when first error is encountered. |
| 35 FAIL_FAST=${FAIL_FAST:-false} | 41 readonly FAIL_FAST=${FAIL_FAST:-false} |
| 36 RETCODE=0 | 42 RETCODE=0 |
| 37 | 43 |
| 38 # Print the number of tests being run for the buildbot status output | 44 # Print the number of tests being run for the buildbot status output |
| 39 testcount() { | 45 testcount() { |
| 40 local tests="$1" | 46 local tests="$1" |
| 41 if [[ ${tests} == "all" ]]; then | 47 if [[ ${tests} == "all" ]]; then |
| 42 echo "all" | 48 echo "all" |
| 43 else | 49 else |
| 44 echo ${tests} | wc -w | 50 echo ${tests} | wc -w |
| 45 fi | 51 fi |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 local tests="$1" | 127 local tests="$1" |
| 122 local try="$2" # set to "try" if this is a try run | 128 local try="$2" # set to "try" if this is a try run |
| 123 | 129 |
| 124 pushd ${SPEC_BASE} | 130 pushd ${SPEC_BASE} |
| 125 echo "@@@BUILD_STEP spec2k archive@@@" | 131 echo "@@@BUILD_STEP spec2k archive@@@" |
| 126 ./run_all.sh PackageArmBinaries ${tests} | 132 ./run_all.sh PackageArmBinaries ${tests} |
| 127 popd | 133 popd |
| 128 echo "@@@BUILD_STEP spec2k upload@@@" | 134 echo "@@@BUILD_STEP spec2k upload@@@" |
| 129 if [[ ${try} == "try" ]]; then | 135 if [[ ${try} == "try" ]]; then |
| 130 ${UP_DOWN_LOAD} UploadArmBinariesForHWBotsTry ${NAME_ARM_TRY_UPLOAD} \ | 136 ${UP_DOWN_LOAD} UploadArmBinariesForHWBotsTry ${NAME_ARM_TRY_UPLOAD} \ |
| 131 ${ARCHIVE_NAME} | 137 ${ARCHIVE_NAME} |
| 132 else | 138 else |
| 133 ${UP_DOWN_LOAD} UploadArmBinariesForHWBots ${NAME_ARM_UPLOAD} \ | 139 ${UP_DOWN_LOAD} UploadArmBinariesForHWBots ${NAME_ARM_UPLOAD} \ |
| 134 ${ARCHIVE_NAME} | 140 ${ARCHIVE_NAME} |
| 135 fi | 141 fi |
| 136 } | 142 } |
| 137 | 143 |
| 138 download-test-binaries() { | 144 download-test-binaries() { |
| 139 local try="$1" | 145 local try="$1" |
| 140 echo "@@@BUILD_STEP spec2k download@@@" | 146 echo "@@@BUILD_STEP spec2k download@@@" |
| 141 if [[ ${try} == "try" ]]; then | 147 if [[ ${try} == "try" ]]; then |
| 142 ${UP_DOWN_LOAD} DownloadArmBinariesForHWBotsTry ${NAME_ARM_TRY_DOWNLOAD} \ | 148 ${UP_DOWN_LOAD} DownloadArmBinariesForHWBotsTry ${NAME_ARM_TRY_DOWNLOAD} \ |
| 143 ${ARCHIVE_NAME} | 149 ${ARCHIVE_NAME} |
| 144 else | 150 else |
| 145 ${UP_DOWN_LOAD} DownloadArmBinariesForHWBots ${NAME_ARM_DOWNLOAD} \ | 151 ${UP_DOWN_LOAD} DownloadArmBinariesForHWBots ${NAME_ARM_DOWNLOAD} \ |
| 146 ${ARCHIVE_NAME} | 152 ${ARCHIVE_NAME} |
| 147 fi | 153 fi |
| 148 echo "@@@BUILD_STEP spec2k untar@@@" | 154 echo "@@@BUILD_STEP spec2k untar@@@" |
| 149 pushd ${SPEC_BASE} | 155 pushd ${SPEC_BASE} |
| 150 ./run_all.sh UnpackArmBinaries | 156 ./run_all.sh UnpackArmBinaries |
| 151 popd | 157 popd |
| 152 } | 158 } |
| 153 | 159 |
| 160 download-validator-test-nexes() { |
| 161 local arch="$1" |
| 162 echo "@@@BUILD_STEP validator test download@@@" |
| 163 ${UP_DOWN_LOAD} DownloadArchivedNexes ${CANNED_NEXE_REV} \ |
| 164 "${arch}_giant" giant_nexe.tar.bz2 |
| 165 # This generates "CannedNexes/" in the current directory |
| 166 rm -rf CannedNexes |
| 167 tar jxf giant_nexe.tar.bz2 |
| 168 } |
| 169 |
| 170 get-validator() { |
| 171 local arch="$1" |
| 172 if [[ ${arch} == "x86-32" ]] ; then |
| 173 echo "$(pwd)/scons-out/opt-linux-x86-32/staging/ncval" |
| 174 elif [[ ${arch} == "x86-64" ]] ; then |
| 175 echo "$(pwd)/scons-out/opt-linux-x86-64/staging/ncval" |
| 176 elif [[ ${arch} == "arm" ]] ; then |
| 177 echo "$(pwd)/scons-out/opt-linux-arm/staging/arm-ncval-core" |
| 178 else |
| 179 echo "ERROR: unknown arch" |
| 180 fi |
| 181 } |
| 182 |
| 183 LogTimeHelper() { |
| 184 # This format is recognized by the buildbot system |
| 185 echo "RESULT $1_$2: $3= $(bc) secs" |
| 186 } |
| 187 |
| 188 LogTimedRun() { |
| 189 local graph=$1 |
| 190 local benchmark=$2 |
| 191 local variant=$3 |
| 192 shift 3 |
| 193 # S: system mode CPU-seconds used by the process |
| 194 # U: user mode CPU-seconds used by the process |
| 195 # We add a plus sign inbetween so that we can pipe the output to "bc" |
| 196 # Note: the >() magic creates a "fake" file (think named pipe) |
| 197 # which passes the output of time to LogTimeHelper |
| 198 /usr/bin/time -f "%U + %S" \ |
| 199 --output >(LogTimeHelper ${graph} ${benchmark} ${variant}) \ |
| 200 "$@" |
| 201 } |
| 202 |
| 203 build-validator() { |
| 204 local arch="$1" |
| 205 echo "@@@BUILD_STEP build validator [${arch}]@@@" |
| 206 if [[ ${arch} == "arm" ]] ; then |
| 207 # TODO(robertm): build the validator |
| 208 echo "NYI" |
| 209 else |
| 210 ${SCONS_NACL} platform=${arch} ncval |
| 211 fi |
| 212 } |
| 213 |
| 214 measure-validator-speed() { |
| 215 local arch="$1" |
| 216 local validator=$(get-validator ${arch}) |
| 217 |
| 218 echo "@@@BUILD_STEP validator speed test [${arch}]@@@" |
| 219 if [[ ! -e ${validator} ]] ; then |
| 220 echo "ERROR: missing validator executable: ${validator}" |
| 221 handle-error |
| 222 return |
| 223 fi |
| 224 |
| 225 if [[ ${arch} == "arm" && $(uname -p) != arm* ]] ; then |
| 226 # TODO(robertm): build the validator |
| 227 validator="${QEMU_TOOL} ${validator}" |
| 228 fi |
| 229 |
| 230 for nexe in CannedNexes/* ; do |
| 231 echo "timing validation of ${nexe}" |
| 232 ls --size --block-size=1 ${nexe} |
| 233 LogTimedRun "validationtime" $(basename ${nexe}) "canned" \ |
| 234 ${validator} ${nexe} |
| 235 done |
| 236 } |
| 237 |
| 154 ###################################################################### | 238 ###################################################################### |
| 155 # NOTE: trybots only runs a subset of the the spec2k tests | 239 # NOTE: trybots only runs a subset of the the spec2k tests |
| 156 # TODO: elminate this long running bot in favor per arch sharded bots | 240 # TODO: elminate this long running bot in favor per arch sharded bots |
| 157 pnacl-trybot-arm-qemu() { | 241 pnacl-trybot-arm-qemu() { |
| 158 clobber | 242 clobber |
| 159 build-prerequisites "arm" "bitcode" | 243 build-prerequisites "arm" "bitcode" |
| 160 build-tests SetupPnaclArmOpt "${TRYBOT_TESTS}" 1 1 | 244 build-tests SetupPnaclArmOpt "${TRYBOT_TESTS}" 1 1 |
| 161 run-tests SetupPnaclArmOpt "${TRYBOT_TESTS}" 1 1 | 245 run-tests SetupPnaclArmOpt "${TRYBOT_TESTS}" 1 1 |
| 162 build-tests SetupPnaclTranslatorFastArmOpt "${TRYBOT_TRANSLATOR_TESTS}" 1 1 | 246 build-tests SetupPnaclTranslatorFastArmOpt "${TRYBOT_TRANSLATOR_TESTS}" 1 1 |
| 163 run-tests SetupPnaclTranslatorFastArmOpt "${TRYBOT_TRANSLATOR_TESTS}" 1 1 | 247 run-tests SetupPnaclTranslatorFastArmOpt "${TRYBOT_TRANSLATOR_TESTS}" 1 1 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 187 | 271 |
| 188 pnacl-trybot-x8632() { | 272 pnacl-trybot-x8632() { |
| 189 clobber | 273 clobber |
| 190 build-prerequisites "x86-32" "bitcode" | 274 build-prerequisites "x86-32" "bitcode" |
| 191 build-tests SetupPnaclX8632Opt "${TRYBOT_TESTS}" 1 1 | 275 build-tests SetupPnaclX8632Opt "${TRYBOT_TESTS}" 1 1 |
| 192 run-tests SetupPnaclX8632Opt "${TRYBOT_TESTS}" 1 1 | 276 run-tests SetupPnaclX8632Opt "${TRYBOT_TESTS}" 1 1 |
| 193 build-tests SetupPnaclTranslatorX8632Opt "${TRYBOT_TRANSLATOR_TESTS}" 1 1 | 277 build-tests SetupPnaclTranslatorX8632Opt "${TRYBOT_TRANSLATOR_TESTS}" 1 1 |
| 194 run-tests SetupPnaclTranslatorX8632Opt "${TRYBOT_TRANSLATOR_TESTS}" 1 1 | 278 run-tests SetupPnaclTranslatorX8632Opt "${TRYBOT_TRANSLATOR_TESTS}" 1 1 |
| 195 build-tests SetupPnaclTranslatorFastX8632Opt "${TRYBOT_TRANSLATOR_TESTS}" 1 1 | 279 build-tests SetupPnaclTranslatorFastX8632Opt "${TRYBOT_TRANSLATOR_TESTS}" 1 1 |
| 196 run-tests SetupPnaclTranslatorFastX8632Opt "${TRYBOT_TRANSLATOR_TESTS}" 1 1 | 280 run-tests SetupPnaclTranslatorFastX8632Opt "${TRYBOT_TRANSLATOR_TESTS}" 1 1 |
| 281 build-validator x86-32 |
| 282 download-validator-test-nexes x86-32 |
| 283 measure-validator-speed x86-32 |
| 197 } | 284 } |
| 198 | 285 |
| 199 pnacl-x86-64-zero-based-sandbox() { | 286 pnacl-x86-64-zero-based-sandbox() { |
| 200 clobber | 287 clobber |
| 201 export NACL_ENABLE_INSECURE_ZERO_BASED_SANDBOX=1 | 288 export NACL_ENABLE_INSECURE_ZERO_BASED_SANDBOX=1 |
| 202 build-prerequisites "x86-64" "bitcode" "x86_64_zero_based_sandbox=1" | 289 build-prerequisites "x86-64" "bitcode" "x86_64_zero_based_sandbox=1" |
| 203 build-tests SetupPnaclX8664ZBSOpt \ | 290 build-tests SetupPnaclX8664ZBSOpt \ |
| 204 "${TRYBOT_X86_64_ZERO_BASED_SANDBOX_TESTS}" 1 1 | 291 "${TRYBOT_X86_64_ZERO_BASED_SANDBOX_TESTS}" 1 1 |
| 205 run-tests SetupPnaclX8664ZBSOpt \ | 292 run-tests SetupPnaclX8664ZBSOpt \ |
| 206 "${TRYBOT_X86_64_ZERO_BASED_SANDBOX_TESTS}" 1 1 | 293 "${TRYBOT_X86_64_ZERO_BASED_SANDBOX_TESTS}" 1 1 |
| 207 } | 294 } |
| 208 | 295 |
| 209 pnacl-trybot-x8664() { | 296 pnacl-trybot-x8664() { |
| 210 clobber | 297 clobber |
| 211 build-prerequisites "x86-64" "bitcode" | 298 build-prerequisites "x86-64" "bitcode" |
| 212 build-tests SetupPnaclX8664Opt "${TRYBOT_TESTS}" 1 1 | 299 build-tests SetupPnaclX8664Opt "${TRYBOT_TESTS}" 1 1 |
| 213 run-tests SetupPnaclX8664Opt "${TRYBOT_TESTS}" 1 1 | 300 run-tests SetupPnaclX8664Opt "${TRYBOT_TESTS}" 1 1 |
| 214 build-tests SetupPnaclTranslatorX8664Opt "${TRYBOT_TRANSLATOR_TESTS}" 1 1 | 301 build-tests SetupPnaclTranslatorX8664Opt "${TRYBOT_TRANSLATOR_TESTS}" 1 1 |
| 215 run-tests SetupPnaclTranslatorX8664Opt "${TRYBOT_TRANSLATOR_TESTS}" 1 1 | 302 run-tests SetupPnaclTranslatorX8664Opt "${TRYBOT_TRANSLATOR_TESTS}" 1 1 |
| 216 build-tests SetupPnaclTranslatorFastX8664Opt "${TRYBOT_TRANSLATOR_TESTS}" 1 1 | 303 build-tests SetupPnaclTranslatorFastX8664Opt "${TRYBOT_TRANSLATOR_TESTS}" 1 1 |
| 217 run-tests SetupPnaclTranslatorFastX8664Opt "${TRYBOT_TRANSLATOR_TESTS}" 1 1 | 304 run-tests SetupPnaclTranslatorFastX8664Opt "${TRYBOT_TRANSLATOR_TESTS}" 1 1 |
| 218 pnacl-x86-64-zero-based-sandbox | 305 pnacl-x86-64-zero-based-sandbox |
| 306 build-validator x86-64 |
| 307 download-validator-test-nexes x86-64 |
| 308 measure-validator-speed x86-64 |
| 219 } | 309 } |
| 220 | 310 |
| 221 # We probably will not keep a qemu bot on the waterfall, but will keep this | 311 # We probably will not keep a qemu bot on the waterfall, but will keep this |
| 222 # to test locally | 312 # to test locally |
| 223 pnacl-arm-qemu() { | 313 pnacl-arm-qemu() { |
| 224 clobber | 314 clobber |
| 225 build-prerequisites "arm" "bitcode" | 315 build-prerequisites "arm" "bitcode" |
| 226 # arm takes a long time and we do not have sandboxed tests working | 316 # arm takes a long time and we do not have sandboxed tests working |
| 227 build-tests SetupPnaclArmOpt all 1 1 | 317 build-tests SetupPnaclArmOpt all 1 1 |
| 228 run-tests SetupPnaclArmOpt all 1 1 | 318 run-tests SetupPnaclArmOpt all 1 1 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 250 clobber | 340 clobber |
| 251 build-prerequisites "x86-64" "bitcode" | 341 build-prerequisites "x86-64" "bitcode" |
| 252 local setups="SetupPnaclX8664 \ | 342 local setups="SetupPnaclX8664 \ |
| 253 SetupPnaclX8664Opt \ | 343 SetupPnaclX8664Opt \ |
| 254 SetupPnaclTranslatorX8664 \ | 344 SetupPnaclTranslatorX8664 \ |
| 255 SetupPnaclTranslatorX8664Opt \ | 345 SetupPnaclTranslatorX8664Opt \ |
| 256 SetupPnaclTranslatorFastX8664Opt" | 346 SetupPnaclTranslatorFastX8664Opt" |
| 257 build-tests "${setups}" all 1 3 | 347 build-tests "${setups}" all 1 3 |
| 258 run-tests "${setups}" all 1 3 | 348 run-tests "${setups}" all 1 3 |
| 259 pnacl-x86-64-zero-based-sandbox | 349 pnacl-x86-64-zero-based-sandbox |
| 350 measure-validator-speed x86-64 |
| 260 } | 351 } |
| 261 | 352 |
| 262 pnacl-x8632() { | 353 pnacl-x8632() { |
| 263 clobber | 354 clobber |
| 264 build-prerequisites "x86-32" "bitcode" | 355 build-prerequisites "x86-32" "bitcode" |
| 265 local setups="SetupPnaclX8632 \ | 356 local setups="SetupPnaclX8632 \ |
| 266 SetupPnaclX8632Opt \ | 357 SetupPnaclX8632Opt \ |
| 267 SetupPnaclTranslatorX8632 \ | 358 SetupPnaclTranslatorX8632 \ |
| 268 SetupPnaclTranslatorX8632Opt \ | 359 SetupPnaclTranslatorX8632Opt \ |
| 269 SetupPnaclTranslatorFastX8632Opt" | 360 SetupPnaclTranslatorFastX8632Opt" |
| 270 build-tests "${setups}" all 1 3 | 361 build-tests "${setups}" all 1 3 |
| 271 run-tests "${setups}" all 1 3 | 362 run-tests "${setups}" all 1 3 |
| 363 build-validator x86-32 |
| 364 download-validator-test-nexes x86-32 |
| 365 measure-validator-speed x86-32 |
| 272 } | 366 } |
| 273 | 367 |
| 274 nacl-x8632() { | 368 nacl-x8632() { |
| 275 clobber | 369 clobber |
| 276 build-prerequisites "x86-32" "" | 370 build-prerequisites "x86-32" "" |
| 277 local setups="SetupNaclX8632 \ | 371 local setups="SetupNaclX8632 \ |
| 278 SetupNaclX8632Opt" | 372 SetupNaclX8632Opt" |
| 279 build-tests "${setups}" all 1 3 | 373 build-tests "${setups}" all 1 3 |
| 280 run-tests "${setups}" all 1 3 | 374 run-tests "${setups}" all 1 3 |
| 375 build-validator x86-32 |
| 376 download-validator-test-nexes x86-32 |
| 377 measure-validator-speed x86-32 |
| 281 } | 378 } |
| 282 | 379 |
| 283 nacl-x8664() { | 380 nacl-x8664() { |
| 284 clobber | 381 clobber |
| 285 build-prerequisites "x86-64" "" | 382 build-prerequisites "x86-64" "" |
| 286 local setups="SetupNaclX8664 \ | 383 local setups="SetupNaclX8664 \ |
| 287 SetupNaclX8664Opt" | 384 SetupNaclX8664Opt" |
| 288 build-tests "${setups}" all 1 3 | 385 build-tests "${setups}" all 1 3 |
| 289 run-tests "${setups}" all 1 3 | 386 run-tests "${setups}" all 1 3 |
| 387 build-validator x86-64 |
| 388 download-validator-test-nexes x86-64 |
| 389 measure-validator-speed x86-64 |
| 290 } | 390 } |
| 291 | 391 |
| 292 | 392 |
| 293 ###################################################################### | 393 ###################################################################### |
| 294 # Script assumed to be run in native_client/ | 394 # Script assumed to be run in native_client/ |
| 295 if [[ $(pwd) != */native_client ]]; then | 395 if [[ $(pwd) != */native_client ]]; then |
| 296 echo "ERROR: must be run in native_client!" | 396 echo "ERROR: must be run in native_client!" |
| 297 exit 1 | 397 exit 1 |
| 298 fi | 398 fi |
| 299 | 399 |
| 300 | 400 |
| 301 if [[ $# -eq 0 ]] ; then | 401 if [[ $# -eq 0 ]] ; then |
| 302 echo "you must specify a mode on the commandline:" | 402 echo "you must specify a mode on the commandline:" |
| 303 exit 1 | 403 exit 1 |
| 304 fi | 404 fi |
| 305 | 405 |
| 306 if [ "$(type -t $1)" != "function" ]; then | 406 if [ "$(type -t $1)" != "function" ]; then |
| 307 Usage | 407 Usage |
| 308 echo "ERROR: unknown mode '$1'." >&2 | 408 echo "ERROR: unknown mode '$1'." >&2 |
| 309 exit 1 | 409 exit 1 |
| 310 fi | 410 fi |
| 311 | 411 |
| 312 "$@" | 412 "$@" |
| 313 | 413 |
| 314 if [[ ${RETCODE} != 0 ]]; then | 414 if [[ ${RETCODE} != 0 ]]; then |
| 315 echo "@@@BUILD_STEP summary@@@" | 415 echo "@@@BUILD_STEP summary@@@" |
| 316 echo There were failed stages. | 416 echo There were failed stages. |
| 317 exit ${RETCODE} | 417 exit ${RETCODE} |
| 318 fi | 418 fi |
| OLD | NEW |