<commit_before>#!/bin/bash
# Copyright (c) 2011 The Native Client Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

# Script assumed to be run in native_client/
if [[ $(pwd) != */native_client ]]; then
  echo "ERROR: must be run in native_client!"
  exit 1
fi

if [ $# -ne 0 ]; then
  echo "USAGE: $0"
  exit 2
fi

set -x
set -e
set -u


echo @@@BUILD_STEP gclient_runhooks@@@
gclient runhooks --force

echo @@@BUILD_STEP clobber@@@
rm -rf scons-out toolchain compiler hg ../xcodebuild ../sconsbuild ../out \
    src/third_party/nacl_sdk/arm-newlib

echo @@@BUILD_STEP partial_sdk@@@
./scons --verbose --mode=nacl_extra_sdk platform=x86-64 --download \
extra_sdk_update_header install_libpthread extra_sdk_update

echo @@@BUILD_STEP gyp_compile@@@
make -C .. -k -j12 V=1 BUILDTYPE=Debug

echo @@@BUILD_STEP gyp_tests@@@
python trusted_test.py --config Debug

echo @@@BUILD_STEP scons_compile@@@
./scons -j 8 DOXYGEN=../third_party/doxygen/linux/doxygen -k --verbose \
    --mode=dbg-linux,nacl,doc platform=x86-64

echo @@@BUILD_STEP memcheck@@@
./scons DOXYGEN=../third_party/doxygen/linux/doxygen -k --verbose \
    --mode=dbg-linux,nacl platform=x86-64 sdl=none buildbot=memcheck \
    memcheck_bot_tests

echo @@@BUILD_STEP leakcheck@@@
./scons DOXYGEN=../third_party/doxygen/linux/doxygen -k --verbose \
    --mode=dbg-linux,nacl platform=x86-64 sdl=none buildbot=memcheck \
    run_under_extra_args=--leak-check=full run_leak_test

echo "@@@BUILD_STEP tsan(untrusted)@@@"
./scons DOXYGEN=../third_party/doxygen/linux/doxygen -k --verbose \
    --mode=dbg-linux,nacl platform=x86-64 sdl=none buildbot=tsan \
    run_under_extra_args= tsan_bot_tests

echo "@@@BUILD_STEP tsan(trusted)@@@"
./scons DOXYGEN=../third_party/doxygen/linux/doxygen -k --verbose \
    --mode=dbg-linux,nacl platform=x86-64 sdl=none buildbot=tsan-trusted \
    run_under_extra_args= tsan_bot_tests

echo "@@@BUILD_STEP tsan(trusted, hybrid, RV)@@@"
# The first RaceVerifier invocation may fail.
./scons DOXYGEN=../third_party/doxygen/linux/doxygen -k --verbose \
    --mode=dbg-linux,nacl platform=x86-64 sdl=none buildbot=tsan-trusted \
    run_under_extra_args=--hybrid,--log-file=race.log tsan_bot_tests ||
    true

echo "== RaceVerifier 2nd run =="

./scons DOXYGEN=../third_party/doxygen/linux/doxygen -k --verbose \
    --mode=dbg-linux,nacl platform=x86-64 sdl=none buildbot=tsan-trusted \
    run_under_extra_args=--race-verifier=race.log tsan_bot_tests
<commit_msg>Fix valgrind bot.  Broken by revision 5157.<commit_after>#!/bin/bash
# Copyright (c) 2011 The Native Client Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

# Script assumed to be run in native_client/
if [[ $(pwd) != */native_client ]]; then
  echo "ERROR: must be run in native_client!"
  exit 1
fi

if [ $# -ne 0 ]; then
  echo "USAGE: $0"
  exit 2
fi

set -x
set -e
set -u


echo @@@BUILD_STEP gclient_runhooks@@@
export GYP_DEFINES=target_arch=x64
gclient runhooks --force

echo @@@BUILD_STEP clobber@@@
rm -rf scons-out toolchain compiler hg ../xcodebuild ../sconsbuild ../out \
    src/third_party/nacl_sdk/arm-newlib

echo @@@BUILD_STEP partial_sdk@@@
./scons --verbose --mode=nacl_extra_sdk platform=x86-64 --download \
extra_sdk_update_header install_libpthread extra_sdk_update

echo @@@BUILD_STEP gyp_compile@@@
make -C .. -k -j12 V=1 BUILDTYPE=Debug

echo @@@BUILD_STEP gyp_tests@@@
python trusted_test.py --config Debug --bits 64

echo @@@BUILD_STEP scons_compile@@@
./scons -j 8 DOXYGEN=../third_party/doxygen/linux/doxygen -k --verbose \
    --mode=dbg-linux,nacl,doc platform=x86-64

echo @@@BUILD_STEP memcheck@@@
./scons DOXYGEN=../third_party/doxygen/linux/doxygen -k --verbose \
    --mode=dbg-linux,nacl platform=x86-64 sdl=none buildbot=memcheck \
    memcheck_bot_tests

echo @@@BUILD_STEP leakcheck@@@
./scons DOXYGEN=../third_party/doxygen/linux/doxygen -k --verbose \
    --mode=dbg-linux,nacl platform=x86-64 sdl=none buildbot=memcheck \
    run_under_extra_args=--leak-check=full run_leak_test

echo "@@@BUILD_STEP tsan(untrusted)@@@"
./scons DOXYGEN=../third_party/doxygen/linux/doxygen -k --verbose \
    --mode=dbg-linux,nacl platform=x86-64 sdl=none buildbot=tsan \
    run_under_extra_args= tsan_bot_tests

echo "@@@BUILD_STEP tsan(trusted)@@@"
./scons DOXYGEN=../third_party/doxygen/linux/doxygen -k --verbose \
    --mode=dbg-linux,nacl platform=x86-64 sdl=none buildbot=tsan-trusted \
    run_under_extra_args= tsan_bot_tests

echo "@@@BUILD_STEP tsan(trusted, hybrid, RV)@@@"
# The first RaceVerifier invocation may fail.
./scons DOXYGEN=../third_party/doxygen/linux/doxygen -k --verbose \
    --mode=dbg-linux,nacl platform=x86-64 sdl=none buildbot=tsan-trusted \
    run_under_extra_args=--hybrid,--log-file=race.log tsan_bot_tests ||
    true

echo "== RaceVerifier 2nd run =="

./scons DOXYGEN=../third_party/doxygen/linux/doxygen -k --verbose \
    --mode=dbg-linux,nacl platform=x86-64 sdl=none buildbot=tsan-trusted \
    run_under_extra_args=--race-verifier=race.log tsan_bot_tests

{'fraction_non_alphanumeric': 0.14177510196154594, 'fraction_numerical': 0.01903282190716644, 'mean_word_length': 3.971042471042471, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2735326', 'n_tokens_mistral': 2039, 'n_tokens_neox': 1927, 'n_words': 432}