File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,19 +13,13 @@ jobs:
1313 name : Generate test ext4 image
1414 runs-on : ubuntu-latest
1515 steps :
16+ - name : Checkout the Git repository
17+ uses : actions/checkout@v4
1618 - name : Generate test.ext4
1719 shell : bash
1820 run : |
1921 set -e
20- mkdir test
21- echo "hello world" > test/test.txt
22- for i in {1..100};do
23- echo "hello world" >> test/test.txt
24- done
25- dd if=/dev/zero of=test.ext4.tmp count=1024 bs=1024
26- mkfs.ext4 test.ext4.tmp -d test
27- echo -n F > test.ext4
28- cat test.ext4.tmp >> test.ext4
22+ ./_test_image.sh
2923 - uses : actions/upload-artifact@v4
3024 with :
3125 name : test.ext4
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ set -e
3+
4+ tmp_dir=$( mktemp -d)
5+ trap " rm -r \" $tmp_dir \" " EXIT
6+ echo " hello world" > " $tmp_dir " /test.txt
7+ for i in {1..100}; do
8+ echo " hello world" >> " $tmp_dir " /test.txt
9+ done
10+ dd if=/dev/zero of=test.ext4.tmp count=1024 bs=1024
11+ mkfs.ext4 test.ext4.tmp -d " $tmp_dir "
12+ echo -n F > test.ext4
13+ cat test.ext4.tmp >> test.ext4
Original file line number Diff line number Diff line change @@ -13,17 +13,8 @@ python -m pip install wheel
1313python -m pip install \
1414 --extra-index-url=https://wheels.eeems.codes/ \
1515 -r requirements.txt
16- if ! [ -f test.ext4 ]; then
17- tmp_dir=$( mktemp -d)
18- trap " rm -r \" $tmp_dir \" " EXIT
19- echo " hello world" > " $tmp_dir " /test.txt
20- for i in {1..100}; do
21- echo " hello world" >> " $tmp_dir " /test.txt
22- done
16+ if ! [ -f test.ext4 ] || ! [ -f test.ext4.tmp ]; then
17+ ./_test_image.sh
2318 trap " rm -f test.ext4{,.tmp}" EXIT
24- dd if=/dev/zero of=test.ext4.tmp count=1024 bs=1024
25- mkfs.ext4 test.ext4.tmp -d " $tmp_dir "
26- echo -n F > test.ext4
27- cat test.ext4.tmp >> test.ext4
2819fi
2920python test.py
You can’t perform that action at this time.
0 commit comments