| OLD | NEW |
| 1 #!/bin/bash -e | 1 #!/bin/bash -e |
| 2 | 2 |
| 3 # Copyright 2014 The Chromium OS Authors. All rights reserved. | 3 # Copyright 2014 The Chromium 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 ncpus=$(getconf _NPROCESSORS_ONLN) | 7 ncpus=$(getconf _NPROCESSORS_ONLN) |
| 8 | 8 |
| 9 export PATH="$(npm bin):${PATH}" | 9 export PATH="$(npm bin):${PATH}" |
| 10 | 10 |
| 11 # In case tests fail without a JavaScript error take also a look at these files. | 11 # In case tests fail without a JavaScript error take also a look at these files. |
| 12 # NaCl module crash message is shown only in the JavaScript console within the | 12 # NaCl module crash message is shown only in the JavaScript console within the |
| 13 # browser, and PP_DCHECK and other NaCl errors will appear only here. | 13 # browser, and PP_DCHECK and other NaCl errors will appear only here. |
| 14 # Messages are appended to the logs and it's up to the tester to remove them. | 14 # Messages are appended to the logs and it's up to the tester to remove them. |
| 15 export NACL_EXE_STDOUT=`pwd`/nacl.stdout | 15 export NACL_EXE_STDOUT=`pwd`/nacl.stdout |
| 16 export NACL_EXE_STDERR=`pwd`/nacl.stderr | 16 export NACL_EXE_STDERR=`pwd`/nacl.stderr |
| 17 | 17 |
| 18 # user-data-dir-karma will cache extension files and might lead to test failures | 18 # user-data-dir-karma will cache extension files and might lead to test failures |
| 19 # when changing branches, so we need to remove it before running the tests. | 19 # when changing branches, so we need to remove it before running the tests. |
| 20 # Because Karma captures any changes to the JavaScript files as long as the | 20 # Because Karma captures any changes to the JavaScript files as long as the |
| 21 # tests run, this directory removal should not affect tests development speed. | 21 # tests run, this directory removal should not affect tests development speed. |
| 22 # But the logs inside user-data-dir-karma can contain useful information in case | 22 # But the logs inside user-data-dir-karma can contain useful information in case |
| 23 # the NaCl module crashes, so we need to keep it. | 23 # the NaCl module crashes, so we need to keep it. |
| 24 if [ -d user-data-dir-karma ]; then | 24 if [ -d user-data-dir-karma ]; then |
| 25 rm -r user-data-dir-karma | 25 rm -r user-data-dir-karma |
| 26 fi | 26 fi |
| 27 | 27 |
| 28 cd ../unpacker/ | 28 cd ../unpacker/ |
| 29 # Test only with the Debug build. | 29 # Test only with the Debug build. |
| 30 make -j${ncpus} debug || { exit 1; } | 30 make -j${ncpus} debug || { exit 1; } |
| 31 cd ../unpacker-test | 31 cd ../unpacker-test |
| 32 karma start | 32 karma start |
| OLD | NEW |