crostestutils: Remove unused scripts.
Remove cros_run_vm_test and cros_run_vm_update.
BUG=chromium:782664
TEST=bots
CQ-DEPEND=CL:1384578
Change-Id: I629061900f5d569a402d65acb3c7c4de8b6cdf72
Reviewed-on: https://chromium-review.googlesource.com/1384820
Commit-Ready: Achuith Bhandarkar <achuith@chromium.org>
Tested-by: Achuith Bhandarkar <achuith@chromium.org>
Reviewed-by: Alex Zamorzaev <zamorzaev@chromium.org>
diff --git a/cros_run_vm_test b/cros_run_vm_test
deleted file mode 100755
index 2a84f60..0000000
--- a/cros_run_vm_test
+++ /dev/null
@@ -1,108 +0,0 @@
-#!/bin/bash
-
-# Copyright (c) 2010 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 a given test case under a VM.
-
-# This can only run outside the chroot.
-. $(dirname "$(readlink -f "$0")")/outside_chroot_common.sh || exit 1
-. "${SCRIPT_ROOT}/common.sh" || exit 1
-. "${SCRIPT_ROOT}/lib/cros_vm_lib.sh" || die "Unable to load cros_vm_lib.sh"
-. "${SCRIPT_ROOT}/lib/cros_vm_constants.sh" ||
- die "Unable to load cros_vm_constants.sh"
-
-DEFINE_string args "" \
- "Command line arguments for test. Quoted and space separated if multiple." a
-DEFINE_string board "$DEFAULT_BOARD" \
- "The board for which you built autotest." b
-DEFINE_string image_path "" "Full path of the VM image"
-DEFINE_string results_dir_root "" "alternate root results directory"
-DEFINE_string test_case "" "Name of the test case to run"
-DEFINE_boolean use_emerged ${FLAGS_FALSE} \
- "Force use of emerged autotest packages"
-DEFINE_integer verbose 1 "{0,1,2} Max verbosity shows autoserv debug output." v
-DEFINE_boolean whitelist_chrome_crashes ${FLAGS_FALSE} \
- "Treat Chrome crashes as non-fatal."
-
-set -e
-
-# Returns normally if the given $1 is a valid chrome version.
-chrome_version_is_valid() {
- local chrome_version="$1"
- echo ${chrome_version} | egrep '^[0-9]+.[0-9]+.[0-9]+.[0-9]+$' &> /dev/null
-}
-
-# Parse command line.
-FLAGS "$@" || exit 1
-
-# Use latest if not specified.
-if [ -z "${FLAGS_image_path}" ]; then
- LATEST_IMAGE="${IMAGES_DIR}/${FLAGS_board}/latest/${DEFAULT_QEMU_IMAGE}"
- info "Using latest vm image ${LATEST_IMAGE}"
- FLAGS_image_path=${LATEST_IMAGE}
-fi
-
-[ -e "${FLAGS_image_path}" ] || die "Image ${FLAGS_image_path} does not exist."
-
-if [ -n "${FLAGS_test_case}" ]; then
- warn "Use of --test_case=<test> is being deprecated. Just pass test names \
-as separate command line arguments."
-fi
-
-if [ -z "${FLAGS_test_case}" ] && [ -z "${FLAGS_ARGV}" ]; then
- die "You must specify a test case."
-fi
-
-if [ -z "${FLAGS_results_dir_root}" ]; then
- die "You must specify a directory for results (--results_dir_root)."
-fi
-
-test_args=( )
-tests_lists=( )
-if [[ ${FLAGS_use_emerged} -eq ${FLAGS_TRUE} ]]; then
- die "--use_emerged flag no longer supported by cros_run_vm test. The " \
- "default behavior of test_that is equivalent."
-fi
-if [[ ${FLAGS_whitelist_chrome_crashes} -eq ${FLAGS_TRUE} ]]; then
- test_args+=(--whitelist-chrome-crashes)
-fi
-[ -n "${FLAGS_test_case}" ] && test_args+=( "${FLAGS_test_case}" )
-for test in ${FLAGS_ARGV}; do
- tests_list+=("$(remove_quotes "${test}")")
-done
-
-if [ -n "${FLAGS_board}" ]; then
- test_args+=( "-b" )
- test_args+=( "${FLAGS_board}" )
-fi
-
-if [ -n "${FLAGS_args}" ]; then
- test_args+=( "--args" )
- test_args+=( "${FLAGS_args}" )
-fi
-
-if [ -n "${FLAGS_ssh_private_key}" ]; then
- test_args+=(
- "--ssh_private_key"
- "$(reinterpret_path_for_chroot "${FLAGS_ssh_private_key}")"
- )
-fi
-
-trap stop_kvm EXIT
-start_kvm "${FLAGS_image_path}" "${FLAGS_board}"
-retry_until_ssh
-
-echo 'Builder uptime: ' $(uptime)
-echo 'Builder meminfo:'
-cat /proc/meminfo
-
-${GCLIENT_ROOT}/chromite/bin/cros_sdk -- test_that \
- --no-quickmerge \
- --ssh_options "-F /dev/null -i /dev/null" \
- --debug \
- --results_dir "${FLAGS_results_dir_root}" \
- "${test_args[@]}" \
- 127.0.0.1:${FLAGS_ssh_port} \
- "${tests_list}"
diff --git a/cros_run_vm_update b/cros_run_vm_update
deleted file mode 100755
index 630bfd7..0000000
--- a/cros_run_vm_update
+++ /dev/null
@@ -1,76 +0,0 @@
-#!/bin/bash
-
-# Copyright (c) 2011 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.
-#
-# Updates an existing vm image with another image.
-
-. $(dirname "$(readlink -f "$0")")/outside_chroot_common.sh || exit 1
-. "${SCRIPT_ROOT}/common.sh" || exit 1
-. "${SCRIPT_ROOT}/lib/cros_vm_lib.sh" || die "Unable to load cros_vm_lib.sh"
-. "${SCRIPT_ROOT}/remote_access.sh" || die "Unable to load remote_access.sh"
-
-DEFINE_string board "$DEFAULT_BOARD" \
- "The board for which you built autotest." b
-DEFINE_string payload "" "Full name of the payload to update with."
-DEFINE_string proxy_port "" \
- "Have the client request from this proxy instead of devserver."
-DEFINE_boolean quick_test ${FLAGS_FALSE} "Don't perform update, only reboot."
-DEFINE_string src_image "" \
- "Create a delta update by passing in the image on the remote machine."
-DEFINE_string stateful_update_flag "" "Flags to pass to stateful update." s
-DEFINE_string image "" "Path of the image to update to." u
-DEFINE_string update_log "update_engine.log" \
- "Path to log for the update_engine."
-DEFINE_string update_url "" "Full url of an update image."
-DEFINE_string vm_image_path "" "Path of the VM image to update from." v
-
-set -e
-
-# Parse command line.
-FLAGS "$@" || exit 1
-eval set -- "${FLAGS_ARGV}"
-
-[ -n "${FLAGS_vm_image_path}" ] || \
- die "You must specify a path to a vm image."
-
-trap stop_kvm EXIT
-start_kvm "${FLAGS_vm_image_path}" "${FLAGS_board}"
-retry_until_ssh
-
-if [ -n "${FLAGS_image}" ]; then
- IMAGE_ARGS="--image=$(readlink -f ${FLAGS_image})"
-fi
-
-if [ -n "${FLAGS_payload}" ]; then
- IMAGE_ARGS="--payload=${FLAGS_payload}"
-fi
-
-if [ -n "${FLAGS_proxy_port}" ]; then
- IMAGE_ARGS="${IMAGE_ARGS} --proxy_port=${FLAGS_proxy_port}"
-fi
-
-QUICK_TEST_FLAGS=""
-if [ "${FLAGS_quick_test}" -eq "${FLAGS_TRUE}" ]; then
- info "Skipping update testing."
- QUICK_TEST_FLAGS="--noupdate --noupdate_stateful"
-fi
-
-TMP=$(mktemp -d /tmp/cros_run_vm_update.XXXX)
-remote_access_init
-remote_sh "update_engine"
-
-"${SCRIPT_ROOT}/image_to_live.sh" \
- --remote=127.0.0.1 \
- --ssh_port=${FLAGS_ssh_port} \
- --private_key=${FLAGS_ssh_private_key} \
- --stateful_update_flag=${FLAGS_stateful_update_flag} \
- --src_image="${FLAGS_src_image}" \
- --noupdate_hostkey \
- --update_log="${FLAGS_update_log}" \
- --update_url="${FLAGS_update_url}" \
- --verify \
- ${IMAGE_ARGS} \
- ${QUICK_TEST_FLAGS}
-