8000 travis: Add tests for building and importing dynamic native modules. · micropython/micropython@ac76967 · GitHub
[go: up one dir, main page]

Skip to content

Commit ac76967

Browse files
committed
travis: Add tests for building and importing dynamic native modules.
1 parent 60c3c22 commit ac76967

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

.travis.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,10 @@ jobs:
6262
- stage: test
6363
env: NAME="unix coverage build and tests"
6464
install:
65+
- sudo apt-get install python3-pip
6566
- sudo pip install cpp-coveralls
67+
- sudo pip3 install setuptools
68+
- sudo pip3 install pyelftools
6669
- gcc --version
6770
- python3 --version
6871
script:
@@ -78,6 +81,17 @@ jobs:
7881
- (cd tests && MICROPY_CPYTHON3=python3 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests --via-mpy --emit native -d basics float micropython)
7982
# test when input script comes from stdin
8083
- cat tests/basics/0prelim.py | ports/unix/micropython_coverage | grep -q 'abc'
84+
# test building native mpy modules
85+
- make -C examples/natmod/features1 ARCH=x64
86+
- make -C examples/natmod/features2 ARCH=x64
87+
- make -C examples/natmod/btree ARCH=x64
88+
- make -C examples/natmod/framebuf ARCH=x64
89+
- make -C examples/natmod/uheapq ARCH=x64
90+
- make -C examples/natmod/ure ARCH=x64
91+
- make -C examples/natmod/uzlib ARCH=x64
92+
# test importing .mpy generated by mpy_ld.py
93+
- MICROPYPATH=examples/natmod/features2 ./ports/unix/micropython_coverage -m features2
94+
- (cd tests && ./run-natmodtests.py extmod/{btree*,framebuf*,uheapq*,ure*,uzlib*}.py)
8195
# run coveralls coverage analysis (try to, even if some builds/tests failed)
8296
- (cd ports/unix && coveralls --root ../.. --build-root . --gcov $(which gcov) --gcov-options '\-o build-coverage/' --include py --include extmod)
8397
after_failure:

0 commit comments

Comments
 (0)
0