Skip to content

Commit

Permalink
tests: Move native while test from pybnative to micropython.
Browse files Browse the repository at this point in the history
And make it so this test can run on any target.

LED and time testing has been removed from this test, that can now be
tested using: ./run-tests.py --via-mpy --emit native.

Signed-off-by: Damien George <damien@micropython.org>
  • Loading branch information
dpgeorge committed May 26, 2022
1 parent 20d9f34 commit 065df55
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 18 deletions.
13 changes: 13 additions & 0 deletions tests/micropython/native_while.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# test native while loop


@micropython.native
def f(n):
i = 0
while i < n:
print(i)
i += 1


f(2)
f(4)
File renamed without changes.
17 changes: 0 additions & 17 deletions tests/pybnative/while.py

This file was deleted.

2 changes: 1 addition & 1 deletion tests/run-tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -941,7 +941,7 @@ def main():
)
if args.target == "pyboard":
# run pyboard tests
test_dirs += ("float", "stress", "pyb", "pybnative", "inlineasm")
test_dirs += ("float", "stress", "pyb", "inlineasm")
elif args.target in ("renesas-ra"):
test_dirs += ("float", "inlineasm", "renesas-ra")
elif args.target == "rp2":
Expand Down

1 comment on commit 065df55

@AmirHmZz
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dpgeorge Thank you a lot for doing it :)

Please sign in to comment.