Expose the return code for gpu tests in bb_run_bot.
BUG=590288 Review URL: https://codereview.chromium.org/1898383002 Cr-Original-Commit-Position: refs/heads/master@{#388505} Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src Cr-Mirrored-Commit: d20f4778b5f60858d3f4f59c8aefd3075542d948
This commit is contained in:
Родитель
94c1354aa0
Коммит
2f91397926
|
@ -498,51 +498,54 @@ def RunWebkitTests(options):
|
||||||
|
|
||||||
|
|
||||||
def RunGPUTests(options):
|
def RunGPUTests(options):
|
||||||
|
exit_code = 0
|
||||||
revision = _GetRevision(options)
|
revision = _GetRevision(options)
|
||||||
builder_name = options.build_properties.get('buildername', 'noname')
|
builder_name = options.build_properties.get('buildername', 'noname')
|
||||||
|
|
||||||
bb_annotations.PrintNamedStep('pixel_tests')
|
bb_annotations.PrintNamedStep('pixel_tests')
|
||||||
RunCmd(['content/test/gpu/run_gpu_test.py',
|
exit_code = RunCmd(['content/test/gpu/run_gpu_test.py',
|
||||||
'pixel', '-v',
|
'pixel', '-v',
|
||||||
'--browser',
|
'--browser',
|
||||||
'android-content-shell',
|
'android-content-shell',
|
||||||
'--build-revision',
|
'--build-revision',
|
||||||
str(revision),
|
str(revision),
|
||||||
'--upload-refimg-to-cloud-storage',
|
'--upload-refimg-to-cloud-storage',
|
||||||
'--refimg-cloud-storage-bucket',
|
'--refimg-cloud-storage-bucket',
|
||||||
'chromium-gpu-archive/reference-images',
|
'chromium-gpu-archive/reference-images',
|
||||||
'--os-type',
|
'--os-type',
|
||||||
'android',
|
'android',
|
||||||
'--test-machine-name',
|
'--test-machine-name',
|
||||||
EscapeBuilderName(builder_name),
|
EscapeBuilderName(builder_name),
|
||||||
'--android-blacklist-file',
|
'--android-blacklist-file',
|
||||||
'out/bad_devices.json'])
|
'out/bad_devices.json']) or exit_code
|
||||||
|
|
||||||
bb_annotations.PrintNamedStep('webgl_conformance_tests')
|
bb_annotations.PrintNamedStep('webgl_conformance_tests')
|
||||||
RunCmd(['content/test/gpu/run_gpu_test.py', '-v',
|
exit_code = RunCmd(['content/test/gpu/run_gpu_test.py', '-v',
|
||||||
'--browser=android-content-shell', 'webgl_conformance',
|
'--browser=android-content-shell', 'webgl_conformance',
|
||||||
'--webgl-conformance-version=1.0.1',
|
'--webgl-conformance-version=1.0.1',
|
||||||
'--android-blacklist-file',
|
'--android-blacklist-file',
|
||||||
'out/bad_devices.json'])
|
'out/bad_devices.json']) or exit_code
|
||||||
|
|
||||||
bb_annotations.PrintNamedStep('android_webview_webgl_conformance_tests')
|
bb_annotations.PrintNamedStep('android_webview_webgl_conformance_tests')
|
||||||
RunCmd(['content/test/gpu/run_gpu_test.py', '-v',
|
exit_code = RunCmd(['content/test/gpu/run_gpu_test.py', '-v',
|
||||||
'--browser=android-webview-shell', 'webgl_conformance',
|
'--browser=android-webview-shell', 'webgl_conformance',
|
||||||
'--webgl-conformance-version=1.0.1',
|
'--webgl-conformance-version=1.0.1',
|
||||||
'--android-blacklist-file',
|
'--android-blacklist-file',
|
||||||
'out/bad_devices.json'])
|
'out/bad_devices.json']) or exit_code
|
||||||
|
|
||||||
bb_annotations.PrintNamedStep('gpu_rasterization_tests')
|
bb_annotations.PrintNamedStep('gpu_rasterization_tests')
|
||||||
RunCmd(['content/test/gpu/run_gpu_test.py',
|
exit_code = RunCmd(['content/test/gpu/run_gpu_test.py',
|
||||||
'gpu_rasterization', '-v',
|
'gpu_rasterization', '-v',
|
||||||
'--browser',
|
'--browser',
|
||||||
'android-content-shell',
|
'android-content-shell',
|
||||||
'--build-revision',
|
'--build-revision',
|
||||||
str(revision),
|
str(revision),
|
||||||
'--test-machine-name',
|
'--test-machine-name',
|
||||||
EscapeBuilderName(builder_name),
|
EscapeBuilderName(builder_name),
|
||||||
'--android-blacklist-file',
|
'--android-blacklist-file',
|
||||||
'out/bad_devices.json'])
|
'out/bad_devices.json']) or exit_code
|
||||||
|
|
||||||
|
return exit_code
|
||||||
|
|
||||||
|
|
||||||
def RunPythonUnitTests(_options):
|
def RunPythonUnitTests(_options):
|
||||||
|
@ -653,6 +656,7 @@ def GenerateTestReport(options):
|
||||||
|
|
||||||
|
|
||||||
def MainTestWrapper(options):
|
def MainTestWrapper(options):
|
||||||
|
exit_code = 0
|
||||||
try:
|
try:
|
||||||
# Spawn logcat monitor
|
# Spawn logcat monitor
|
||||||
SpawnLogcatMonitor()
|
SpawnLogcatMonitor()
|
||||||
|
@ -667,7 +671,8 @@ def MainTestWrapper(options):
|
||||||
InstallApk(options, install_obj, print_step=True)
|
InstallApk(options, install_obj, print_step=True)
|
||||||
|
|
||||||
if options.test_filter:
|
if options.test_filter:
|
||||||
bb_utils.RunSteps(options.test_filter, GetTestStepCmds(), options)
|
exit_code = bb_utils.RunSteps(
|
||||||
|
options.test_filter, GetTestStepCmds(), options) or exit_code
|
||||||
|
|
||||||
if options.coverage_bucket:
|
if options.coverage_bucket:
|
||||||
coverage_html = GenerateJavaCoverageReport(options)
|
coverage_html = GenerateJavaCoverageReport(options)
|
||||||
|
@ -676,7 +681,10 @@ def MainTestWrapper(options):
|
||||||
shutil.rmtree(coverage_html, ignore_errors=True)
|
shutil.rmtree(coverage_html, ignore_errors=True)
|
||||||
|
|
||||||
if options.experimental:
|
if options.experimental:
|
||||||
RunTestSuites(options, gtest_config.EXPERIMENTAL_TEST_SUITES)
|
exit_code = RunTestSuites(
|
||||||
|
options, gtest_config.EXPERIMENTAL_TEST_SUITES) or exit_code
|
||||||
|
|
||||||
|
return exit_code
|
||||||
|
|
||||||
finally:
|
finally:
|
||||||
# Run all post test steps
|
# Run all post test steps
|
||||||
|
@ -768,7 +776,7 @@ def main(argv):
|
||||||
setattr(options, 'coverage_dir',
|
setattr(options, 'coverage_dir',
|
||||||
os.path.join(CHROME_OUT_DIR, options.target, 'coverage'))
|
os.path.join(CHROME_OUT_DIR, options.target, 'coverage'))
|
||||||
|
|
||||||
MainTestWrapper(options)
|
return MainTestWrapper(options)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|
|
@ -96,6 +96,9 @@ def RunSteps(steps, step_cmds, options):
|
||||||
print >> sys.stderr, 'FATAL: Unknown steps %s' % list(unknown_steps)
|
print >> sys.stderr, 'FATAL: Unknown steps %s' % list(unknown_steps)
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
|
exit_code = 0
|
||||||
for step, cmd in step_cmds:
|
for step, cmd in step_cmds:
|
||||||
if step in steps:
|
if step in steps:
|
||||||
cmd(options)
|
exit_code = cmd(options) or exit_code
|
||||||
|
|
||||||
|
return exit_code
|
||||||
|
|
Загрузка…
Ссылка в новой задаче