diff --git a/run_autotest.sh b/run_autotest.sh index a0b133e1ca..4f2428bee5 100755 --- a/run_autotest.sh +++ b/run_autotest.sh @@ -11,23 +11,9 @@ # Script must be run inside the chroot assert_inside_chroot -DEFINE_string client_control "" "client test case to execute" "c" -DEFINE_boolean force false "force reinstallation of autotest" "f" -DEFINE_string machine "" "if present, execute autotest on this host." "m" -DEFINE_string test_key "${GCLIENT_ROOT}/src/platform/testing/testing_rsa" \ -"rsa key to use for autoserv" "k" - -# More useful help -FLAGS_HELP="usage: $0 [flags]" - -# parse the command-line -FLAGS "$@" || exit 1 -eval set -- "${FLAGS_ARGV}" set -e -AUTOTEST_CHROOT_DEST="/usr/local/autotest" -AUTOTEST_SRC="${GCLIENT_ROOT}/src/third_party/autotest/files" - +TEST_RSA_KEY="${GCLIENT_ROOT}/src/platform/testing/testing_rsa" CHROOT_AUTHSOCK_PREFIX="/tmp/chromiumos_test_agent" function cleanup { @@ -49,34 +35,13 @@ then fi # Install authkey for testing -chmod 400 $FLAGS_test_key -/usr/bin/ssh-add $FLAGS_test_key +chmod 400 $TEST_RSA_KEY +/usr/bin/ssh-add $TEST_RSA_KEY -if [ -n "${FLAGS_machine}" ] -then - # run only a specific test/suite if requested - if [ ! -n "${FLAGS_client_control}" ] - then - # Generate meta-control file to run all existing site tests. - CLIENT_CONTROL_FILE=\ - "${AUTOTEST_CHROOT_DEST}/client/site_tests/accept_Suite/control" - echo "No control file specified. Running all tests." - else - CLIENT_CONTROL_FILE=${AUTOTEST_CHROOT_DEST}/${FLAGS_client_control} - fi - # Kick off autosrv for specified test - autoserv_cmd="${AUTOTEST_CHROOT_DEST}/server/autoserv \ - -m ${FLAGS_machine} \ - -c ${CLIENT_CONTROL_FILE}" - echo "running autoserv: " ${autoserv_cmd} - pushd ${AUTOTEST_CHROOT_DEST} 1> /dev/null - ${autoserv_cmd} - popd 1> /dev/null -else - echo "To execute autotest manually: - eval \$(ssh-agent) # start ssh-agent - ssh-add $FLAGS_test_key # add test key to agent - # Then execute autoserv: - $autoserv_cmd" -fi +autoserv_cmd="./server/autoserv $@" +echo "running: " ${autoserv_cmd} +AUTOTEST_ROOT="/usr/local/autotest" +pushd ${AUTOTEST_ROOT} 1> /dev/null +${autoserv_cmd} +popd 1> /dev/null