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

Unified Diff: bin/ctest.py

Issue 6482017: Update test harness to take in optional public and private keys to sign payloads. (Closed) Base URL: http://git.chromium.org/git/crosutils.git@master
Patch Set: Fix a bug I found 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 side-by-side diff with in-line comments
Download patch
Index: bin/ctest.py
diff --git a/bin/ctest.py b/bin/ctest.py
index 9388eaa225bc44cdd3be4d9d968e111209261578..7df0a5df905c9a10643657ce2f0f18a85b3ab973 100755
--- a/bin/ctest.py
+++ b/bin/ctest.py
@@ -225,17 +225,8 @@ def GrabZipAndExtractImage(zip_url, download_folder, image_name) :
fh.close()
-def WipeDevServerCache():
- """Wipes the cache of the dev server."""
- RunCommand(['sudo',
- './start_devserver',
- '--clear_cache',
- '--exit',
- ], enter_chroot=True)
-
-
def RunAUTestHarness(board, channel, latest_url_base, zip_server_base,
- no_graphics, type, remote):
+ no_graphics, type, remote, clean):
"""Runs the auto update test harness.
The auto update test harness encapsulates testing the auto-update mechanism
@@ -251,6 +242,7 @@ def RunAUTestHarness(board, channel, latest_url_base, zip_server_base,
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.
+ clean: Clean the state of test harness before running.
"""
crosutils_root = os.path.join(os.path.dirname(__file__), '..')
download_folder = os.path.abspath('latest_download')
@@ -272,6 +264,7 @@ def RunAUTestHarness(board, channel, latest_url_base, zip_server_base,
'--remote=%s' % remote,
]
if no_graphics: cmd.append('--no_graphics')
+ if clean: cmd.append('--clean')
RunCommand(cmd, cwd=crosutils_root)
@@ -299,25 +292,14 @@ def main():
parser.set_usage(parser.format_help())
(options, args) = parser.parse_args()
- if args:
- parser.error('Extra args found %s.' % args)
-
- if not options.board:
- parser.error('Need board for image to compare against.')
-
- if not options.channel:
- parser.error('Need channel for image to compare against.')
-
- if not options.zipbase:
- parser.error('Need zip url base to get images.')
-
- if not options.cache:
- Info('Wiping dev server cache.')
- WipeDevServerCache()
+ if args: parser.error('Extra args found %s.' % args)
+ if not options.board: parser.error('Need board for image to compare against.')
+ if not options.channel: parser.error('Need channel e.g. dev-channel.')
+ if not options.zipbase: parser.error('Need zip url base to get images.')
RunAUTestHarness(options.board, options.channel, options.latestbase,
options.zipbase, options.no_graphics, options.type,
- options.remote)
+ options.remote, not options.cache)
if __name__ == '__main__':
« bin/cros_au_test_harness.py ('K') | « bin/cros_run_vm_update ('k') | image_to_vm.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698