summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2019-12-12 17:45:02 +1100
committerDamien George <damien.p.george@gmail.com>2019-12-12 20:15:28 +1100
commitac769672fd0b94b237fac6e0bfb411fa92f846cc (patch)
tree9569b7d6eb1983b49a2265ecb800c7b6afdcd9be
parent60c3c22a0dcd5aba9e65ae4c3890889f42a18567 (diff)
travis: Add tests for building and importing dynamic native modules.
-rw-r--r--.travis.yml14
1 files changed, 14 insertions, 0 deletions
diff --git a/.travis.yml b/.travis.yml
index 0f57bc3fe..fef8bbbcf 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -62,7 +62,10 @@ jobs:
- stage: test
env: NAME="unix coverage build and tests"
install:
+ - sudo apt-get install python3-pip
- sudo pip install cpp-coveralls
+ - sudo pip3 install setuptools
+ - sudo pip3 install pyelftools
- gcc --version
- python3 --version
script:
@@ -78,6 +81,17 @@ jobs:
- (cd tests && MICROPY_CPYTHON3=python3 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests --via-mpy --emit native -d basics float micropython)
# test when input script comes from stdin
- cat tests/basics/0prelim.py | ports/unix/micropython_coverage | grep -q 'abc'
+ # test building native mpy modules
+ - make -C examples/natmod/features1 ARCH=x64
+ - make -C examples/natmod/features2 ARCH=x64
+ - make -C examples/natmod/btree ARCH=x64
+ - make -C examples/natmod/framebuf ARCH=x64
+ - make -C examples/natmod/uheapq ARCH=x64
+ - make -C examples/natmod/ure ARCH=x64
+ - make -C examples/natmod/uzlib ARCH=x64
+ # test importing .mpy generated by mpy_ld.py
+ - MICROPYPATH=examples/natmod/features2 ./ports/unix/micropython_coverage -m features2
+ - (cd tests && ./run-natmodtests.py extmod/{btree*,framebuf*,uheapq*,ure*,uzlib*}.py)
# run coveralls coverage analysis (try to, even if some builds/tests failed)
- (cd ports/unix && coveralls --root ../.. --build-root . --gcov $(which gcov) --gcov-options '\-o build-coverage/' --include py --include extmod)
after_failure: