| # Copyright (c) 2012 The Chromium OS Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| # Runs *_unittest.py modules. |
| # Display help/usage message. |
| Usage: ${0##*/} [OPTION]... |
| -f force running all unit test modules, regardless of failure |
| -h display this help and exit |
| # Parse command-line options. |
| while getopts ":fh" opt; do |
| echo "Invalid option: -$OPTARG" >&2 |
| echo "Invalid argument: $1" |
| # Invoke unit test scripts. |
| for unittest_script in *_unittest.py; do |
| echo "Running $unittest_script": |
| ./${unittest_script} || test ${force_all} || break |