Skip to content

Commit 6565827

Browse files
committed
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 <damien@micropython.org>
1 parent f493075 commit 6565827

File tree

3 files changed

+14
-9
lines changed

3 files changed

+14
-9
lines changed

tests/run-tests.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1340,6 +1340,7 @@ def main():
13401340
"micropython",
13411341
"misc",
13421342
"extmod",
1343+
"stress",
13431344
)
13441345
if args.inlineasm_arch is not None:
13451346
test_dirs += ("inlineasm/{}".format(args.inlineasm_arch),)
@@ -1349,15 +1350,11 @@ def main():
13491350
test_dirs += ("float",)
13501351
if args.platform == "pyboard":
13511352
# run pyboard tests
1352-
test_dirs += ("stress", "ports/stm32")
1353-
elif args.platform == "mimxrt":
1354-
test_dirs += ("stress",)
1353+
test_dirs += ("ports/stm32",)
13551354
elif args.platform == "renesas-ra":
13561355
test_dirs += ("ports/renesas-ra")
13571356
elif args.platform == "rp2":
1358-
test_dirs += ("stress", "ports/rp2")
1359-
elif args.platform == "esp32":
1360-
test_dirs += ("stress",)
1357+
test_dirs += ("ports/rp2",)
13611358
elif args.platform == "WiPy":
13621359
# run WiPy tests
13631360
test_dirs += ("ports/cc3200",)
@@ -1366,7 +1363,6 @@ def main():
13661363
test_dirs += (
13671364
"import",
13681365
"io",
1369-
"stress",
13701366
"unicode",
13711367
"cmdline",
13721368
"ports/unix",

tests/stress/dict_copy.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
# copying a large dictionary
22

3-
a = {i: 2 * i for i in range(1000)}
3+
try:
4+
a = {i: 2 * i for i in range(1000)}
5+
except MemoryError:
6+
print("SKIP")
7+
raise SystemExit
8+
49
b = a.copy()
510
for i in range(1000):
611
print(i, b[i])

tests/stress/dict_create.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
d = {}
44
x = 1
55
while x < 1000:
6-
d[x] = x
6+
try:
7+
d[x] = x
8+
except MemoryError:
9+
print("SKIP")
10+
raise SystemExit
711
x += 1
812
print(d[500])

0 commit comments

Comments
 (0)