| OLD | NEW |
| 1 #!/bin/bash | 1 #!/bin/bash |
| 2 | 2 |
| 3 # Copyright (c) 2009 The Chromium OS Authors. All rights reserved. | 3 # Copyright (c) 2009 The Chromium OS 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 # Load common constants. This should be the first executable line. | 7 # Load common constants. This should be the first executable line. |
| 8 # The path to common.sh should be relative to your script's location. | 8 # The path to common.sh should be relative to your script's location. |
| 9 . "$(dirname "$0")/common.sh" | 9 . "$(dirname "$0")/common.sh" |
| 10 | 10 |
| 11 # Flags | 11 # Flags |
| 12 DEFINE_string build_root "$DEFAULT_BUILD_ROOT" \ | 12 DEFINE_string build_root "$DEFAULT_BUILD_ROOT" \ |
| 13 "Root of build output" | 13 "Root of build output" |
| 14 | 14 |
| 15 # Parse command line | 15 # Parse command line |
| 16 FLAGS "$@" || exit 1 | 16 FLAGS "$@" || exit 1 |
| 17 eval set -- "${FLAGS_ARGV}" | 17 eval set -- "${FLAGS_ARGV}" |
| 18 | 18 |
| 19 # Die on error; print commands | 19 # Die on error; print commands |
| 20 set -ex | 20 set -ex |
| 21 | 21 |
| 22 # Run tests | 22 # Run tests |
| 23 TESTS_DIR="$FLAGS_build_root/x86/tests" | 23 TESTS_DIR="$FLAGS_build_root/x86/tests" |
| 24 cd "$TESTS_DIR" | 24 cd "$TESTS_DIR" |
| 25 | 25 |
| 26 # TODO: standardize test names - should all end in "_test" so we can find | 26 # TODO: standardize test names - should all end in "_test" |
| 27 # and run them without listing them explicitly. | 27 for i in *_test *_tests *_unittests; do ./${i}; done |
| 28 ./pam_google_unittests | |
| 29 for i in *_test; do ./${i}; done | |
| 30 | 28 |
| 31 cd - | 29 cd - |
| 32 echo "All tests passed." | 30 echo "All tests passed." |
| OLD | NEW |