diff options
author | Yuval Peress <peress@chromium.org> | 2021-06-21 22:03:29 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-06-22 17:28:53 +0000 |
commit | fd2233665db303a406b5337b0f044b5275379f85 (patch) | |
tree | 03547f088872cb5fa151b7923d729a70e647144d /zephyr/zmake/zmake/zmake.py | |
parent | 17f878e752c9ca275ff29d03e2802ef43c560dc2 (diff) | |
download | chrome-ec-fd2233665db303a406b5337b0f044b5275379f85.tar.gz |
zmake: block hypothesis health checks for CQ
Allow passing a --cq flag to zmake for running a CQ pass. When done,
zmake will remove flaky features such as hypothesis health checks which
cause pytests to fail when taking longer than "expected". Note that the
health checks ignore the deadline set on each function and will still
fail if they deem the test to have run too long.
BRANCH=none
BUG=b:190229270, b:190957007
TEST=sudo emerge chromeos-base/zephyr-build-tools && \
zmake --cq testall
Signed-off-by: Yuval Peress <peress@chromium.org>
Change-Id: Iaf9a38e0bbd65f0be9521019a615279d8b5fbb49
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2977586
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'zephyr/zmake/zmake/zmake.py')
-rw-r--r-- | zephyr/zmake/zmake/zmake.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/zephyr/zmake/zmake/zmake.py b/zephyr/zmake/zmake/zmake.py index 17c460c6b5..2415c76d9f 100644 --- a/zephyr/zmake/zmake/zmake.py +++ b/zephyr/zmake/zmake/zmake.py @@ -139,10 +139,11 @@ class Zmake: before launching more, False to just do this after all jobs complete """ def __init__(self, checkout=None, jobserver=None, jobs=0, modules_dir=None, - zephyr_base=None): + zephyr_base=None, cq=False): zmake.multiproc.reset() self._checkout = checkout self._zephyr_base = zephyr_base + self._is_cq = cq if modules_dir: self.module_paths = zmake.modules.locate_from_directory(modules_dir) @@ -446,8 +447,11 @@ class Zmake: def run_test(test_file): with self.jobserver.get_job(): + proc_args = ['pytest', '--verbose'] + if self._is_cq: + proc_args.append('--hypothesis-profile=cq') proc = self.jobserver.popen( - ['pytest', '--verbose', test_file], + proc_args + [test_file], stdout=subprocess.PIPE, stderr=subprocess.STDOUT, encoding='utf-8', |