<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

set -x
set -e
set -u


SCONS_COMMON="./scons --mode=opt-linux,nacl --verbose bitcode=1 -j8 -k"


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

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

echo @@@BUILD_STEP partial_sdk@@@
UTMAN_BUILDBOT=true tools/llvm/utman.sh extrasdk-make-install

for platform in arm x86-32 x86-64 ; do
  echo @@@BUILD_STEP scons smoke_tests [${platform}]@@@
  ${SCONS_COMMON} platform=${platform} smoke_tests

  echo @@@BUILD_STEP scons smoke_tests pic [${platform}]@@@
  ${SCONS_COMMON} platform=${platform} smoke_tests nacl_pic=1

  if [ "${platform}" != "arm" ] ; then
    echo @@@BUILD_STEP scons smoke_tests translator [${platform}]@@@
    ${SCONS_COMMON} platform=${platform} smoke_tests use_sandboxed_translator=1
  fi
done
<commit_msg>Add an initial PNaCl shared library test. This only tests arm and x86-32 and uses "mixed-mode" linking where we link a semi-sandboxed shared lib against a non-sandboxed main image<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

set -x
set -e
set -u


SCONS_COMMON="./scons --mode=opt-linux,nacl --verbose bitcode=1 -j8 -k"


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

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

echo @@@BUILD_STEP partial_sdk@@@
UTMAN_BUILDBOT=true tools/llvm/utman.sh extrasdk-make-install

for platform in arm x86-32 x86-64 ; do
  echo @@@BUILD_STEP scons smoke_tests [${platform}]@@@
  ${SCONS_COMMON} platform=${platform} smoke_tests

  echo @@@BUILD_STEP scons smoke_tests pic [${platform}]@@@
  ${SCONS_COMMON} platform=${platform} smoke_tests nacl_pic=1

  if [ "${platform}" != "arm" ] ; then
    echo @@@BUILD_STEP scons smoke_tests translator [${platform}]@@@
    ${SCONS_COMMON} platform=${platform} smoke_tests use_sandboxed_translator=1
  fi
done

# TODO(robertm): make this accessible by the utman script so that this get
# http://code.google.com/p/nativeclient/issues/detail?id=1647
echo @@@BUILD_STEP fake_shared_libs@@@
pushd  tests/pnacl_ld_example/
make -f Makefile.pnacl clean
make -f Makefile.pnacl preparation
make -f Makefile.pnacl run.x86-32
make -f Makefile.pnacl run.arm
popd
{'fraction_non_alphanumeric': 0.12537917087967643, 'fraction_numerical': 0.015503875968992248, 'mean_word_length': 4.445871559633027, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4524052', 'n_tokens_mistral': 1083, 'n_tokens_neox': 1023, 'n_words': 321}