Skip to content

Commit c390e89

Browse files
committed
Added self-hosting fuzz test using littlefs-fuse
1 parent 9408f2b commit c390e89

File tree

1 file changed

+33
-5
lines changed

1 file changed

+33
-5
lines changed

.travis.yml

Lines changed: 33 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
python:
2-
- "2.7"
3-
41
script:
52
# Check that example compiles
3+
- sed -n '/``` c++/,/```/{/```/d; p;}' README.md > main.cpp
64
- PYTHONPATH=mbed-os python mbed-os/tools/make.py -t GCC_ARM -m K82F
75
--source=. --build=BUILD/K82F/GCC_ARM -j0
86

@@ -28,6 +26,19 @@ script:
2826
- CFLAGS="-Wno-error=format -DLFS_LOOKAHEAD=2047"
2927
make -Clittlefs test
3028

29+
# Self-host with littlefs-fuse for fuzz test
30+
- make -C littlefs-fuse
31+
32+
- littlefs-fuse/lfs --format /dev/loop0
33+
- littlefs-fuse/lfs /dev/loop0 mount
34+
35+
- ls mount
36+
- mkdir mount/littlefs
37+
- cp -r $(git ls-tree --name-only HEAD littlefs/) mount/littlefs
38+
- cd mount/littlefs
39+
- ls
40+
- CFLAGS="-Wno-error=format" make -B test_dirs
41+
3142
install:
3243
# Get arm-none-eabi-gcc
3344
- sudo add-apt-repository -y ppa:terry.guo/gcc-arm-embedded
@@ -38,5 +49,22 @@ install:
3849
- git clone https://github.com/armmbed/spiflash-driver.git
3950
# Install python dependencies
4051
- pip install --user -r mbed-os/requirements.txt
41-
# Create main file for example
42-
- sed -n '/``` c++/,/```/{/```/d; p;}' README.md > main.cpp
52+
# Install littlefs-fuse and dependencies
53+
- sudo apt-get install libfuse-dev
54+
- git clone https://github.com/geky/littlefs-fuse
55+
# Check versions
56+
- fusermount -V
57+
- arm-none-eabi-gcc --version
58+
- python --version
59+
- gcc --version
60+
61+
before_script:
62+
# Patch littlefs-fuse
63+
- rm -rf littlefs-fuse/littlefs/*
64+
- cp -r $(git ls-tree --name-only HEAD littlefs/) littlefs-fuse/littlefs
65+
- echo '*' > littlefs-fuse/.mbedignore
66+
# Create file-backed disk
67+
- mkdir mount
68+
- sudo chmod a+rw /dev/loop0
69+
- dd if=/dev/zero bs=512 count=2048 of=disk
70+
- losetup /dev/loop0 disk

0 commit comments

Comments
 (0)