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

Unified Diff: bin/ctest.py

Issue 3536018: Fixes for cbuild to work with ctest. (Closed) Base URL: http://git.chromium.org/git/crosutils.git
Patch Set: Fixes for petkov 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 | « bin/cros_au_test_harness.py ('k') | image_to_live.sh » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bin/ctest.py
diff --git a/bin/ctest.py b/bin/ctest.py
index 78210b6308c018df885571569f9eda7c16c27c3f..418dfaba7859684b658eaf367341cf247ce28aed 100755
--- a/bin/ctest.py
+++ b/bin/ctest.py
@@ -127,7 +127,8 @@ def GrabZipAndExtractImage(zip_url, download_folder, image_name) :
fh.close()
-def RunAUTestHarness(board, channel, latest_url_base, zip_server_base):
+def RunAUTestHarness(board, channel, latest_url_base, zip_server_base,
+ no_graphics, type, remote):
"""Runs the auto update test harness.
The auto update test harness encapsulates testing the auto-update mechanism
@@ -140,22 +141,33 @@ def RunAUTestHarness(board, channel, latest_url_base, zip_server_base):
channel: the channel to run the au test harness against.
latest_url_base: base url for getting latest links.
zip_server_base: base url for zipped images.
+ no_graphics: boolean - If True, disable graphics during vm test.
+ type: which test harness to run. Possible values: real, vm.
+ remote: ip address for real test harness run.
"""
crosutils_root = os.path.join(os.path.dirname(__file__), '..')
download_folder = os.path.abspath('latest_download')
zip_url = GetLatestZipUrl(board, channel, latest_url_base, zip_server_base)
GrabZipAndExtractImage(zip_url, download_folder, _IMAGE_TO_EXTRACT)
+ no_graphics_flag = ''
+ if no_graphics: no_graphics_flag = '--no_graphics'
+
# Tests go here.
latest_image = RunCommand(['./get_latest_image.sh', '--board=%s' % board],
cwd=crosutils_root, redirect_stdout=True,
- print_cmd=True)
+ print_cmd=True).strip()
RunCommand(['bin/cros_au_test_harness',
'--base_image=%s' % os.path.join(download_folder,
_IMAGE_TO_EXTRACT),
- '--target_image=%s' % latest_image,
- '--board=%s' % board], cwd=crosutils_root)
+ '--target_image=%s' % os.path.join(latest_image,
+ _IMAGE_TO_EXTRACT),
+ no_graphics_flag,
+ '--board=%s' % board,
+ '--type=%s' % type,
+ '--remote=%s' % remote,
+ ], cwd=crosutils_root)
def main():
@@ -168,6 +180,13 @@ def main():
help='Base url for latest links.')
parser.add_option('-z', '--zipbase',
help='Base url for hosted images.')
+ parser.add_option('--no_graphics', action='store_true', default=False,
+ help='Disable graphics for the vm test.')
+ parser.add_option('--type', default='vm',
+ help='type of test to run: [vm, real]. Default: vm.')
+ parser.add_option('--remote', default='0.0.0.0',
+ help='For real tests, ip address of the target machine.')
+
# Set the usage to include flags.
parser.set_usage(parser.format_help())
(options, args) = parser.parse_args()
@@ -188,7 +207,8 @@ def main():
parser.error('Need zip url base to get images.')
RunAUTestHarness(options.board, options.channel, options.latestbase,
- options.zipbase)
+ options.zipbase, options.no_graphics, options.type,
+ options.remote)
if __name__ == '__main__':
« no previous file with comments | « bin/cros_au_test_harness.py ('k') | image_to_live.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698