Skip to content

Commit ec4c885

Browse files
committed
Added CI testing of minor on-disk features: --stat and -d=lfs2.0
1 parent 1a7881c commit ec4c885

File tree

1 file changed

+59
-0
lines changed

1 file changed

+59
-0
lines changed

.github/workflows/test.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ jobs:
3939
make
4040
4141
./lfs --format $LOOP
42+
./lfs --stat $LOOP
4243
./lfs $LOOP mount
4344
4445
ls mount
@@ -48,3 +49,61 @@ jobs:
4849
ls -flh
4950
make -B test-runner
5051
make -B test
52+
53+
# test older versions
54+
test-lfs2_0:
55+
runs-on: ubuntu-22.04
56+
steps:
57+
- uses: actions/checkout@v2
58+
- name: install
59+
run: |
60+
# need a few things
61+
sudo apt-get update -qq
62+
sudo apt-get install -qq gcc python3 python3-pip libfuse-dev
63+
sudo pip3 install toml
64+
gcc --version
65+
python3 --version
66+
fusermount -V
67+
- name: setup
68+
run: |
69+
# setup disk for littlefs-fuse
70+
mkdir mount
71+
LOOP=$(sudo losetup -f)
72+
sudo chmod a+rw $LOOP
73+
dd if=/dev/zero bs=512 count=128K of=disk
74+
losetup $LOOP disk
75+
echo "LOOP=$LOOP" >> $GITHUB_ENV
76+
- name: test
77+
run: |
78+
# self-host test
79+
make
80+
81+
./lfs -d=lfs2.0 --format $LOOP
82+
./lfs --stat $LOOP
83+
./lfs -d=lfs2.0 $LOOP mount
84+
85+
ls mount
86+
cp -r littlefs mount/littlefs
87+
cd mount/littlefs
88+
stat .
89+
ls -flh
90+
make -B test-runner
91+
make -B test
92+
- name: test-migrate
93+
run: |
94+
# self-host test, this time migrating to current version
95+
make
96+
97+
./lfs -d=lfs2.0 --format $LOOP
98+
./lfs --stat $LOOP
99+
./lfs $LOOP mount
100+
101+
ls mount
102+
cp -r littlefs mount/littlefs
103+
cd mount/littlefs
104+
stat .
105+
ls -flh
106+
make -B test-runner
107+
make -B test
108+
109+
./lfs --stat $LOOP

0 commit comments

Comments
 (0)