Lines Matching +full:- +full:duser_provided_block_device_erase

4     - CFLAGS=-Werror
5 - MAKEFLAGS=-j
11 - $HOME/.cache/apt
14 _: &install-common
16 - sudo apt-get install python3 python3-pip
17 - sudo pip3 install toml
18 # setup a ram-backed disk to speed up reentrant tests
19 - mkdir disks
20 - sudo mount -t tmpfs -o size=100m tmpfs disks
21 - export TFLAGS="$TFLAGS --disk=disks/disk"
24 _: &test-example
26 - sed -n '/``` c/,/```/{/```/d; p}' README.md > test.c &&
28 -Duser_provided_block_device_read=NULL
29 -Duser_provided_block_device_prog=NULL
30 -Duser_provided_block_device_erase=NULL
31 -Duser_provided_block_device_sync=NULL
32 -include stdio.h"
34 _: &test-default
36 - make test TFLAGS+="-nrk"
37 # common real-life geometries
38 _: &test-nor
40 - make test TFLAGS+="-nrk -DLFS_READ_SIZE=1 -DLFS_BLOCK_SIZE=4096"
41 _: &test-emmc
43 - make test TFLAGS+="-nrk -DLFS_READ_SIZE=512 -DLFS_BLOCK_SIZE=512"
44 _: &test-nand
46 - make test TFLAGS+="-nrk -DLFS_READ_SIZE=4096 -DLFS_BLOCK_SIZE=\(32*1024\)"
48 _: &test-no-intrinsics
49 - make test TFLAGS+="-nrk -DLFS_NO_INTRINSICS"
50 _: &test-no-inline
51 - make test TFLAGS+="-nrk -DLFS_INLINE_MAX=0"
52 _: &test-byte-writes
53 - make test TFLAGS+="-nrk -DLFS_READ_SIZE=1 -DLFS_CACHE_SIZE=1"
54 _: &test-block-cycles
55 - make test TFLAGS+="-nrk -DLFS_BLOCK_CYCLES=1"
56 _: &test-odd-block-count
57 - make test TFLAGS+="-nrk -DLFS_BLOCK_COUNT=1023 -DLFS_LOOKAHEAD_SIZE=256"
58 _: &test-odd-block-size
59 - make test TFLAGS+="-nrk -DLFS_READ_SIZE=11 -DLFS_BLOCK_SIZE=704"
62 _: &report-size
64 - make -j1 clean size
66 CFLAGS+="-DLFS_NO_ASSERT -DLFS_NO_DEBUG -DLFS_NO_WARN -DLFS_NO_ERROR"
69 - |
70 if [ "$TRAVIS_TEST_RESULT" -eq 0 ]
72 CURR=$(tail -n1 sizes | awk '{print $1}')
73 … PREV=$(curl -u "$GEKY_BOT_STATUSES" https://api.github.com/repos/$TRAVIS_REPO_SLUG/status/master \
74 | jq -re "select(.sha != \"$TRAVIS_COMMIT\")
76 | capture(\"code size is (?<size>[0-9]+)\").size" \
80 if [ "$PREV" -ne 0 ]
82 STATUS="$STATUS ($(python -c "print '%+.2f' % (100*($CURR-$PREV)/$PREV.0)")%)"
88 - name: test
89 - name: deploy
95 - &x86
98 - NAME=littlefs-x86
99 install: *install-common
100 script: [*test-example, *report-size]
101 - {<<: *x86, script: [*test-default, *report-size]}
102 - {<<: *x86, script: [*test-nor, *report-size]}
103 - {<<: *x86, script: [*test-emmc, *report-size]}
104 - {<<: *x86, script: [*test-nand, *report-size]}
105 - {<<: *x86, script: [*test-no-intrinsics, *report-size]}
106 - {<<: *x86, script: [*test-no-inline, *report-size]}
107 - {<<: *x86, script: [*test-byte-writes, *report-size]}
108 - {<<: *x86, script: [*test-block-cycles, *report-size]}
109 - {<<: *x86, script: [*test-odd-block-count, *report-size]}
110 - {<<: *x86, script: [*test-odd-block-size, *report-size]}
112 # cross-compile with ARM (thumb mode)
113 - &arm
116 - NAME=littlefs-arm
117 - CC="arm-linux-gnueabi-gcc --static -mthumb"
118 - TFLAGS="$TFLAGS --exec=qemu-arm"
120 - *install-common
121 - sudo apt-get install
122 gcc-arm-linux-gnueabi
123 libc6-dev-armel-cross
124 qemu-user
125 - arm-linux-gnueabi-gcc --version
126 - qemu-arm -version
127 script: [*test-example, *report-size]
128 - {<<: *arm, script: [*test-default, *report-size]}
129 - {<<: *arm, script: [*test-nor, *report-size]}
130 - {<<: *arm, script: [*test-emmc, *report-size]}
131 - {<<: *arm, script: [*test-nand, *report-size]}
132 - {<<: *arm, script: [*test-no-intrinsics, *report-size]}
133 - {<<: *arm, script: [*test-no-inline, *report-size]}
134 # it just takes way to long to run byte-level writes in qemu,
136 #- {<<: *arm, script: [*test-byte-writes, *report-size]}
137 - {<<: *arm, script: [*test-block-cycles, *report-size]}
138 - {<<: *arm, script: [*test-odd-block-count, *report-size]}
139 - {<<: *arm, script: [*test-odd-block-size, *report-size]}
141 # cross-compile with MIPS
142 - &mips
145 - NAME=littlefs-mips
146 - CC="mips-linux-gnu-gcc --static"
147 - TFLAGS="$TFLAGS --exec=qemu-mips"
149 - *install-common
150 - sudo apt-get install
151 gcc-mips-linux-gnu
152 libc6-dev-mips-cross
153 qemu-user
154 - mips-linux-gnu-gcc --version
155 - qemu-mips -version
156 script: [*test-example, *report-size]
157 - {<<: *mips, script: [*test-default, *report-size]}
158 - {<<: *mips, script: [*test-nor, *report-size]}
159 - {<<: *mips, script: [*test-emmc, *report-size]}
160 - {<<: *mips, script: [*test-nand, *report-size]}
161 - {<<: *mips, script: [*test-no-intrinsics, *report-size]}
162 - {<<: *mips, script: [*test-no-inline, *report-size]}
163 # it just takes way to long to run byte-level writes in qemu,
165 #- {<<: *mips, script: [*test-byte-writes, *report-size]}
166 - {<<: *mips, script: [*test-block-cycles, *report-size]}
167 - {<<: *mips, script: [*test-odd-block-count, *report-size]}
168 - {<<: *mips, script: [*test-odd-block-size, *report-size]}
170 # cross-compile with PowerPC
171 - &powerpc
174 - NAME=littlefs-powerpc
175 - CC="powerpc-linux-gnu-gcc --static"
176 - TFLAGS="$TFLAGS --exec=qemu-ppc"
178 - *install-common
179 - sudo apt-get install
180 gcc-powerpc-linux-gnu
181 libc6-dev-powerpc-cross
182 qemu-user
183 - powerpc-linux-gnu-gcc --version
184 - qemu-ppc -version
185 script: [*test-example, *report-size]
186 - {<<: *powerpc, script: [*test-default, *report-size]}
187 - {<<: *powerpc, script: [*test-nor, *report-size]}
188 - {<<: *powerpc, script: [*test-emmc, *report-size]}
189 - {<<: *powerpc, script: [*test-nand, *report-size]}
190 - {<<: *powerpc, script: [*test-no-intrinsics, *report-size]}
191 - {<<: *powerpc, script: [*test-no-inline, *report-size]}
192 # it just takes way to long to run byte-level writes in qemu,
194 #- {<<: *powerpc, script: [*test-byte-writes, *report-size]}
195 - {<<: *powerpc, script: [*test-block-cycles, *report-size]}
196 - {<<: *powerpc, script: [*test-odd-block-count, *report-size]}
197 - {<<: *powerpc, script: [*test-odd-block-size, *report-size]}
200 - &valgrind
203 - NAME=littlefs-valgrind
205 - *install-common
206 - sudo apt-get install valgrind
207 - valgrind --version
209 - make test TFLAGS+="-k --valgrind"
211 # self-host with littlefs-fuse for fuzz test
212 - stage: test
214 - NAME=littlefs-fuse
215 if: branch !~ -prefix$
217 - *install-common
218 - sudo apt-get install libfuse-dev
219 - git clone --depth 1 https://github.com/geky/littlefs-fuse -b v2
220 - fusermount -V
221 - gcc --version
223 # setup disk for littlefs-fuse
224 - rm -rf littlefs-fuse/littlefs/*
225 - cp -r $(git ls-tree --name-only HEAD) littlefs-fuse/littlefs
227 - mkdir mount
228 - sudo chmod a+rw /dev/loop0
229 - dd if=/dev/zero bs=512 count=128K of=disk
230 - losetup /dev/loop0 disk
232 # self-host test
233 - make -C littlefs-fuse
235 - littlefs-fuse/lfs --format /dev/loop0
236 - littlefs-fuse/lfs /dev/loop0 mount
238 - ls mount
239 - mkdir mount/littlefs
240 - cp -r $(git ls-tree --name-only HEAD) mount/littlefs
241 - cd mount/littlefs
242 - stat .
243 - ls -flh
244 - make -B test
246 # test migration using littlefs-fuse
247 - stage: test
249 - NAME=littlefs-migration
250 if: branch !~ -prefix$
252 - *install-common
253 - sudo apt-get install libfuse-dev
254 - git clone --depth 1 https://github.com/geky/littlefs-fuse -b v2 v2
255 - git clone --depth 1 https://github.com/geky/littlefs-fuse -b v1 v1
256 - fusermount -V
257 - gcc --version
259 # setup disk for littlefs-fuse
260 - rm -rf v2/littlefs/*
261 - cp -r $(git ls-tree --name-only HEAD) v2/littlefs
263 - mkdir mount
264 - sudo chmod a+rw /dev/loop0
265 - dd if=/dev/zero bs=512 count=128K of=disk
266 - losetup /dev/loop0 disk
269 - make -C v1
270 - make -C v2
272 # run self-host test with v1
273 - v1/lfs --format /dev/loop0
274 - v1/lfs /dev/loop0 mount
276 - ls mount
277 - mkdir mount/littlefs
278 - cp -r $(git ls-tree --name-only HEAD) mount/littlefs
279 - cd mount/littlefs
280 - stat .
281 - ls -flh
282 - make -B test
285 - cd ../..
286 - fusermount -u mount
288 - v2/lfs --migrate /dev/loop0
289 - v2/lfs /dev/loop0 mount
291 # run self-host test with v2 right where we left off
292 - ls mount
293 - cd mount/littlefs
294 - stat .
295 - ls -flh
296 - make -B test
299 - stage: deploy
301 - NAME=deploy
303 - |
305 set -ev
307 LFS_VERSION=$(grep -ox '#define LFS_VERSION .*' lfs.h | cut -d ' ' -f3)
313 PREV_URL=$(curl -u "$GEKY_BOT_RELEASES" "$PREV_URL" -I \
314 | sed -n '/^Link/{s/.*<\(.*\)>; rel="last"/\1/;p;q0};$q1' \
316 LFS_VERSION_PATCH=$(curl -u "$GEKY_BOT_RELEASES" "$PREV_URL" \
324 CURRENT_COMMIT=$(curl -f -u "$GEKY_BOT_RELEASES" \
326 | jq -re '.sha')
334 --depth=50 v$LFS_VERSION_MAJOR-prefix || true
336 git branch v$LFS_VERSION_MAJOR-prefix $( \
337 git commit-tree $(git write-tree) \
338 $(git rev-parse --verify -q FETCH_HEAD | sed -e 's/^/-p /') \
339 -p HEAD \
340 -m "Generated v$LFS_VERSION_MAJOR prefixes")
341 git reset --hard
342 # Update major version branches (vN and vN-prefix)
343 git push --atomic https://$GEKY_BOT_RELEASES@github.com/$TRAVIS_REPO_SLUG.git \
345 v$LFS_VERSION_MAJOR-prefix
347 PREV=$(git tag --sort=-v:refname -l "v*" | head -1)
348 if [ ! -z "$PREV" ]
351 CHANGES=$(git log --oneline $PREV.. --grep='^Merge' --invert-grep)
354 case ${GEKY_BOT_DRAFT:-minor} in
356 minor) DRAFT=$(jq -R 'endswith(".0")' <<< "$LFS_VERSION") ;;
360 curl -f -u "$GEKY_BOT_RELEASES" -X POST \
362 -d "{
367 \"body\": $(jq -sR '.' <<< "$CHANGES")
373 - |
375 …if ! curl https://api.github.com/repos/$TRAVIS_REPO_SLUG/status/${TRAVIS_PULL_REQUEST_SHA:-$TRAVIS…
376 | jq -e ".statuses[] | select(
381 curl -u "$GEKY_BOT_STATUSES" -X POST \
382 …https://api.github.com/repos/$TRAVIS_REPO_SLUG/statuses/${TRAVIS_PULL_REQUEST_SHA:-$TRAVIS_COMMIT}…
383 -d "{
386 \"description\": \"${STATUS:-In progress}\",
392 - |
394 …if ! curl https://api.github.com/repos/$TRAVIS_REPO_SLUG/status/${TRAVIS_PULL_REQUEST_SHA:-$TRAVIS…
395 | jq -e ".statuses[] | select(
400 curl -u "$GEKY_BOT_STATUSES" -X POST \
401 …https://api.github.com/repos/$TRAVIS_REPO_SLUG/statuses/${TRAVIS_PULL_REQUEST_SHA:-$TRAVIS_COMMIT}…
402 -d "{
405 \"description\": \"${STATUS:-Failed}\",
411 - |
415 …if ! curl https://api.github.com/repos/$TRAVIS_REPO_SLUG/status/${TRAVIS_PULL_REQUEST_SHA:-$TRAVIS…
416 | jq -e ".statuses[] | select(
421 curl -u "$GEKY_BOT_STATUSES" -X POST \
422 …https://api.github.com/repos/$TRAVIS_REPO_SLUG/statuses/${TRAVIS_PULL_REQUEST_SHA:-$TRAVIS_COMMIT}…
423 -d "{
426 \"description\": \"${STATUS:-Passed}\",