github.com/ncruces/go-sqlite3@v0.15.1-0.20240520133447-53eef1510ff0/tests/testdata/f2fs.sh (about)

     1  #!/usr/bin/env bash
     2  set -euo pipefail
     3  
     4  cd -P -- "$(dirname -- "$0")"
     5  ROOT=../../
     6  
     7  if mountpoint -q f2fs/; then
     8    sudo umount f2fs/
     9  fi
    10  
    11  mkdir -p f2fs/
    12  gunzip -c f2fs.img.gz > f2fs.img
    13  sudo mount -nv -o loop f2fs.img f2fs/
    14  mkdir -p f2fs/tmp/
    15  
    16  go test -c "$ROOT/tests" -coverpkg github.com/ncruces/go-sqlite3/...
    17  TMPDIR=$PWD/f2fs/tmp/ ./tests.test -test.v -test.short -test.coverprofile cover.out
    18  go tool cover -html cover.out
    19  
    20  sudo umount f2fs/
    21  rm -r f2fs/ f2fs.img cover.out *.test