run serial test even when parallel test fails

The serial test won't run when parallel group fails
because of the short-circuiting effect of logical
operators.

Assuming the tool was not designed to fail the whole
test prematurely, this change ensures both test groups
executed every time.

BUG=None
TEST=build_test and observe the test cases in serial
group (io_jail and sys_util) are executed when the
parallel group fails.

Change-Id: I86e57069490c58dfed48960d87ea35c2403450b7
Signed-off-by: Jianxun Zhang <jianxun.zhang@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/1488611
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Zach Reizner <zachr@chromium.org>
This commit is contained in:
Jianxun Zhang 2019-02-25 22:12:26 -08:00 committed by chrome-bot
parent 9105e9fbe5
commit 1bc4a06801

View file

@ -116,12 +116,14 @@ def test_target(triple, is_release, env):
is_release: True to build a release version. is_release: True to build a release version.
env: Enviroment variables to run cargo with. env: Enviroment variables to run cargo with.
""" """
return (
test_target_modules( parallel_result = test_target_modules(
triple, is_release, env, TEST_MODULES_PARALLEL, True) and triple, is_release, env, TEST_MODULES_PARALLEL, True)
test_target_modules(
triple, is_release, env, TEST_MODULES_SERIAL, False) serial_result = test_target_modules(
) triple, is_release, env, TEST_MODULES_SERIAL, False)
return parallel_result and serial_result
def check_build(sysroot, triple, kind, test_it, clean): def check_build(sysroot, triple, kind, test_it, clean):