forked from namjaejeon/exfatprogs
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
github action : add auto-test script
Signed-off-by: Namjae Jeon <[email protected]>
- Loading branch information
1 parent
e0aae11
commit a5bf490
Showing
1 changed file
with
62 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
name: C/C++ CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- exfat-next | ||
pull_request: | ||
branches: | ||
- master | ||
- exfat-next | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: before test | ||
run: | | ||
sudo apt-get install linux-headers-$(uname -r) | ||
sudo apt-get install xz-utils | ||
git clone https://github.com/namjaejeon/linux-exfat-oot | ||
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH | ||
export PATH=/usr/local/lib:$PATH | ||
- name: build test & install exfatprogs | ||
run: | | ||
./autogen.sh > /dev/null | ||
./configure > /dev/null | ||
make -j$((`nproc`+1)) > /dev/null | ||
sudo make install > /dev/null | ||
- name: run fsck repair testcases | ||
run: | | ||
cd tests | ||
sudo ./test_fsck.sh | ||
- name: create file/director test | ||
run: | | ||
cd linux-exfat-oot | ||
make > /dev/null | ||
sudo make install > /dev/null | ||
sudo modprobe exfat | ||
sudo mkdir -p /mnt/test | ||
cd .. | ||
truncate -s 10G test.img | ||
sudo losetup /dev/loop22 test.img | ||
sudo mkfs.exfat /dev/loop22 | ||
sudo mount -t exfat /dev/loop22 /mnt/test/ | ||
cd /mnt/test/ | ||
i=1;while [ $i -le 10000 ];do sudo touch file$i;if [ $? != 0 ]; then exit 1; fi; i=$(($i + 1));done | ||
sync | ||
sudo rm -rf * | ||
i=1;while [ $i -le 10000 ];do sudo mkdir dir$i;if [ $? != 0 ]; then exit 1; fi; i=$(($i + 1));done | ||
sync | ||
sudo rm -rf * | ||
i=1;while [ $i -le 10000 ];do sudo touch file$i;if [ $? != 0 ]; then exit 1; fi; i=$(($i + 1));done | ||
i=1;while [ $i -le 10000 ];do sudo mkdir dir$i;if [ $? != 0 ]; then exit 1; fi; i=$(($i + 1));done | ||
sync | ||
sudo fsck.exfat /dev/loop22 | ||
sudo find . -delete | ||
sudo fsck.exfat /dev/loop22 | ||
cd - |