forked from ARMmbed/mbed-os
-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
70 lines (62 loc) · 2.54 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
script:
# Check that example compiles
- sed -n '/``` c++/,/```/{/```/d; p;}' README.md > main.cpp
- PYTHONPATH=mbed-os python mbed-os/tools/make.py -t GCC_ARM -m K82F
--source=. --build=BUILD/K82F/GCC_ARM -j0
# Check that tests compile
- rm -rf main.cpp BUILD
- PYTHONPATH=mbed-os python mbed-os/tools/test.py -t GCC_ARM -m K82F
--source=. --build=BUILD/TESTS/K82F/GCC_ARM -j0
-n 'tests*'
# Run littlefs functional tests
- CFLAGS="-Wno-format" make -Clittlefs test QUIET=1
# Run littlefs functional tests with different configurations
# Note: r/w size of 64 is default in mbed
- CFLAGS="-Wno-format -DLFS_READ_SIZE=64 -DLFS_PROG_SIZE=64"
make -Clittlefs test QUIET=1
- CFLAGS="-Wno-format -DLFS_READ_SIZE=1 -DLFS_PROG_SIZE=1"
make -Clittlefs test QUIET=1
- CFLAGS="-Wno-format -DLFS_READ_SIZE=512 -DLFS_PROG_SIZE=512"
make -Clittlefs test QUIET=1
- CFLAGS="-Wno-format -DLFS_BLOCK_COUNT=1023"
make -Clittlefs test QUIET=1
- CFLAGS="-Wno-format -DLFS_LOOKAHEAD=2048"
make -Clittlefs test QUIET=1
# Self-host with littlefs-fuse for fuzz test
- CFLAGS="-Wno-format" 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 littlefs/) mount/littlefs
- cd mount/littlefs
- ls
- CFLAGS="-Wno-format" make -B test_dirs QUIET=1
install:
# Get arm-none-eabi-gcc
- sudo add-apt-repository -y ppa:terry.guo/gcc-arm-embedded
- sudo apt-get update -qq
- sudo apt-get install -qq gcc-arm-none-eabi --force-yes
# Get dependencies
- git clone https://github.com/armmbed/mbed-os.git
- git clone https://github.com/armmbed/spiflash-driver.git
# Install python dependencies
- pip install --user -r mbed-os/requirements.txt
# Install littlefs-fuse and dependencies
- sudo apt-get install libfuse-dev
- git clone https://github.com/geky/littlefs-fuse
# Check versions
- fusermount -V
- arm-none-eabi-gcc --version
- python --version
- gcc --version
before_script:
# Patch littlefs-fuse
- rm -rf littlefs-fuse/littlefs/*
- cp -r $(git ls-tree --name-only HEAD littlefs/) littlefs-fuse/littlefs
- echo '*' > littlefs-fuse/.mbedignore
# 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