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

Unified Diff: bin/cros_au_test_harness.py

Issue 3612004: Add board option to au test harness so that this works for others without a default board. (Closed) Base URL: http://git.chromium.org/git/crosutils.git
Patch Set: Clean up board 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | bin/loman.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bin/cros_au_test_harness.py
diff --git a/bin/cros_au_test_harness.py b/bin/cros_au_test_harness.py
index eaed1ef2b9267a74d9f3bc3f7409bf8c716ed6eb..eef95b6f8b552008f3dbc49d8e89c81ed45dcb98 100755
--- a/bin/cros_au_test_harness.py
+++ b/bin/cros_au_test_harness.py
@@ -10,7 +10,7 @@ import sys
import unittest
sys.path.append(os.path.join(os.path.dirname(__file__), '../lib'))
-from cros_build_lib import RunCommand, Info, Warning
+from cros_build_lib import RunCommand, Info, Warning, ReinterpretPathForChroot
_KVM_PID_FILE = '/tmp/harness_pid'
_SCRIPTS_DIR = os.path.join(os.path.dirname(__file__), '..')
@@ -18,6 +18,7 @@ _FULL_VDISK_SIZE = 6072
_FULL_STATEFULFS_SIZE = 2048
global base_image_path
+global board
global target_image_path
_VERIFY_SUITE = 'suite_Smoke'
@@ -106,9 +107,11 @@ class VirtualAUTest(unittest.TestCase, AUTest):
Info('Qemu image not found, creating one.')
RunCommand(['%s/image_to_vm.sh' % _SCRIPTS_DIR,
'--full',
- '--from %s' % os.path.dirname(base_image_path),
+ '--from %s' % ReinterpretPathForChroot(
+ os.path.dirname(base_image_path)),
'--vdisk_size %s' % _FULL_VDISK_SIZE,
'--statefulfs_size %s' % _FULL_STATEFULFS_SIZE,
+ '--board %s' % board,
'--test_image'], enter_chroot=True)
else:
Info('Using existing VM image')
@@ -153,6 +156,8 @@ if __name__ == '__main__':
help='path to the base image.')
parser.add_option('-t', '--target_image',
help='path to the target image')
+ parser.add_option('-r', '--board',
+ help='board for the images')
# Set the usage to include flags.
parser.set_usage(parser.format_help())
# Parse existing sys.argv so we can pass rest to unittest.main.
@@ -160,6 +165,7 @@ if __name__ == '__main__':
base_image_path = options.base_image
target_image_path = options.target_image
+ board = options.board
if not base_image_path:
parser.error('Need path to base image for vm.')
@@ -167,4 +173,7 @@ if __name__ == '__main__':
if not target_image_path:
parser.error('Need path to target image to update with.')
+ if not board:
+ parser.error('Need board to convert base image to vm.')
+
unittest.main()
« no previous file with comments | « no previous file | bin/loman.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698