| OLD | NEW |
| 1 #!/bin/bash | 1 #!/bin/bash |
| 2 # Copyright (c) 2013 The Native Client Authors. All rights reserved. | 2 # Copyright (c) 2013 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 source pkg_info | |
| 7 source ../../build_tools/common.sh | |
| 8 | |
| 9 # There are two additional tests (RunGrepTest and RunTest shell scripts) that | 6 # There are two additional tests (RunGrepTest and RunTest shell scripts) that |
| 10 # make check does but it would be hard to run it here. Especially the first one. | 7 # make check does but it would be hard to run it here. Especially the first one. |
| 11 TestStep() { | 8 TestStep() { |
| 12 # test only pnacl and if target and host architectures match | 9 # test only pnacl and if target and host architectures match |
| 13 if [ "${NACL_ARCH}" = "pnacl" ]; then | 10 if [ "${NACL_ARCH}" = "pnacl" ]; then |
| 14 for test in pcre_scanner_unittest.* pcre_stringpiece_unittest.* pcrecpp_unit
test.*; do | 11 for test in pcre_scanner_unittest.* pcre_stringpiece_unittest.* pcrecpp_unit
test.*; do |
| 15 RunSelLdrCommand ${test} | 12 RunSelLdrCommand ${test} |
| 16 done | 13 done |
| 17 echo "Tests OK" | 14 echo "Tests OK" |
| 18 elif [ `uname -m` == "${NACL_ARCH_ALT}" ]; then | 15 elif [ `uname -m` == "${NACL_ARCH_ALT}" ]; then |
| 19 for test in pcre_scanner_unittest.* pcre_stringpiece_unittest.* pcrecpp_unit
test.*; do | 16 for test in pcre_scanner_unittest.* pcre_stringpiece_unittest.* pcrecpp_unit
test.*; do |
| 20 # use the binary in .libs instead if there is any | 17 # use the binary in .libs instead if there is any |
| 21 if [ -e .libs/${test} ]; then | 18 if [ -e .libs/${test} ]; then |
| 22 (cd .libs; | 19 (cd .libs; |
| 23 WriteSelLdrScript run_${test} ${test}; | 20 WriteSelLdrScript run_${test} ${test}; |
| 24 ./run_${test}) | 21 ./run_${test}) |
| 25 else | 22 else |
| 26 WriteSelLdrScript run_${test} ${test} | 23 WriteSelLdrScript run_${test} ${test} |
| 27 ./run_${test} | 24 ./run_${test} |
| 28 fi | 25 fi |
| 29 done | 26 done |
| 30 echo "Tests OK" | 27 echo "Tests OK" |
| 31 fi | 28 fi |
| 32 } | 29 } |
| 33 | |
| 34 DefaultPackageInstall | |
| 35 exit 0 | |
| OLD | NEW |