Skip to content

Commit 0b12cc8

Browse files
committed
.travis.yml,ports/unix/Makefile: Add coverage test for script via stdin.
1 parent 923ebe7 commit 0b12cc8

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

.travis.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ script:
5858
- (cd tests && MICROPY_CPYTHON3=python3.4 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests --emit native)
5959
- (cd tests && MICROPY_CPYTHON3=python3.4 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests --via-mpy -d basics float)
6060

61+
# test when input script comes from stdin
62+
- cat tests/basics/0prelim.py | ports/unix/micropython_coverage | grep -q 'abc'
63+
6164
# run coveralls coverage analysis (try to, even if some builds/tests failed)
6265
- (cd ports/unix && coveralls --root ../.. --build-root . --gcov $(which gcov) --gcov-options '\-o build-coverage/' --include py --include extmod)
6366

ports/unix/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,7 @@ coverage_test: coverage
258258
cd $(TOP)/tests && MICROPY_MICROPYTHON=../$(DIRNAME)/micropython_coverage ./run-tests -d thread
259259
cd $(TOP)/tests && MICROPY_MICROPYTHON=../$(DIRNAME)/micropython_coverage ./run-tests --emit native
260260
cd $(TOP)/tests && MICROPY_MICROPYTHON=../$(DIRNAME)/micropython_coverage ./run-tests --via-mpy -d basics float
261+
cat $(TOP)/tests/basics/0prelim.py | ./micropython_coverage | grep -q 'abc'
261262
gcov -o build-coverage/py $(TOP)/py/*.c
262263
gcov -o build-coverage/extmod $(TOP)/extmod/*.c
263264

0 commit comments

Comments
 (0)