Clear cache for runs of ctest if --cache not set.

Change-Id: I013c838c83dd23cbfe04f77f87df74778d8e874e

BUG=chromium-os:10723
TEST=Ran it

Review URL: http://codereview.chromium.org/6389004
This commit is contained in:
Chris Sosa 2011-01-31 12:12:41 -08:00
parent b8a84b2cb7
commit 39ed0d0ebe

View File

@ -225,6 +225,15 @@ 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):
"""Runs the auto update test harness.
@ -274,6 +283,8 @@ def main():
help='board for the image to compare against.')
parser.add_option('-c', '--channel',
help='channel for the image to compare against.')
parser.add_option('--cache', default=False, action='store_true',
help='Cache payloads')
parser.add_option('-l', '--latestbase',
help='Base url for latest links.')
parser.add_option('-z', '--zipbase',
@ -301,6 +312,10 @@ def main():
if not options.zipbase:
parser.error('Need zip url base to get images.')
if not options.cache:
Info('Wiping dev server cache.')
WipeDevServerCache()
RunAUTestHarness(options.board, options.channel, options.latestbase,
options.zipbase, options.no_graphics, options.type,
options.remote)