| OLD | NEW |
| (Empty) |
| 1 #!/bin/bash | |
| 2 | |
| 3 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | |
| 4 # Use of this source code is governed by a BSD-style license that can be | |
| 5 # found in the LICENSE file. | |
| 6 | |
| 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. | |
| 9 . "$(dirname "$0")/common.sh" | |
| 10 | |
| 11 assert_not_root_user | |
| 12 restart_in_chroot_if_needed $* | |
| 13 get_default_board | |
| 14 | |
| 15 # Flags | |
| 16 DEFINE_string build_root "$DEFAULT_BUILD_ROOT" \ | |
| 17 "Root of build output" | |
| 18 DEFINE_string board "$DEFAULT_BOARD" \ | |
| 19 "Target board for which tests are to be built" | |
| 20 | |
| 21 # Parse command line | |
| 22 FLAGS "$@" || exit 1 | |
| 23 eval set -- "${FLAGS_ARGV}" | |
| 24 | |
| 25 if [ -z "$FLAGS_board" ]; then | |
| 26 echo Error: --board required | |
| 27 exit 1 | |
| 28 fi | |
| 29 | |
| 30 # Die on error; print commands | |
| 31 set -e | |
| 32 | |
| 33 TEST_DIRS=" | |
| 34 cryptohome | |
| 35 metrics | |
| 36 pam_google | |
| 37 window_manager | |
| 38 " | |
| 39 | |
| 40 sudo TEST_DIRS="${TEST_DIRS}" \ | |
| 41 emerge-${FLAGS_board} chromeos-base/chromeos-unittests | |
| OLD | NEW |