Skip to content

Commit ea0fee0

Browse files
committed
littlefs: Integrated littlefs's .travis.yml into mbed OS
Also cleaned up the central .travis.yml to better support similar local testing in Travis CI
1 parent 4adf75c commit ea0fee0

File tree

1 file changed

+62
-18
lines changed

1 file changed

+62
-18
lines changed

.travis.yml

Lines changed: 62 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,88 @@
11
python:
22
- "2.7"
3+
34
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
88
- |
99
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
1313
- |
1414
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
1818
- |
1919
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
2122
- PYTHONPATH=. coverage run -a -m pytest tools/test
2223
- 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'
2526
- 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+
2647
after_success:
48+
# Coverage for tools
2749
- coveralls
50+
2851
before_install:
52+
# Setup ppa to make sure arm-none-eabi-gcc is correct version
2953
- sudo add-apt-repository -y ppa:team-gcc-arm-embedded/ppa
3054
- sudo add-apt-repository -y ppa:libreoffice/libreoffice-4-2
3155
- 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+
3757
install:
58+
# Install dependencies
59+
- sudo apt-get install -qq gcc-arm-embedded doxygen libfuse-dev
3860
- pip install --user -r requirements.txt
3961
- pip install --user pytest
4062
- pip install --user pylint
4163
- pip install --user hypothesis
4264
- pip install --user mock
4365
- pip install --user coverage
4466
- 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

Comments
 (0)