mirror of https://github.com/ARMmbed/mbed-os.git
littlefs: Integrated littlefs's .travis.yml into mbed OS
Also cleaned up the central .travis.yml to better support similar local testing in Travis CIpull/5538/head
parent
4adf75c9aa
commit
ea0fee0968
80
.travis.yml
80
.travis.yml
|
|
@ -1,40 +1,62 @@
|
||||||
python:
|
python:
|
||||||
- "2.7"
|
- "2.7"
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- mkdir BUILD
|
# Assert that the Doxygen build produced no warnings.
|
||||||
# Assert that the Doxygen build produced no warnings.
|
# The strange command below asserts that the Doxygen command had an
|
||||||
# The strange command below asserts that the Doxygen command had an
|
# output of zero length
|
||||||
# output of zero length
|
|
||||||
- |
|
- |
|
||||||
doxygen doxyfile_options 2>&1 | tee BUILD/doxygen.out && [ ! -s BUILD/doxygen.out ]
|
doxygen doxyfile_options 2>&1 | tee BUILD/doxygen.out && [ ! -s BUILD/doxygen.out ]
|
||||||
# Assert that all binary libraries are named correctly
|
# Assert that all binary libraries are named correctly
|
||||||
# The strange command below asserts that there are exactly 0 libraries that do
|
# The strange command below asserts that there are exactly 0 libraries that do
|
||||||
# not start with lib
|
# not start with lib
|
||||||
- |
|
- |
|
||||||
find "(" -name "*.a" -or -name "*.ar" ")" -and -not -name "lib*" | tee BUILD/badlibs | sed -e "s/^/Bad library name found: /" && [ ! -s BUILD/badlibs ]
|
find "(" -name "*.a" -or -name "*.ar" ")" -and -not -name "lib*" | tee BUILD/badlibs | sed -e "s/^/Bad library name found: /" && [ ! -s BUILD/badlibs ]
|
||||||
# Assert that all assebler files are named correctly
|
# Assert that all assebler files are named correctly
|
||||||
# The strange command below asserts that there are exactly 0 libraries that do
|
# The strange command below asserts that there are exactly 0 libraries that do
|
||||||
# end with .s
|
# end with .s
|
||||||
- |
|
- |
|
||||||
find -name "*.s" | tee BUILD/badasm | sed -e "s/^/Bad Assembler file name found: /" && [ ! -s BUILD/badasm ]
|
find -name "*.s" | tee BUILD/badasm | sed -e "s/^/Bad Assembler file name found: /" && [ ! -s BUILD/badasm ]
|
||||||
- make -C events/equeue test clean
|
# Run local testing on tools
|
||||||
|
# Note: These take ~40 minutes to run
|
||||||
- PYTHONPATH=. coverage run -a -m pytest tools/test
|
- PYTHONPATH=. coverage run -a -m pytest tools/test
|
||||||
- python2 tools/test/pylint.py
|
- python2 tools/test/pylint.py
|
||||||
- coverage run -a tools/project.py -S
|
- coverage run -a tools/project.py -S | sed -n '/^Total/p'
|
||||||
- python2 tools/build_travis.py
|
- python2 -u tools/build_travis.py | sed -n '/^Executing/p'
|
||||||
- coverage html
|
- coverage html
|
||||||
|
# Run local event queue tests
|
||||||
|
- make -C events/equeue test
|
||||||
|
# Run local littlefs tests
|
||||||
|
- CFLAGS="-Wno-format" make -Cfeatures/filesystem/littlefs/littlefs test QUIET=1
|
||||||
|
# Run local littlefs tests with set of variations
|
||||||
|
- CFLAGS="-Wno-format -DLFS_READ_SIZE=64 -DLFS_PROG_SIZE=64" make -Cfeatures/filesystem/littlefs/littlefs test QUIET=1
|
||||||
|
- CFLAGS="-Wno-format -DLFS_READ_SIZE=1 -DLFS_PROG_SIZE=1" make -Cfeatures/filesystem/littlefs/littlefs test QUIET=1
|
||||||
|
- CFLAGS="-Wno-format -DLFS_READ_SIZE=512 -DLFS_PROG_SIZE=512" make -Cfeatures/filesystem/littlefs/littlefs test QUIET=1
|
||||||
|
- CFLAGS="-Wno-format -DLFS_BLOCK_COUNT=1023" make -Cfeatures/filesystem/littlefs/littlefs test QUIET=1
|
||||||
|
- CFLAGS="-Wno-format -DLFS_LOOKAHEAD=2048" make -Cfeatures/filesystem/littlefs/littlefs test QUIET=1
|
||||||
|
# Self-hosting littlefs fuzz test with littlefs-fuse
|
||||||
|
- make -C littlefs-fuse
|
||||||
|
- littlefs-fuse/lfs --format /dev/loop0
|
||||||
|
- littlefs-fuse/lfs /dev/loop0 MOUNT
|
||||||
|
- ls MOUNT
|
||||||
|
- mkdir MOUNT/littlefs
|
||||||
|
- cp -r $(git ls-tree --name-only HEAD features/filesystem/littlefs/littlefs/) MOUNT/littlefs
|
||||||
|
- ls MOUNT/littlefs
|
||||||
|
- CFLAGS="-Wno-format" make -CMOUNT/littlefs -B test_dirs QUIET=1
|
||||||
|
|
||||||
after_success:
|
after_success:
|
||||||
|
# Coverage for tools
|
||||||
- coveralls
|
- coveralls
|
||||||
|
|
||||||
before_install:
|
before_install:
|
||||||
|
# Setup ppa to make sure arm-none-eabi-gcc is correct version
|
||||||
- sudo add-apt-repository -y ppa:team-gcc-arm-embedded/ppa
|
- sudo add-apt-repository -y ppa:team-gcc-arm-embedded/ppa
|
||||||
- sudo add-apt-repository -y ppa:libreoffice/libreoffice-4-2
|
- sudo add-apt-repository -y ppa:libreoffice/libreoffice-4-2
|
||||||
- sudo apt-get update -qq
|
- sudo apt-get update -qq
|
||||||
- sudo apt-get install -qq gcc-arm-embedded doxygen --force-yes
|
|
||||||
# Print versions we use
|
|
||||||
- arm-none-eabi-gcc --version
|
|
||||||
- python --version
|
|
||||||
- doxygen --version
|
|
||||||
install:
|
install:
|
||||||
|
# Install dependencies
|
||||||
|
- sudo apt-get install -qq gcc-arm-embedded doxygen libfuse-dev
|
||||||
- pip install --user -r requirements.txt
|
- pip install --user -r requirements.txt
|
||||||
- pip install --user pytest
|
- pip install --user pytest
|
||||||
- pip install --user pylint
|
- pip install --user pylint
|
||||||
|
|
@ -42,3 +64,25 @@ install:
|
||||||
- pip install --user mock
|
- pip install --user mock
|
||||||
- pip install --user coverage
|
- pip install --user coverage
|
||||||
- pip install --user coveralls
|
- pip install --user coveralls
|
||||||
|
# Print versions we use
|
||||||
|
- arm-none-eabi-gcc --version
|
||||||
|
- python --version
|
||||||
|
- doxygen --version
|
||||||
|
- gcc --version
|
||||||
|
- fusermount --version
|
||||||
|
|
||||||
|
before_script:
|
||||||
|
# Create BUILD directory for tests
|
||||||
|
- mkdir BUILD
|
||||||
|
# Make sure pipefail
|
||||||
|
- set -o pipefail
|
||||||
|
# Setup and patch littlefs-fuse
|
||||||
|
- git clone https://github.com/geky/littlefs-fuse
|
||||||
|
- echo '*' > littlefs-fuse/.mbedignore
|
||||||
|
- rm -rf littlefs-fuse/littlefs/*
|
||||||
|
- cp -r $(git ls-tree --name-only HEAD features/filesystem/littlefs/littlefs/) littlefs-fuse/littlefs
|
||||||
|
# Create file-backed disk
|
||||||
|
- mkdir MOUNT
|
||||||
|
- sudo chmod a+rw /dev/loop0
|
||||||
|
- dd if=/dev/zero bs=512 count=2048 of=DISK
|
||||||
|
- losetup /dev/loop0 DISK
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue