Chromium Code Reviews| 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 # If true, terminate script when first scons error is encountered. | 10 # If true, terminate script when first scons error is encountered. |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 205 # the GlibC scons tests already test PIC mode for X86. | 205 # the GlibC scons tests already test PIC mode for X86. |
| 206 # BUG= http://code.google.com/p/nativeclient/issues/detail?id=1081 | 206 # BUG= http://code.google.com/p/nativeclient/issues/detail?id=1081 |
| 207 if [ "${platform}" == arm ]; then | 207 if [ "${platform}" == arm ]; then |
| 208 single-scons-test ${platform} "${extra} nacl_pic=1" "${test}" | 208 single-scons-test ${platform} "${extra} nacl_pic=1" "${test}" |
| 209 fi | 209 fi |
| 210 | 210 |
| 211 # Full test suite of translator for ARM is too flaky on QEMU | 211 # Full test suite of translator for ARM is too flaky on QEMU |
| 212 # http://code.google.com/p/nativeclient/issues/detail?id=2581 | 212 # http://code.google.com/p/nativeclient/issues/detail?id=2581 |
| 213 # run only a subset below | 213 # run only a subset below |
| 214 if [ "${platform}" != arm ]; then | 214 if [ "${platform}" != arm ]; then |
| 215 build-sbtc-prerequisites ${platform} | |
| 215 scons-tests-translator ${platform} "${extra}" "${test}" | 216 scons-tests-translator ${platform} "${extra}" "${test}" |
| 216 fi | 217 fi |
| 217 } | 218 } |
| 218 | 219 |
| 219 scons-tests-translator() { | 220 scons-tests-translator() { |
| 220 local platform=$1 | 221 local platform=$1 |
| 221 local extra=$2 | 222 local extra=$2 |
| 222 local test=$3 | 223 local test=$3 |
| 223 | 224 |
| 224 build-sbtc-prerequisites ${platform} | |
| 225 single-scons-test ${platform} "${extra} use_sandboxed_translator=1" "${test}" | 225 single-scons-test ${platform} "${extra} use_sandboxed_translator=1" "${test}" |
| 226 } | 226 } |
| 227 | 227 |
| 228 scons-tests-no-translator() { | 228 scons-tests-no-translator() { |
| 229 local platform=$1 | 229 local platform=$1 |
| 230 local extra=$2 | 230 local extra=$2 |
| 231 local test=$3 | 231 local test=$3 |
| 232 single-scons-test ${platform} "${extra}" "${test}" | 232 single-scons-test ${platform} "${extra}" "${test}" |
| 233 single-scons-test ${platform} "${extra} nacl_pic=1" "${test}" | 233 single-scons-test ${platform} "${extra} nacl_pic=1" "${test}" |
| 234 } | 234 } |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 283 # NOTE: these trybots are expected to diverge some more hence the code | 283 # NOTE: these trybots are expected to diverge some more hence the code |
| 284 # duplication | 284 # duplication |
| 285 mode-trybot-arm() { | 285 mode-trybot-arm() { |
| 286 FAIL_FAST=false | 286 FAIL_FAST=false |
| 287 clobber | 287 clobber |
| 288 install-lkgr-toolchains | 288 install-lkgr-toolchains |
| 289 scons-tests "arm" "--mode=opt-host,nacl -j8 -k" "smoke_tests" | 289 scons-tests "arm" "--mode=opt-host,nacl -j8 -k" "smoke_tests" |
| 290 # Full test suite of translator for ARM is too flaky on QEMU | 290 # Full test suite of translator for ARM is too flaky on QEMU |
| 291 # http://code.google.com/p/nativeclient/issues/detail?id=2581 | 291 # http://code.google.com/p/nativeclient/issues/detail?id=2581 |
| 292 # Running a subset here (and skipping in scons-test() itself). | 292 # Running a subset here (and skipping in scons-test() itself). |
| 293 scons-tests-translator "arm" "--mode=opt-host,nacl -j4 -k" "toolchain_tests" | 293 scons-tests-translator "arm" "--mode=opt-host,nacl -j4 -k" "toolchain_tests" |
|
jvoung - send to chromium...
2012/03/26 23:21:15
Should this build pre-reqs first too?
Derek Schuff
2012/03/26 23:30:19
Yeah i guess so. this is the bot i'm about to refa
| |
| 294 browser-tests "arm" "--mode=opt-host,nacl -k" | 294 browser-tests "arm" "--mode=opt-host,nacl -k" |
| 295 ad-hoc-shared-lib-tests "arm" | 295 ad-hoc-shared-lib-tests "arm" |
| 296 } | 296 } |
| 297 | 297 |
| 298 mode-trybot-x8632() { | 298 mode-trybot-x8632() { |
| 299 FAIL_FAST=false | 299 FAIL_FAST=false |
| 300 clobber | 300 clobber |
| 301 install-lkgr-toolchains | 301 install-lkgr-toolchains |
| 302 scons-tests "x86-32" "--mode=opt-host,nacl -j8 -k" "smoke_tests" | 302 scons-tests "x86-32" "--mode=opt-host,nacl -j8 -k" "smoke_tests" |
| 303 browser-tests "x86-32" "--mode=opt-host,nacl -k" | 303 browser-tests "x86-32" "--mode=opt-host,nacl -k" |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 359 clobber | 359 clobber |
| 360 install-lkgr-toolchains | 360 install-lkgr-toolchains |
| 361 | 361 |
| 362 gyp-arm-build Release | 362 gyp-arm-build Release |
| 363 | 363 |
| 364 scons-tests "arm" "${mode} -j8 -k" "" | 364 scons-tests "arm" "${mode} -j8 -k" "" |
| 365 # Run all 3 test suites in a single scons invocation to minimize | 365 # Run all 3 test suites in a single scons invocation to minimize |
| 366 # processing time of *.scons files | 366 # processing time of *.scons files |
| 367 scons-tests "arm" "${mode} -k" "small_tests medium_tests large_tests" | 367 scons-tests "arm" "${mode} -k" "small_tests medium_tests large_tests" |
| 368 | 368 |
| 369 build-sbtc-prerequisites "arm" | |
| 370 | |
| 369 # Run tests in pexe mode | 371 # Run tests in pexe mode |
| 370 scons-tests-no-translator "arm" "${mode} -k pnacl_generate_pexe=1" \ | 372 scons-tests-no-translator "arm" "${mode} -j4 -k pnacl_generate_pexe=1" \ |
| 371 "toolchain_tests" | 373 "toolchain_tests" |
| 374 scons-tests-translator "arm" \ | |
| 375 "${mode} -j4 -k pnacl_generate_pexe=1" "toolchain_tests" | |
| 372 | 376 |
| 373 # Full test suite of translator for ARM is too flaky on QEMU | 377 # Full test suite of translator for ARM is too flaky on QEMU |
| 374 # http://code.google.com/p/nativeclient/issues/detail?id=2581 | 378 # http://code.google.com/p/nativeclient/issues/detail?id=2581 |
| 375 # Running a subset here (and skipping in scons-test() itself). | 379 # Running a subset here (and skipping in scons-test() itself). |
| 376 scons-tests-translator "arm" "--mode=opt-host,nacl -j4 -k" "toolchain_tests" | 380 scons-tests-translator "arm" "${mode} -j4 -k" "toolchain_tests" |
| 377 browser-tests "arm" "${mode}" | 381 browser-tests "arm" "${mode}" |
| 378 ad-hoc-shared-lib-tests "arm" | 382 ad-hoc-shared-lib-tests "arm" |
| 379 } | 383 } |
| 380 | 384 |
| 381 mode-buildbot-arm-dbg() { | 385 mode-buildbot-arm-dbg() { |
| 382 mode-buildbot-arm "--mode=dbg-host,nacl" | 386 mode-buildbot-arm "--mode=dbg-host,nacl" |
| 383 archive-for-hw-bots $(NAME_ARM_UPLOAD) regular | 387 archive-for-hw-bots $(NAME_ARM_UPLOAD) regular |
| 384 } | 388 } |
| 385 | 389 |
| 386 mode-buildbot-arm-opt() { | 390 mode-buildbot-arm-opt() { |
| 387 mode-buildbot-arm "--mode=opt-host,nacl" | 391 mode-buildbot-arm "--mode=opt-host,nacl" |
| 388 archive-for-hw-bots $(NAME_ARM_UPLOAD) regular | 392 archive-for-hw-bots $(NAME_ARM_UPLOAD) regular |
| 389 } | 393 } |
| 390 | 394 |
| 391 mode-buildbot-arm-try() { | 395 mode-buildbot-arm-try() { |
| 392 mode-buildbot-arm "--mode=opt-host,nacl" | 396 mode-buildbot-arm "--mode=opt-host,nacl" |
| 393 archive-for-hw-bots $(NAME_ARM_TRY_UPLOAD) try | 397 archive-for-hw-bots $(NAME_ARM_TRY_UPLOAD) try |
| 394 } | 398 } |
| 395 | 399 |
| 396 mode-buildbot-arm-hw() { | 400 mode-buildbot-arm-hw() { |
| 397 FAIL_FAST=false | 401 FAIL_FAST=false |
| 398 local flags="naclsdk_validate=0 built_elsewhere=1 $1" | 402 local flags="naclsdk_validate=0 built_elsewhere=1 $1" |
| 399 scons-tests-no-translator "arm" "${flags} -k" \ | 403 scons-tests-no-translator "arm" "${flags} -k -j2" \ |
| 400 "small_tests medium_tests large_tests" | 404 "small_tests medium_tests large_tests" |
| 401 scons-tests-no-translator "arm" "${flags} -k pnacl_generate_pexe=1" \ | 405 scons-tests-translator "arm" "${flags} -k -j2 pnacl_generate_pexe=1" \ |
| 402 "toolchain_tests" | 406 "toolchain_tests" |
| 403 browser-tests "arm" "${flags}" | 407 browser-tests "arm" "${flags}" |
| 404 } | 408 } |
| 405 | 409 |
| 406 # NOTE: the hw bots are too slow to build stuff on so we just | 410 # NOTE: the hw bots are too slow to build stuff on so we just |
| 407 # use pre-built executables | 411 # use pre-built executables |
| 408 mode-buildbot-arm-hw-dbg() { | 412 mode-buildbot-arm-hw-dbg() { |
| 409 unarchive-for-hw-bots $(NAME_ARM_DOWNLOAD) regular | 413 unarchive-for-hw-bots $(NAME_ARM_DOWNLOAD) regular |
| 410 mode-buildbot-arm-hw "--mode=dbg-host,nacl" | 414 mode-buildbot-arm-hw "--mode=dbg-host,nacl" |
| 411 } | 415 } |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 478 exit 1 | 482 exit 1 |
| 479 fi | 483 fi |
| 480 | 484 |
| 481 "$@" | 485 "$@" |
| 482 | 486 |
| 483 if [[ ${RETCODE} != 0 ]]; then | 487 if [[ ${RETCODE} != 0 ]]; then |
| 484 echo "@@@BUILD_STEP summary@@@" | 488 echo "@@@BUILD_STEP summary@@@" |
| 485 echo There were failed stages. | 489 echo There were failed stages. |
| 486 exit ${RETCODE} | 490 exit ${RETCODE} |
| 487 fi | 491 fi |
| OLD | NEW |