| 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 # Run toolchain torture tests and llvm testsuite tests. | 6 # Run toolchain torture tests and llvm testsuite tests. |
| 7 # For now, run on linux64, build and run unsandboxed newlib tests | 7 # For now, run on linux64, build and run unsandboxed newlib tests |
| 8 # for all 3 architectures. | 8 # for all 3 architectures. |
| 9 # Note: This script builds the toolchain from scratch but does | 9 # Note: This script builds the toolchain from scratch but does |
| 10 # not build the translators and hence the translators | 10 # not build the translators and hence the translators |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 # Change the toolchain build script (PNACL_BUILD) behavior slightly | 32 # Change the toolchain build script (PNACL_BUILD) behavior slightly |
| 33 # wrt to error logging and mecurial retry delays. | 33 # wrt to error logging and mecurial retry delays. |
| 34 # TODO(robertm): if this special casing is still needed, | 34 # TODO(robertm): if this special casing is still needed, |
| 35 # make this into separate vars | 35 # make this into separate vars |
| 36 export PNACL_BUILDBOT=true | 36 export PNACL_BUILDBOT=true |
| 37 # Make the toolchain build script (PNACL_BUILD) more verbose. | 37 # Make the toolchain build script (PNACL_BUILD) more verbose. |
| 38 # This will also prevent bot timeouts which otherwise gets triggered | 38 # This will also prevent bot timeouts which otherwise gets triggered |
| 39 # by long periods without console output. | 39 # by long periods without console output. |
| 40 export PNACL_VERBOSE=true | 40 export PNACL_VERBOSE=true |
| 41 | 41 |
| 42 EXIT_STATUS=0 |
| 43 |
| 42 clobber() { | 44 clobber() { |
| 43 echo @@@BUILD_STEP clobber@@@ | 45 echo @@@BUILD_STEP clobber@@@ |
| 44 rm -rf scons-out | 46 rm -rf scons-out |
| 45 # Don't clobber pnacl_translator; these bots currently don't build | 47 # Don't clobber pnacl_translator; these bots currently don't build |
| 46 # it, but they use the DEPSed-in version. | 48 # it, but they use the DEPSed-in version. |
| 47 rm -rf toolchain/linux_x86/pnacl_newlib* \ | 49 rm -rf toolchain/linux_x86/pnacl_newlib* \ |
| 48 toolchain/mac_x86/pnacl_newlib* \ | 50 toolchain/mac_x86/pnacl_newlib* \ |
| 49 toolchain/win_x86/pnacl_newlib* | 51 toolchain/win_x86/pnacl_newlib* |
| 50 } | 52 } |
| 51 | 53 |
| 52 handle-error() { | 54 handle-error() { |
| 53 echo "@@@STEP_FAILURE@@@" | 55 echo "@@@STEP_FAILURE@@@" |
| 56 EXIT_STATUS=1 |
| 54 } | 57 } |
| 55 | 58 |
| 56 ignore-error() { | 59 ignore-error() { |
| 57 echo "@== IGNORING AN ERROR ==@" | 60 echo "@== IGNORING AN ERROR ==@" |
| 58 } | 61 } |
| 59 | 62 |
| 60 #### Support for running arm sbtc tests on this bot, since we have | 63 #### Support for running arm sbtc tests on this bot, since we have |
| 61 # less coverage on the main waterfall now: | 64 # less coverage on the main waterfall now: |
| 62 # http://code.google.com/p/nativeclient/issues/detail?id=2581 | 65 # http://code.google.com/p/nativeclient/issues/detail?id=2581 |
| 63 readonly SCONS_COMMON="./scons --verbose bitcode=1 -j${PNACL_CONCURRENCY}" | 66 readonly SCONS_COMMON="./scons --verbose bitcode=1 -j${PNACL_CONCURRENCY}" |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 246 # Note: the tests which use sandboxed translation are at the end, | 249 # Note: the tests which use sandboxed translation are at the end, |
| 247 # because they can sometimes hang on arm, causing buildbot to kill the | 250 # because they can sometimes hang on arm, causing buildbot to kill the |
| 248 # script without running any more tests. | 251 # script without running any more tests. |
| 249 scons-tests-translator ${arch} | 252 scons-tests-translator ${arch} |
| 250 | 253 |
| 251 if [[ ${arch} = x86-64 ]] ; then | 254 if [[ ${arch} = x86-64 ]] ; then |
| 252 scons-tests-x86-64-zero-based-sandbox | 255 scons-tests-x86-64-zero-based-sandbox |
| 253 fi | 256 fi |
| 254 | 257 |
| 255 done | 258 done |
| 259 exit $EXIT_STATUS |
| 256 } | 260 } |
| 257 | 261 |
| 258 | 262 |
| 259 if [ $# = 0 ]; then | 263 if [ $# = 0 ]; then |
| 260 # NOTE: this is used for manual testing only | 264 # NOTE: this is used for manual testing only |
| 261 tc-test-bot "x86-64 x86-32 arm" | 265 tc-test-bot "x86-64 x86-32 arm" |
| 262 else | 266 else |
| 263 "$@" | 267 "$@" |
| 264 fi | 268 fi |
| OLD | NEW |