Skip to content

Commit da34b6e

Browse files
committed
tests: Fix few test for proper "skipped" detection with qemu-arm's tinytest.
"Builtin" tinytest-based testsuite as employed by qemu-arm (and now generalized by me to be reusable for other targets) performs simplified detection of skipped tests, it treats as such tests which raised SystemExit (instead of checking got "SKIP" output). Consequently, each "SKIP" must be accompanied by SystemExit (and conversely, SystemExit should not be used if test is not skipped, which so far seems to be true).
1 parent e4e3f0d commit da34b6e

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

tests/basics/builtin_compile.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,4 @@ def test():
4646
test()
4747
else:
4848
print("SKIP")
49+
raise SystemExit

tests/basics/class_descriptor.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ class Main:
2727
r = m.Forward
2828
if 'Descriptor' in repr(r.__class__):
2929
print('SKIP')
30-
else:
31-
print(r)
32-
m.Forward = 'a'
33-
del m.Forward
30+
raise SystemExit
3431

32+
print(r)
33+
m.Forward = 'a'
34+
del m.Forward

tests/basics/fun_name.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,4 @@ def Fun(self):
1414
print(A().Fun.__name__)
1515
except AttributeError:
1616
print('SKIP')
17+
raise SystemExit

0 commit comments

Comments
 (0)