From 656582795504cb6c9b025e716f20a2468e5d71ac Mon Sep 17 00:00:00 2001 From: Damien George Date: Sun, 10 Aug 2025 22:25:15 +1000 Subject: [PATCH] tests/run-tests.py: Always include stress/ tests directory in tests. Ports that now run the stress tests, that didn't prior to this commit are: cc3200, esp8266, minimal, nrf, renesas-ra, samd, qemu, webassembly. Signed-off-by: Damien George --- tests/run-tests.py | 10 +++------- tests/stress/dict_copy.py | 7 ++++++- tests/stress/dict_create.py | 6 +++++- 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/tests/run-tests.py b/tests/run-tests.py index 498370f70e..21e0ab8872 100755 --- a/tests/run-tests.py +++ b/tests/run-tests.py @@ -1340,6 +1340,7 @@ the last matching regex is used: "micropython", "misc", "extmod", + "stress", ) if args.inlineasm_arch is not None: test_dirs += ("inlineasm/{}".format(args.inlineasm_arch),) @@ -1349,15 +1350,11 @@ the last matching regex is used: test_dirs += ("float",) if args.platform == "pyboard": # run pyboard tests - test_dirs += ("stress", "ports/stm32") - elif args.platform == "mimxrt": - test_dirs += ("stress",) + test_dirs += ("ports/stm32",) elif args.platform == "renesas-ra": test_dirs += ("ports/renesas-ra") elif args.platform == "rp2": - test_dirs += ("stress", "ports/rp2") - elif args.platform == "esp32": - test_dirs += ("stress",) + test_dirs += ("ports/rp2",) elif args.platform == "WiPy": # run WiPy tests test_dirs += ("ports/cc3200",) @@ -1366,7 +1363,6 @@ the last matching regex is used: test_dirs += ( "import", "io", - "stress", "unicode", "cmdline", "ports/unix", diff --git a/tests/stress/dict_copy.py b/tests/stress/dict_copy.py index 73d3a5b51d..f9b742e20f 100644 --- a/tests/stress/dict_copy.py +++ b/tests/stress/dict_copy.py @@ -1,6 +1,11 @@ # copying a large dictionary -a = {i: 2 * i for i in range(1000)} +try: + a = {i: 2 * i for i in range(1000)} +except MemoryError: + print("SKIP") + raise SystemExit + b = a.copy() for i in range(1000): print(i, b[i]) diff --git a/tests/stress/dict_create.py b/tests/stress/dict_create.py index e9db40a8e6..91a83a12f9 100644 --- a/tests/stress/dict_create.py +++ b/tests/stress/dict_create.py @@ -3,6 +3,10 @@ d = {} x = 1 while x < 1000: - d[x] = x + try: + d[x] = x + except MemoryError: + print("SKIP") + raise SystemExit x += 1 print(d[500])