Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(883)

Side by Side Diff: bin/cros_run_vm_test

Issue 3597001: Move vm constants into their own file. This will make it easier to share these constants. (Closed) Base URL: http://git.chromium.org/git/crosutils.git
Patch Set: Fix ws Created 10 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | image_to_vm.sh » ('j') | lib/cros_vm_constants.sh » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/bin/bash 1 #!/bin/bash
2 2
3 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. 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 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 # Runs a given test case under a VM. 7 # Runs a given test case under a VM.
8 8
9 . "$(dirname $0)/../common.sh" 9 . "$(dirname $0)/../common.sh"
10 . "$(dirname $0)/../lib/cros_vm_lib.sh" 10 . "$(dirname $0)/../lib/cros_vm_lib.sh"
11 . "$(dirname "$0")/../lib/cros_vm_constants.sh"
petkov 2010/09/29 20:54:07 why "$0" and not in the rest?
11 12
12 DEFINE_string image_path "" "Full path of the VM image" 13 DEFINE_string image_path "" "Full path of the VM image"
13 DEFINE_string test_case "" "Name of the test case to run" 14 DEFINE_string test_case "" "Name of the test case to run"
14 15
15 set -e 16 set -e
16 17
17 # Parse command line. 18 # Parse command line.
18 FLAGS "$@" || exit 1 19 FLAGS "$@" || exit 1
19 eval set -- "${FLAGS_ARGV}" 20 eval set -- "${FLAGS_ARGV}"
20 21
21 [ -n "${FLAGS_image_path}" ] || die "You must specify a path to an image" 22 # Use latest if not specified.
22 [ -n "${FLAGS_test_case}" ] || die "You must specify a test case" 23 if [ -z "${FLAGS_image_path}" ]; then
24 LATEST_IMAGE="$(${SCRIPTS_DIR}/get_latest_image.sh)/${DEFAULT_QEMU_IMAGE}"
25 info "Using latest vm image ${LATEST_IMAGE}"
26 FLAGS_image_path=${LATEST_IMAGE}
petkov 2010/09/29 20:54:07 If no images or image dir, you'd be looking at "/$
27 fi
28
29 [ -e "${FLAGS_image_path}" ] || die "Image ${FLAGS_image_path} does not exist."
30
31 [ -n "${FLAGS_test_case}" ] || die "You must specify a test case."
23 32
24 trap stop_kvm EXIT 33 trap stop_kvm EXIT
25 start_kvm "${FLAGS_image_path}" 34 start_kvm "${FLAGS_image_path}"
26 "$(dirname $0)"/../run_remote_tests.sh \ 35 "$(dirname $0)"/../run_remote_tests.sh \
27 --ssh_port=${FLAGS_ssh_port} \ 36 --ssh_port=${FLAGS_ssh_port} \
28 --remote="${HOSTNAME}" \ 37 --remote="${HOSTNAME}" \
29 "${FLAGS_test_case}" 38 "${FLAGS_test_case}"
OLDNEW
« no previous file with comments | « no previous file | image_to_vm.sh » ('j') | lib/cros_vm_constants.sh » ('J')

Powered by Google App Engine
This is Rietveld 408576698