Skip to content

Commit d2a7cd6

Browse files
authored
Merge pull request #1475 from dhalbert/fix-broken-build-check
report status in .travis.yml correctly
2 parents 076ddfd + 4768d4f commit d2a7cd6

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

.travis.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ before_script:
8686
script:
8787
# Build mpy-cross first because other builds depend on it.
8888
- echo 'Building mpy-cross' && echo 'travis_fold:start:mpy-cross'
89-
- make -C mpy-cross -j2 ; echo $? > status
89+
- make -C mpy-cross -j2 ; S=$? ; echo $S > status ; (exit $S)
9090
- echo 'travis_fold:end:mpy-cross' && tools/print_status.py status
9191

9292
# Use unbuffered output because building all the releases can take a long time.
@@ -95,7 +95,7 @@ script:
9595
- cd ..
9696

9797
- echo 'Building unix' && echo 'travis_fold:start:unix'
98-
- (! var_search "${TRAVIS_TESTS-}" unix || (make -C ports/unix deplibs -j2 && make -C ports/unix -j2 && make -C ports/unix coverage -j2)) ; echo $? > status
98+
- (! var_search "${TRAVIS_TESTS-}" unix || (make -C ports/unix deplibs -j2 && make -C ports/unix -j2 && make -C ports/unix coverage -j2)) ; S=$? ; echo $S > status ; (exit $S)
9999
- echo 'travis_fold:end:unix' && tools/print_status.py status
100100

101101
# run tests without coverage info
@@ -104,27 +104,27 @@ script:
104104

105105
# run tests with coverage info
106106
- echo 'Test all' && echo 'travis_fold:start:test_all'
107-
- (! var_search "${TRAVIS_TESTS-}" unix || (cd tests && MICROPY_CPYTHON3=python3.5 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests -j1)) ; echo $? > status
107+
- (! var_search "${TRAVIS_TESTS-}" unix || (cd tests && MICROPY_CPYTHON3=python3.5 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests -j1)) ; S=$? ; echo $S > status ; (exit $S)
108108
- echo 'travis_fold:end:test_all' && tools/print_status.py status
109109

110110
- echo 'Test threads' && echo 'travis_fold:start:test_threads'
111-
- (! var_search "${TRAVIS_TESTS-}" unix || (cd tests && MICROPY_CPYTHON3=python3.5 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests -j1 -d thread)) ; echo $? >status
111+
- (! var_search "${TRAVIS_TESTS-}" unix || (cd tests && MICROPY_CPYTHON3=python3.5 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests -j1 -d thread)) ; S=$? ; echo $S > status ; (exit $S)
112112
- echo 'travis_fold:end:test_threads' && tools/print_status.py status
113113

114114
- echo 'Testing with native' && echo 'travis_fold:start:test_native'
115-
- (! var_search "${TRAVIS_TESTS-}" unix || (cd tests && MICROPY_CPYTHON3=python3.5 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests -j1 --emit native)) ; echo $? >status
115+
- (! var_search "${TRAVIS_TESTS-}" unix || (cd tests && MICROPY_CPYTHON3=python3.5 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests -j1 --emit native)) ; S=$? ; echo $S > status ; (exit $S)
116116
- echo 'travis_fold:end:test_native' && tools/print_status.py status
117117

118118
- (echo 'Testing with mpy' && echo 'travis_fold:start:test_mpy')
119-
- (! var_search "${TRAVIS_TESTS-}" unix || (cd tests && MICROPY_CPYTHON3=python3.5 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests -j1 --via-mpy -d basics float)) ; echo $? >status
119+
- (! var_search "${TRAVIS_TESTS-}" unix || (cd tests && MICROPY_CPYTHON3=python3.5 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests -j1 --via-mpy -d basics float)) ; S=$? ; echo $S > status ; (exit $S)
120120
- echo 'travis_fold:end:test_mpy' && tools/print_status.py status
121121

122122
- (echo 'Building docs' && echo 'travis_fold:start:build_docs')
123-
- (! var_search "${TRAVIS_TESTS-}" docs || sphinx-build -E -W -b html . _build/html) ; echo $? >status
123+
- (! var_search "${TRAVIS_TESTS-}" docs || sphinx-build -E -W -b html . _build/html) ; S=$? ; echo $S > status ; (exit $S)
124124
- echo 'travis_fold:end:build_docs' && tools/print_status.py status
125125

126126
- (echo 'Building translations' && echo 'travis_fold:start:build_translations')
127-
- (! var_search "${TRAVIS_TESTS-}" translations || make check-translate) ; echo $? >status
127+
- (! var_search "${TRAVIS_TESTS-}" translations || make check-translate) ; S=$? ; echo $S > status ; (exit $S)
128128
- echo 'travis_fold:end:build_translations' && tools/print_status.py status
129129

130130
# run coveralls coverage analysis (try to, even if some builds/tests failed)

0 commit comments

Comments
 (0)