| OLD | NEW |
| (Empty) |
| 1 #!/bin/bash | |
| 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 | |
| 4 # found in the LICENSE file. | |
| 5 | |
| 6 # To run with a custom build of valgrind, e.g., a new release from | |
| 7 # valgrind.org, run this script as | |
| 8 # | |
| 9 # buildbot/buildbot_valgrind.sh newlib \ | |
| 10 # memcheck_command=/usr/local/google/valgrind/bin/valgrind,--tool=memcheck | |
| 11 # | |
| 12 # NB: memcheck_test is disabled if an alternate memcheck_command is | |
| 13 # used, so remember to temporarily change | |
| 14 # tests/memcheck_test/nacl.scons if you are testing a new valgrind | |
| 15 # that has NaCl patches applied (or when the NaCl patches have been | |
| 16 # upstreamed). | |
| 17 | |
| 18 # Script assumed to be run in native_client/ | |
| 19 if [[ $(pwd) != */native_client ]]; then | |
| 20 echo "ERROR: must be run in native_client!" | |
| 21 exit 1 | |
| 22 fi | |
| 23 | |
| 24 if [ $# -lt 1 ]; then | |
| 25 echo "USAGE: $0 newlib/glibc" | |
| 26 exit 2 | |
| 27 fi | |
| 28 | |
| 29 set -x | |
| 30 set -e | |
| 31 set -u | |
| 32 | |
| 33 TOOLCHAIN="$1" | |
| 34 shift | |
| 35 | |
| 36 if [[ "$TOOLCHAIN" = glibc ]]; then | |
| 37 GLIBCOPTS="--nacl_glibc" | |
| 38 SDKHDRINSTALL="" | |
| 39 else | |
| 40 GLIBCOPTS="" | |
| 41 SDKHDRINSTALL="install_libpthread" | |
| 42 fi | |
| 43 | |
| 44 echo @@@BUILD_STEP clobber@@@ | |
| 45 rm -rf scons-out ../xcodebuild ../out \ | |
| 46 src/third_party/nacl_sdk/arm-newlib | |
| 47 | |
| 48 echo @@@BUILD_STEP gclient_runhooks@@@ | |
| 49 export GYP_DEFINES=target_arch=x64 | |
| 50 gclient runhooks --force | |
| 51 | |
| 52 echo @@@BUILD_STEP gyp_compile@@@ | |
| 53 ninja -C ../out/Debug -v | |
| 54 | |
| 55 echo @@@BUILD_STEP scons_compile@@@ | |
| 56 ./scons -j 8 -k --verbose ${GLIBCOPTS} --mode=dbg-host,nacl platform=x86-64 "$@" | |
| 57 | |
| 58 echo @@@BUILD_STEP memcheck@@@ | |
| 59 ./scons -k --verbose ${GLIBCOPTS} --mode=dbg-host,nacl platform=x86-64 \ | |
| 60 buildbot=memcheck "$@" memcheck_bot_tests | |
| 61 | |
| 62 echo @@@BUILD_STEP leakcheck@@@ | |
| 63 ./scons -k --verbose ${GLIBCOPTS} --mode=dbg-host,nacl platform=x86-64 \ | |
| 64 buildbot=memcheck run_under_extra_args=--leak-check=full \ | |
| 65 "$@" run_leak_test | |
| 66 | |
| 67 # Both the untrusted and trusted tsan tests started failing: | |
| 68 # https://code.google.com/p/nativeclient/issues/detail?id=3396 | |
| 69 if [[ "$TOOLCHAIN" != glibc ]]; then | |
| 70 | |
| 71 echo "@@@BUILD_STEP tsan(untrusted)@@@" | |
| 72 ./scons -k --verbose ${GLIBCOPTS} --mode=dbg-host,nacl platform=x86-64 \ | |
| 73 buildbot=tsan run_under_extra_args= "$@" tsan_bot_tests | |
| 74 | |
| 75 echo "@@@BUILD_STEP tsan(trusted)@@@" | |
| 76 ./scons -k --verbose ${GLIBCOPTS} --mode=dbg-host,nacl platform=x86-64 \ | |
| 77 buildbot=tsan-trusted run_under_extra_args= "$@" tsan_bot_tests | |
| 78 | |
| 79 echo "@@@BUILD_STEP tsan(trusted, hybrid, RV)@@@" | |
| 80 # The first RaceVerifier invocation may fail. | |
| 81 ./scons -k --verbose ${GLIBCOPTS} --mode=dbg-host,nacl platform=x86-64 \ | |
| 82 buildbot=tsan-trusted run_under_extra_args=--hybrid,--log-file=race.log \ | |
| 83 "$@" tsan_bot_tests || true | |
| 84 | |
| 85 echo "== RaceVerifier 2nd run ==" | |
| 86 | |
| 87 ./scons -k --verbose ${GLIBCOPTS} --mode=dbg-host,nacl platform=x86-64 \ | |
| 88 buildbot=tsan-trusted run_under_extra_args=--race-verifier=race.log \ | |
| 89 "$@" tsan_bot_tests | |
| 90 | |
| 91 fi | |
| OLD | NEW |