From d9e56236121d1b3e8bec4ca880f96b1814ff89da Mon Sep 17 00:00:00 2001 From: Zxilly Date: Mon, 17 Jun 2024 17:08:55 +0800 Subject: [PATCH] test: fail fast for wasm test Signed-off-by: Zxilly --- scripts/tests.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/scripts/tests.py b/scripts/tests.py index a5d9e198e1..c362da752f 100644 --- a/scripts/tests.py +++ b/scripts/tests.py @@ -115,6 +115,15 @@ def run_unit_tests(): ): del env[k] + env_size = 0 + for k, v in env.items(): + env_size += len(k) + len(v) + 1 + if env_size > 8192: + log("Environment size is too large") + for k, v in env.items(): + print(f"{k}={v}") + exit(1) + wasmbrowsertest = shutil.which("wasmbrowsertest") if wasmbrowsertest is None: raise Exception("wasmbrowsertest is not installed. Please install wasmbrowsertest and try again.")