Skip to content

Commit dabb8ff

Browse files
authored
Merge pull request #1448 from dhalbert/sphinx-fixes
Fix sphinx build issues; add better travis fold reporting; update aut…
2 parents 172311f + d41ed76 commit dabb8ff

File tree

4 files changed

+47
-32
lines changed

4 files changed

+47
-32
lines changed

.travis.yml

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ before_script:
7777
- sudo apt-get install -y python3-pip
7878
- pip3 install --user sh click
7979
- ([[ -z "$TRAVIS_TESTS" ]] || sudo pip install --upgrade cpp-coveralls)
80-
- (! var_search "${TRAVIS_TESTS-}" docs || pip install --user 'Sphinx<1.8.0' sphinx-rtd-theme recommonmark)
80+
- (! var_search "${TRAVIS_TESTS-}" docs || pip install --user Sphinx sphinx-rtd-theme recommonmark)
8181
- (! var_search "${TRAVIS_TESTS-}" translations || pip3 install --user polib)
8282

8383
# report some good version numbers to the build
@@ -88,47 +88,47 @@ before_script:
8888

8989
script:
9090
# Build mpy-cross first because other builds depend on it.
91-
- echo 'Building mpy-cross' && echo -en 'travis_fold:start:mpy-cross\\r'
92-
- make -C mpy-cross -j2
93-
- echo -en 'travis_fold:end:mpy-cross\\r'
91+
- echo 'Building mpy-cross' && echo 'travis_fold:start:mpy-cross'
92+
- make -C mpy-cross -j2 ; echo $? > status
93+
- echo 'travis_fold:end:mpy-cross' && tools/print_status.py status
9494

9595
# Use unbuffered output because building all the releases can take a long time.
9696
# Travis will cancel the job if it sees no output for >10 minutes.
9797
- cd tools && python3 -u build_release_files.py
9898
- cd ..
9999

100-
- echo 'Building unix' && echo -en 'travis_fold:start:unix\\r'
101-
- (! var_search "${TRAVIS_TESTS-}" unix || (make -C ports/unix deplibs -j2 && make -C ports/unix -j2 && make -C ports/unix coverage -j2))
102-
- echo -en 'travis_fold:end:unix\\r'
100+
- echo 'Building unix' && echo 'travis_fold:start:unix'
101+
- (! var_search "${TRAVIS_TESTS-}" unix || (make -C ports/unix deplibs -j2 && make -C ports/unix -j2 && make -C ports/unix coverage -j2)) ; echo $? > status
102+
- echo 'travis_fold:end:unix' && tools/print_status.py status
103103

104104
# run tests without coverage info
105105
#- (cd tests && MICROPY_CPYTHON3=python3.4 ./run-tests -j1)
106106
#- (cd tests && MICROPY_CPYTHON3=python3.4 ./run-tests -j1 --emit native)
107107

108108
# run tests with coverage info
109-
- echo 'Test all' && echo -en 'travis_fold:start:test_all\\r'
110-
- (! var_search "${TRAVIS_TESTS-}" unix || (cd tests && MICROPY_CPYTHON3=python3.5 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests -j1))
111-
- echo -en 'travis_fold:end:test_all\\r'
109+
- echo 'Test all' && echo 'travis_fold:start:test_all'
110+
- (! var_search "${TRAVIS_TESTS-}" unix || (cd tests && MICROPY_CPYTHON3=python3.5 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests -j1)) ; echo $? > status
111+
- echo 'travis_fold:end:test_all' && tools/print_status.py status
112112

113-
- echo 'Test threads' && echo -en 'travis_fold:start:test_threads\\r'
114-
- (! var_search "${TRAVIS_TESTS-}" unix || (cd tests && MICROPY_CPYTHON3=python3.5 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests -j1 -d thread))
115-
- echo -en 'travis_fold:end:test_threads\\r'
113+
- echo 'Test threads' && echo 'travis_fold:start:test_threads'
114+
- (! var_search "${TRAVIS_TESTS-}" unix || (cd tests && MICROPY_CPYTHON3=python3.5 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests -j1 -d thread)) ; echo $? >status
115+
- echo 'travis_fold:end:test_threads' && tools/print_status.py status
116116

117-
- echo 'Testing with native' && echo -en 'travis_fold:start:test_native\\r'
118-
- (! var_search "${TRAVIS_TESTS-}" unix || (cd tests && MICROPY_CPYTHON3=python3.5 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests -j1 --emit native))
119-
- echo -en 'travis_fold:end:test_native\\r'
117+
- echo 'Testing with native' && echo 'travis_fold:start:test_native'
118+
- (! var_search "${TRAVIS_TESTS-}" unix || (cd tests && MICROPY_CPYTHON3=python3.5 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests -j1 --emit native)) ; echo $? >status
119+
- echo 'travis_fold:end:test_native' && tools/print_status.py status
120120

