summary refs log tree commit diff
diff options
context:
space:
mode:
authorJianxun Zhang <jianxun.zhang@intel.com>2019-02-25 22:12:26 -0800
committerchrome-bot <chrome-bot@chromium.org>2019-03-14 20:53:53 -0700
commit1bc4a06801a312e4fb770d323c35d34065a4d618 (patch)
treed80d3721656d1d8c31997e4f609bd40b9bd27fc6
parent9105e9fbe54afcbda54676e6de7410c4a2d0a07d (diff)
downloadcrosvm-1bc4a06801a312e4fb770d323c35d34065a4d618.tar
crosvm-1bc4a06801a312e4fb770d323c35d34065a4d618.tar.gz
crosvm-1bc4a06801a312e4fb770d323c35d34065a4d618.tar.bz2
crosvm-1bc4a06801a312e4fb770d323c35d34065a4d618.tar.lz
crosvm-1bc4a06801a312e4fb770d323c35d34065a4d618.tar.xz
crosvm-1bc4a06801a312e4fb770d323c35d34065a4d618.tar.zst
crosvm-1bc4a06801a312e4fb770d323c35d34065a4d618.zip
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>
-rwxr-xr-xbuild_test.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/build_test.py b/build_test.py
index c27a044..21d87df 100755
--- a/build_test.py
+++ b/build_test.py
@@ -116,12 +116,14 @@ def test_target(triple, is_release, env):
     is_release: True to build a release version.
     env: Enviroment variables to run cargo with.
   """
-  return (
-      test_target_modules(
-          triple, is_release, env, TEST_MODULES_PARALLEL, True) and
-      test_target_modules(
-          triple, is_release, env, TEST_MODULES_SERIAL, False)
-  )
+
+  parallel_result = test_target_modules(
+      triple, is_release, env, TEST_MODULES_PARALLEL, True)
+
+  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):