runtest: add --build-install-only/-i flag to skip test execution

Change-Id: I3033b442e33a69442b881f0a5a7b9e2299d35d54
This commit is contained in:
Igor Murashkin
2014-01-23 16:13:29 -08:00
parent a0afc8cfb2
commit 8d703533ba

View File

@@ -114,6 +114,9 @@ class TestRunner(object):
parser.add_option("-n", "--skip_execute", dest="preview", default=False, parser.add_option("-n", "--skip_execute", dest="preview", default=False,
action="store_true", action="store_true",
help="Do not execute, just preview commands") help="Do not execute, just preview commands")
parser.add_option("-i", "--build-install-only", dest="build_install_only", default=False,
action="store_true",
help="Do not execute, build tests and install to device only")
parser.add_option("-r", "--raw-mode", dest="raw_mode", default=False, parser.add_option("-r", "--raw-mode", dest="raw_mode", default=False,
action="store_true", action="store_true",
help="Raw mode (for output to other tools)") help="Raw mode (for output to other tools)")
@@ -501,6 +504,10 @@ class TestRunner(object):
if not self._options.skip_build: if not self._options.skip_build:
self._DoBuild() self._DoBuild()
if self._options.build_install_only:
logger.Log("Skipping test execution (due to --build-install-only flag)")
return
for test_suite in self._GetTestsToRun(): for test_suite in self._GetTestsToRun():
try: try:
test_suite.Run(self._options, self._adb) test_suite.Run(self._options, self._adb)