121-
- (echo 'Testing with mpy' && echo -en 'travis_fold:start:test_mpy\\r')
122-
- (! 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))
123-
- echo -en 'travis_fold:end:test_mpy\\r'
121+
- (echo 'Testing with mpy' && echo 'travis_fold:start:test_mpy')
122+
- (! 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
123+
- echo 'travis_fold:end:test_mpy' && tools/print_status.py status
124124

125-
- (echo 'Building docs' && echo -en 'travis_fold:start:build_docs\\r')
126-
- (! var_search "${TRAVIS_TESTS-}" docs || sphinx-build -E -W -b html . _build/html)
127-
- echo -en 'travis_fold:end:build_docs\\r'
125+
- (echo 'Building docs' && echo 'travis_fold:start:build_docs')
126+
- (! var_search "${TRAVIS_TESTS-}" docs || sphinx-build -E -W -b html . _build/html) ; echo $? >status
127+
- echo 'travis_fold:end:build_docs' && tools/print_status.py status
128128

129-
- (echo 'Building translations' && echo -en 'travis_fold:start:build_translations\\r')
130-
- (! var_search "${TRAVIS_TESTS-}" translations || make check-translate)
131-
- echo -en 'travis_fold:end:build_translations\\r'
129+
- (echo 'Building translations' && echo 'travis_fold:start:build_translations')
130+
- (! var_search "${TRAVIS_TESTS-}" translations || make check-translate) ; echo $? >status
131+
- echo 'travis_fold:end:build_translations' && tools/print_status.py status
132132

133133
# run coveralls coverage analysis (try to, even if some builds/tests failed)
134134
#- (cd ports/unix && coveralls --root ../.. --build-root . --gcov $(which gcov) --gcov-options '\-o build-coverage/' --include py --include extmod)

conf.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@
284284
# author, documentclass [howto, manual, or own class]).
285285
latex_documents = [
286286
(master_doc, 'CircuitPython.tex', 'CircuitPython Documentation',
287-
'Damien P. George, Paul Sokolovsky, and contributors', 'manual'),
287+
'CircuitPython Contributors', 'manual'),
288288
]
289289

290290
# The name of an image file (relative to this directory) to place at the top of
@@ -314,7 +314,7 @@
314314
# (source start file, name, description, authors, manual section).
315315
man_pages = [
316316
('index', 'CircuitPython', 'CircuitPython Documentation',
317-
['Damien P. George, Paul Sokolovsky, and contributors'], 1),
317+
['CircuitPython contributors'], 1),
318318
]
319319

320320
# If true, show URL addresses after external links.
@@ -328,7 +328,7 @@
328328
# dir menu entry, description, category)
329329
texinfo_documents = [
330330
(master_doc, 'CircuitPython', 'CircuitPython Documentation',
331-
'Damien P. George, Paul Sokolovsky, and contributors', 'CircuitPython', 'One line description of project.',
331+
'CircuitPython contributors', 'CircuitPython', 'Python for Microcontrollers.',
332332
'Miscellaneous'),
333333
]
334334

ports/nrf/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@ the following links:
3636
> **NOTE**: These board specific readmes may be more up to date than the
3737
generic board-neutral documentation further down.
3838

39-
* Adafruit [Feather nRF52](boards/feather_nrf52832/README.md): 512KB Flash, 64KB SRAM
40-
* Adafruit [Feather nRF52840](boards/feather_nrf52840_express/README.md): 1MB Flash, 256KB SRAM
41-
* Nordic PCA10056 see [Feather nRF52840](boards/pca10056/README.md)
42-
* MakerDiary NRF52840 MDK see [its README](boards/makerdiary_nrf52840_mdk/README.md)
39+
* Adafruit Feather nRF52: boards/feather_nrf52832/README.md: 512KB Flash, 64KB SRAM
40+
* Adafruit Feather nRF52840: boards/feather_nrf52840_express/README.md: 1MB Flash, 256KB SRAM
41+
* Nordic PCA10056 (uses nRF52840): boards/pca10056/README.md
42+
* MakerDiary NRF52840 MDK: boards/makerdiary_nrf52840_mdk/README.md
4343

4444
For all other board targets, see the generic notes below.
4545

tools/print_status.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/usr/bin/env python3
2+
3+
import sys
4+
if len(sys.argv) != 2:
5+
print("""\
6+
Usage: print_status.py STATUS_FILENAME
7+
STATUS_FILENAME contains one line with an integer status."""
8+
)
9+
sys.exit(1)
10+
with open(sys.argv[1], 'r') as status_in:
11+
status = int(status_in.readline())
12+
13+
print('{} with status {}'.format(
14+
"\033[32msucceeded\033[0m" if status == 0 else "\033[31mfailed\033[0m",
15+
status))

0 commit comments

Comments
 (0)