Propagate Android test results through exceptions.
Previously, Android test results were propagated after all tests finished running. In the event of an Exception, none of the test results would be written to file. This CL slightly changes the control flow of TestRun.RunTests(). Instead of returning a results array, it now receives a results array as input and modifies the array as it receives test results. This allows the json_writer context TearDown() to serialize the partial test results. This CL updates local_device_test_run.py to have the correct flow. The flow of local_device_perf_test_run.py and local_machine_junit_test_run.py are left untouched -- they can be modified in the future if it's deemed necessary. This minimizes the size of this CL. Bug: 895027 Change-Id: I60fe78da993de366d678252b84a91aaff044c10b Reviewed-on: https://chromium-review.googlesource.com/c/1305396 Commit-Queue: Erik Chen <erikchen@chromium.org> Reviewed-by:John Budorick <jbudorick@chromium.org> Cr-Commit-Position: refs/heads/master@{#603599}
Showing
Please register or sign in to comment