| OLD | NEW |
| 1 #!/bin/bash | 1 #!/bin/bash |
| 2 | 2 |
| 3 # Copyright (c) 2011 The Native Client Authors. All rights reserved. | 3 # Copyright (c) 2011 The Native Client Authors. All rights reserved. |
| 4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
| 5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
| 6 | 6 |
| 7 set -o nounset | 7 set -o nounset |
| 8 set -o errexit | 8 set -o errexit |
| 9 | 9 |
| 10 # The script is located in "native_client/tests/spec2k" | 10 # The script is located in "native_client/tests/spec2k" |
| 11 # Set pwd to spec2k/ | 11 # Set pwd to spec2k/ |
| 12 cd "$(dirname "$0")" | 12 cd "$(dirname "$0")" |
| 13 if [[ $(basename "$(pwd)") != "spec2k" ]] ; then | 13 if [[ $(basename "$(pwd)") != "spec2k" ]] ; then |
| 14 echo "ERROR: cannot find the spec2k/ directory" | 14 echo "ERROR: cannot find the spec2k/ directory" |
| 15 exit -1 | 15 exit -1 |
| 16 fi | 16 fi |
| 17 source ../../tools/llvm/common-tools.sh | 17 |
| 18 # TODO(pdox): Remove this dependency. |
| 19 source ../../pnacl/scripts/common-tools.sh |
| 18 readonly NACL_ROOT="$(GetAbsolutePath "../../")" | 20 readonly NACL_ROOT="$(GetAbsolutePath "../../")" |
| 19 SetScriptPath "$(pwd)/run_all.sh" | 21 SetScriptPath "$(pwd)/run_all.sh" |
| 20 SetLogDirectory "${NACL_ROOT}/toolchain/test-log" | 22 SetLogDirectory "${NACL_ROOT}/toolchain/test-log" |
| 21 | 23 |
| 22 ###################################################################### | 24 ###################################################################### |
| 23 # CONFIGURATION | 25 # CONFIGURATION |
| 24 ###################################################################### | 26 ###################################################################### |
| 25 # TODO(robertm): make this configurable from the commandline | 27 # TODO(robertm): make this configurable from the commandline |
| 26 | 28 |
| 27 readonly LIST_INT_C="164.gzip 175.vpr 176.gcc 181.mcf 186.crafty 197.parser \ | 29 readonly LIST_INT_C="164.gzip 175.vpr 176.gcc 181.mcf 186.crafty 197.parser \ |
| (...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 499 shift 1 | 501 shift 1 |
| 500 for platform in ${platforms} ; do | 502 for platform in ${platforms} ; do |
| 501 echo "build-libs-nacl: scons build_lib [${platform}] $*" | 503 echo "build-libs-nacl: scons build_lib [${platform}] $*" |
| 502 (cd ${NACL_ROOT}; | 504 (cd ${NACL_ROOT}; |
| 503 ${SCONS_COMMON} platform=${platform} build_lib "$@") | 505 ${SCONS_COMMON} platform=${platform} build_lib "$@") |
| 504 done | 506 done |
| 505 } | 507 } |
| 506 | 508 |
| 507 build-libs-pnacl() { | 509 build-libs-pnacl() { |
| 508 pushd "${NACL_ROOT}" | 510 pushd "${NACL_ROOT}" |
| 509 tools/llvm/utman.sh sdk | 511 pnacl/build.sh sdk |
| 510 popd | 512 popd |
| 511 } | 513 } |
| 512 | 514 |
| 513 #@ | 515 #@ |
| 514 #@ CleanBenchmarks <benchmark>* | 516 #@ CleanBenchmarks <benchmark>* |
| 515 #@ | 517 #@ |
| 516 #@ this is a deep clean and you have to rerun PoplateFromSpecHarness | 518 #@ this is a deep clean and you have to rerun PoplateFromSpecHarness |
| 517 CleanBenchmarks() { | 519 CleanBenchmarks() { |
| 518 local list=$(GetBenchmarkList "$@") | 520 local list=$(GetBenchmarkList "$@") |
| 519 rm -rf bin/ | 521 rm -rf bin/ |
| (...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 800 | 802 |
| 801 [ $# = 0 ] && set -- help # Avoid reference to undefined $1. | 803 [ $# = 0 ] && set -- help # Avoid reference to undefined $1. |
| 802 | 804 |
| 803 if [ "$(type -t $1)" != "function" ]; then | 805 if [ "$(type -t $1)" != "function" ]; then |
| 804 Usage | 806 Usage |
| 805 echo "ERROR: unknown mode '$1'." >&2 | 807 echo "ERROR: unknown mode '$1'." >&2 |
| 806 exit 1 | 808 exit 1 |
| 807 fi | 809 fi |
| 808 | 810 |
| 809 "$@" | 811 "$@" |
| OLD | NEW |