.travis.yml 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. script:
  2. # make sure example can at least compile
  3. - sed -n '/``` c/,/```/{/```/d; p;}' README.md > test.c &&
  4. CFLAGS='
  5. -Duser_provided_block_device_read=NULL
  6. -Duser_provided_block_device_prog=NULL
  7. -Duser_provided_block_device_erase=NULL
  8. -Duser_provided_block_device_sync=NULL
  9. -include stdio.h -Werror' make all size
  10. # run tests
  11. - make test
  12. # run tests with a few different configurations
  13. - CFLAGS="-DLFS_READ_SIZE=1 -DLFS_PROG_SIZE=1" make test
  14. - CFLAGS="-DLFS_READ_SIZE=512 -DLFS_PROG_SIZE=512" make test
  15. - CFLAGS="-DLFS_BLOCK_COUNT=1023" make test
  16. - CFLAGS="-DLFS_LOOKAHEAD=2047" make test
  17. # self-host with littlefs-fuse for fuzz test
  18. - make -C littlefs-fuse
  19. - littlefs-fuse/lfs --format /dev/loop0
  20. - littlefs-fuse/lfs /dev/loop0 mount
  21. - ls mount
  22. - mkdir mount/littlefs
  23. - cp -r $(git ls-tree --name-only HEAD) mount/littlefs
  24. - cd mount/littlefs
  25. - ls
  26. - make -B test_dirs
  27. before_install:
  28. - fusermount -V
  29. - gcc --version
  30. install:
  31. - sudo apt-get install libfuse-dev
  32. - git clone --depth 1 https://github.com/geky/littlefs-fuse
  33. before_script:
  34. - rm -rf littlefs-fuse/littlefs/*
  35. - cp -r $(git ls-tree --name-only HEAD) littlefs-fuse/littlefs
  36. - mkdir mount
  37. - sudo chmod a+rw /dev/loop0
  38. - dd if=/dev/zero bs=512 count=2048 of=disk
  39. - losetup /dev/loop0 disk