|
1 | 1 | python:
|
2 | 2 | - "2.7"
|
| 3 | + |
3 | 4 | script:
|
4 |
| - - mkdir BUILD |
5 |
| -# Assert that the Doxygen build produced no warnings. |
6 |
| -# The strange command below asserts that the Doxygen command had an |
7 |
| -# output of zero length |
| 5 | + # Assert that the Doxygen build produced no warnings. |
| 6 | + # The strange command below asserts that the Doxygen command had an |
| 7 | + # output of zero length |
8 | 8 | - |
|
9 | 9 | doxygen doxyfile_options 2>&1 | tee BUILD/doxygen.out && [ ! -s BUILD/doxygen.out ]
|
10 |
| -# Assert that all binary libraries are named correctly |
11 |
| -# The strange command below asserts that there are exactly 0 libraries that do |
12 |
| -# not start with lib |
| 10 | + # Assert that all binary libraries are named correctly |
| 11 | + # The strange command below asserts that there are exactly 0 libraries that do |
| 12 | + # not start with lib |
13 | 13 | - |
|
14 | 14 | find "(" -name "*.a" -or -name "*.ar" ")" -and -not -name "lib*" | tee BUILD/badlibs | sed -e "s/^/Bad library name found: /" && [ ! -s BUILD/badlibs ]
|
15 |
| -# Assert that all assebler files are named correctly |
16 |
| -# The strange command below asserts that there are exactly 0 libraries that do |
17 |
| -# end with .s |
| 15 | + # Assert that all assebler files are named correctly |
| 16 | + # The strange command below asserts that there are exactly 0 libraries that do |
| 17 | + # end with .s |
18 | 18 | - |
|
19 | 19 | find -name "*.s" | tee BUILD/badasm | sed -e "s/^/Bad Assembler file name found: /" && [ ! -s BUILD/badasm ]
|
20 |
| - - make -C events/equeue test clean |
| 20 | + # Run local testing on tools |
| 21 | + # Note: These take ~40 minutes to run |
21 | 22 | - PYTHONPATH=. coverage run -a -m pytest tools/test
|
22 | 23 | - python2 tools/test/pylint.py
|
23 |
| - - coverage run -a tools/project.py -S |
24 |
| - - python2 tools/build_travis.py |
| 24 | + - coverage run -a tools/project.py -S | sed -n '/^Total/p' |
| 25 | + - python2 -u tools/build_travis.py | sed -n '/^Executing/p' |
25 | 26 | - coverage html
|
| 27 | + # Run local event queue tests |
| 28 | + - make -C events/equeue test |
| 29 | + # Run local littlefs tests |
| 30 | + - CFLAGS="-Wno-format" make -Cfeatures/filesystem/littlefs/littlefs test QUIET=1 |
| 31 | + # Run local littlefs tests with set of variations |
| 32 | + - CFLAGS="-Wno-format -DLFS_READ_SIZE=64 -DLFS_PROG_SIZE=64" make -Cfeatures/filesystem/littlefs/littlefs test QUIET=1 |
| 33 | + - CFLAGS="-Wno-format -DLFS_READ_SIZE=1 -DLFS_PROG_SIZE=1" make -Cfeatures/filesystem/littlefs/littlefs test QUIET=1 |
| 34 | + - CFLAGS="-Wno-format -DLFS_READ_SIZE=512 -DLFS_PROG_SIZE=512" make -Cfeatures/filesystem/littlefs/littlefs test QUIET=1 |
| 35 | + - CFLAGS="-Wno-format -DLFS_BLOCK_COUNT=1023" make -Cfeatures/filesystem/littlefs/littlefs test QUIET=1 |
| 36 | + - CFLAGS="-Wno-format -DLFS_LOOKAHEAD=2048" make -Cfeatures/filesystem/littlefs/littlefs test QUIET=1 |
| 37 | + # Self-hosting littlefs fuzz test with littlefs-fuse |
| 38 | + - make -C littlefs-fuse |
| 39 | + - littlefs-fuse/lfs --format /dev/loop0 |
| 40 | + - littlefs-fuse/lfs /dev/loop0 MOUNT |
| 41 | + - ls MOUNT |
| 42 | + - mkdir MOUNT/littlefs |
| 43 | + - cp -r $(git ls-tree --name-only HEAD features/filesystem/littlefs/littlefs/) MOUNT/littlefs |
| 44 | + - ls MOUNT/littlefs |
| 45 | + - CFLAGS="-Wno-format" make -CMOUNT/littlefs -B test_dirs QUIET=1 |
| 46 | + |
26 | 47 | after_success:
|
| 48 | + # Coverage for tools |
27 | 49 | - coveralls
|
| 50 | + |
28 | 51 | before_install:
|
| 52 | + # Setup ppa to make sure arm-none-eabi-gcc is correct version |
29 | 53 | - sudo add-apt-repository -y ppa:team-gcc-arm-embedded/ppa
|
30 | 54 | - sudo add-apt-repository -y ppa:libreoffice/libreoffice-4-2
|
31 | 55 | - sudo apt-get update -qq
|
32 |
| - - sudo apt-get install -qq gcc-arm-embedded doxygen --force-yes |
33 |
| - # Print versions we use |
34 |
| - - arm-none-eabi-gcc --version |
35 |
| - - python --version |
36 |
| - - doxygen --version |
| 56 | + |
37 | 57 | install:
|
| 58 | + # Install dependencies |
| 59 | + - sudo apt-get install -qq gcc-arm-embedded doxygen libfuse-dev |
38 | 60 | - pip install --user -r requirements.txt
|
39 | 61 | - pip install --user pytest
|
40 | 62 | - pip install --user pylint
|
41 | 63 | - pip install --user hypothesis
|
42 | 64 | - pip install --user mock
|
43 | 65 | - pip install --user coverage
|
44 | 66 | - pip install --user coveralls
|
| 67 | + # Print versions we use |
| 68 | + - arm-none-eabi-gcc --version |
| 69 | + - python --version |
| 70 | + - doxygen --version |
| 71 | + - gcc --version |
| 72 | + - fusermount --version |
| 73 | + |
| 74 | +before_script: |
| 75 | + # Create BUILD directory for tests |
| 76 | + - mkdir BUILD |
| 77 | + # Make sure pipefail |
| 78 | + - set -o pipefail |
| 79 | + # Setup and patch littlefs-fuse |
| 80 | + - git clone https://github.com/geky/littlefs-fuse |
| 81 | + - echo '*' > littlefs-fuse/.mbedignore |
| 82 | + - rm -rf littlefs-fuse/littlefs/* |
| 83 | + - cp -r $(git ls-tree --name-only HEAD features/filesystem/littlefs/littlefs/) littlefs-fuse/littlefs |
| 84 | + # Create file-backed disk |
| 85 | + - mkdir MOUNT |
| 86 | + - sudo chmod a+rw /dev/loop0 |
| 87 | + - dd if=/dev/zero bs=512 count=2048 of=DISK |
| 88 | + - losetup /dev/loop0 DISK |
0 commit comments