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

Side by Side Diff: client/tests/kvm/get_started.py

Issue 6246035: Merge remote branch 'cros/upstream' into master (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/autotest.git@master
Patch Set: patch Created 9 years, 10 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
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/python
2 """ 2 """
3 Program to help setup kvm test environment 3 Program to help setup kvm test environment
4 4
5 @copyright: Red Hat 2010 5 @copyright: Red Hat 2010
6 """ 6 """
7 7
8 import os, sys, optparse, logging, shutil 8 import os, sys, logging, shutil
9 import common, kvm_utils 9 import common, kvm_utils
10 from autotest_lib.client.common_lib import logging_manager 10 from autotest_lib.client.common_lib import logging_manager
11 from autotest_lib.client.bin import utils, os_dep 11 from autotest_lib.client.bin import utils
12 12
13 13
14 def check_iso(url, destination, hash): 14 def check_iso(url, destination, hash):
15 """ 15 """
16 Verifies if ISO that can be find on url is on destination with right hash. 16 Verifies if ISO that can be find on url is on destination with right hash.
17 17
18 This function will verify the SHA1 hash of the ISO image. If the file 18 This function will verify the SHA1 hash of the ISO image. If the file
19 turns out to be missing or corrupted, let the user know we can download it. 19 turns out to be missing or corrupted, let the user know we can download it.
20 20
21 @param url: URL where the ISO file can be found. 21 @param url: URL where the ISO file can be found.
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 dst_file = os.path.join(kvm_test_dir, config_file) 75 dst_file = os.path.join(kvm_test_dir, config_file)
76 if not os.path.isfile(dst_file): 76 if not os.path.isfile(dst_file):
77 logging.debug("Creating config file %s from sample", dst_file) 77 logging.debug("Creating config file %s from sample", dst_file)
78 shutil.copyfile(src_file, dst_file) 78 shutil.copyfile(src_file, dst_file)
79 else: 79 else:
80 logging.debug("Config file %s exists, not touching" % dst_file) 80 logging.debug("Config file %s exists, not touching" % dst_file)
81 81
82 logging.info("3 - Verifying iso (make sure we have the OS ISO needed for " 82 logging.info("3 - Verifying iso (make sure we have the OS ISO needed for "
83 "the default test set)") 83 "the default test set)")
84 84
85 iso_name = "Fedora-13-x86_64-DVD.iso" 85 iso_name = "Fedora-14-x86_64-DVD.iso"
86 fedora_dir = "pub/fedora/linux/releases/13/Fedora/x86_64/iso" 86 fedora_dir = "pub/fedora/linux/releases/14/Fedora/x86_64/iso"
87 url = os.path.join("http://download.fedoraproject.org/", fedora_dir, 87 url = os.path.join("http://download.fedoraproject.org/", fedora_dir,
88 iso_name) 88 iso_name)
89 hash = "65c7f1aad3feb888ae3daadaf45d4a2a32b8773a" 89 hash = "38a4078011bac74493db7ecc53c9d9fbc96dbbd5"
90 destination = os.path.join(base_dir, 'isos', 'linux') 90 destination = os.path.join(base_dir, 'isos', 'linux')
91 check_iso(url, destination, hash) 91 check_iso(url, destination, hash)
92 92
93 logging.info("4 - Verifying winutils.iso (make sure we have the utility " 93 logging.info("4 - Verifying winutils.iso (make sure we have the utility "
94 "ISO needed for Windows testing)") 94 "ISO needed for Windows testing)")
95 95
96 logging.info("In order to run the KVM autotests in Windows guests, we " 96 logging.info("In order to run the KVM autotests in Windows guests, we "
97 "provide you an ISO that this script can download") 97 "provide you an ISO that this script can download")
98 98
99 url = "http://people.redhat.com/mrodrigu/kvm/winutils.iso" 99 url = "http://people.redhat.com/mrodrigu/kvm/winutils.iso"
(...skipping 24 matching lines...) Expand all
124 "(session 'Install Prerequisite packages')") 124 "(session 'Install Prerequisite packages')")
125 125
126 client_dir = os.path.abspath(os.path.join(kvm_test_dir, "..", "..")) 126 client_dir = os.path.abspath(os.path.join(kvm_test_dir, "..", ".."))
127 autotest_bin = os.path.join(client_dir, 'bin', 'autotest') 127 autotest_bin = os.path.join(client_dir, 'bin', 'autotest')
128 control_file = os.path.join(kvm_test_dir, 'control') 128 control_file = os.path.join(kvm_test_dir, 'control')
129 logging.info("When you are done fixing eventual warnings found, " 129 logging.info("When you are done fixing eventual warnings found, "
130 "you can run the kvm test using the command line AS ROOT:") 130 "you can run the kvm test using the command line AS ROOT:")
131 logging.info("%s --verbose %s", autotest_bin, control_file) 131 logging.info("%s --verbose %s", autotest_bin, control_file)
132 logging.info("You can also edit the test config files (see output of " 132 logging.info("You can also edit the test config files (see output of "
133 "step 2 for a list)") 133 "step 2 for a list)")
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698