Chromium Code Reviews| 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 # Script to run client or server tests on a live remote image. | 7 # This can only run inside the chroot. |
| 8 . $(dirname "$(readlink -f "$0")")/outside_chroot_common.sh 2> /dev/null || | 8 . "/usr/lib/crosutils/common.sh" 2> /dev/null || |
| 9 SCRIPT_ROOT=/usr/lib/crosutils | 9 (echo "Must run within chroot" && false) || |
| 10 . "${SCRIPT_ROOT}/common.sh" || | |
| 11 (echo "Unable to load common.sh" && false) || | |
| 12 exit 1 | 10 exit 1 |
| 13 . "${SCRIPT_ROOT}/remote_access.sh" || die "Unable to load remote_access.sh" | 11 . "/usr/lib/crosutils/remote_access.sh" || die "Unable to load remote_access.sh" |
|
sosa
2011/03/25 04:43:47
There wasn't much point in leaving this here since
| |
| 14 | 12 |
| 15 DEFINE_string args "" \ | 13 DEFINE_string args "" \ |
| 16 "Command line arguments for test. Quoted and space separated if multiple." a | 14 "Command line arguments for test. Quoted and space separated if multiple." a |
| 17 DEFINE_string autotest_dir "" \ | 15 DEFINE_string autotest_dir "" \ |
| 18 "Skip autodetection of autotest and use the specified location (must be in \ | 16 "Skip autodetection of autotest and use the specified location (must be in \ |
| 19 chroot)." | 17 chroot)." |
| 20 DEFINE_string board "" \ | 18 DEFINE_string board "" \ |
| 21 "The board for which you are building autotest" | 19 "The board for which you are building autotest" |
| 22 DEFINE_boolean build ${FLAGS_FALSE} "Build tests while running" b | 20 DEFINE_boolean build ${FLAGS_FALSE} "Build tests while running" b |
| 23 DEFINE_string chroot "${DEFAULT_CHROOT_DIR}" "alternate chroot location" c | |
| 24 DEFINE_boolean cleanup ${FLAGS_FALSE} "Clean up temp directory" | 21 DEFINE_boolean cleanup ${FLAGS_FALSE} "Clean up temp directory" |
| 25 DEFINE_integer iterations 1 "Iterations to run every top level test" i | 22 DEFINE_integer iterations 1 "Iterations to run every top level test" i |
| 26 DEFINE_string results_dir_root "" "alternate root results directory" | 23 DEFINE_string results_dir_root "" "alternate root results directory" |
| 27 DEFINE_boolean verbose ${FLAGS_FALSE} "Show verbose autoserv output" v | 24 DEFINE_boolean verbose ${FLAGS_FALSE} "Show verbose autoserv output" v |
| 28 DEFINE_boolean use_emerged ${FLAGS_FALSE} \ | 25 DEFINE_boolean use_emerged ${FLAGS_FALSE} \ |
| 29 "Force use of emerged autotest packages" | 26 "Force use of emerged autotest packages" |
| 30 | 27 |
| 31 RAN_ANY_TESTS=${FLAGS_FALSE} | 28 RAN_ANY_TESTS=${FLAGS_FALSE} |
| 32 | 29 |
| 33 function stop_ssh_agent() { | 30 function stop_ssh_agent() { |
| (...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 324 done | 321 done |
| 325 popd > /dev/null | 322 popd > /dev/null |
| 326 | 323 |
| 327 echo "" | 324 echo "" |
| 328 info "Test results:" | 325 info "Test results:" |
| 329 ./generate_test_report "${TMP}" --strip="${TMP}/" | 326 ./generate_test_report "${TMP}" --strip="${TMP}/" |
| 330 | 327 |
| 331 print_time_elapsed | 328 print_time_elapsed |
| 332 } | 329 } |
| 333 | 330 |
| 334 restart_in_chroot_if_needed "$@" | |
| 335 main "$@" | 331 main "$@" |
| OLD | NEW |