Skip to content

Commit

Permalink
Remove LFS test files. (#210)
Browse files Browse the repository at this point in the history
  • Loading branch information
ncruces authored Jan 6, 2025
1 parent f7c3fb8 commit abfad02
Show file tree
Hide file tree
Showing 21 changed files with 11 additions and 70 deletions.
23 changes: 0 additions & 23 deletions .github/actions/lfs/action.yml

This file was deleted.

15 changes: 0 additions & 15 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ jobs:
- uses: actions/setup-go@v5
with: { go-version: stable }

- name: Git LFS pull
uses: ./.github/actions/lfs

- name: Format
run: gofmt -s -w . && git diff --exit-code
if: matrix.os != 'windows-latest'
Expand Down Expand Up @@ -104,9 +101,6 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Git LFS pull
uses: ./.github/actions/lfs

- name: Build
env:
GOOS: ${{ matrix.os.name }}
Expand Down Expand Up @@ -142,9 +136,6 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Git LFS pull
uses: ./.github/actions/lfs

- name: Build
env:
GOOS: ${{ matrix.os.name }}
Expand All @@ -170,9 +161,6 @@ jobs:
- uses: actions/setup-go@v5
with: { go-version: stable }

- name: Git LFS pull
uses: ./.github/actions/lfs

- name: Test 386 (32-bit)
run: GOARCH=386 go test -v -short ./...

Expand All @@ -197,8 +185,5 @@ jobs:
- uses: actions/setup-go@v5
with: { go-version: stable }

- name: Git LFS pull
uses: ./.github/actions/lfs

- name: Test
run: go test -v ./...
7 changes: 5 additions & 2 deletions sqlite3/download.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,17 @@ curl -#OL "https://github.com/sqlite/sqlite/raw/version-3.47.2/ext/misc/uint.c"
cd ~-

cd ../vfs/tests/mptest/testdata/
curl -#OL "https://github.com/sqlite/sqlite/raw/version-3.47.2/mptest/mptest.c"
curl -#OL "https://github.com/sqlite/sqlite/raw/version-3.47.2/mptest/config01.test"
curl -#OL "https://github.com/sqlite/sqlite/raw/version-3.47.2/mptest/config02.test"
curl -#OL "https://github.com/sqlite/sqlite/raw/version-3.47.2/mptest/crash01.test"
curl -#OL "https://github.com/sqlite/sqlite/raw/version-3.47.2/mptest/crash02.subtest"
curl -#OL "https://github.com/sqlite/sqlite/raw/version-3.47.2/mptest/multiwrite01.test"
cd ~-

cd ../vfs/tests/speedtest1/testdata/
cd ../vfs/tests/mptest/wasm/
curl -#OL "https://github.com/sqlite/sqlite/raw/version-3.47.2/mptest/mptest.c"
cd ~-

cd ../vfs/tests/speedtest1/wasm/
curl -#OL "https://github.com/sqlite/sqlite/raw/version-3.47.2/test/speedtest1.c"
cd ~-
11 changes: 2 additions & 9 deletions vfs/tests/mptest/mptest_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package mptest

import (
"bytes"
"compress/bzip2"
"context"
"crypto/rand"
"embed"
Expand All @@ -29,10 +28,7 @@ import (
_ "github.com/ncruces/go-sqlite3/vfs/xts"
)

//go:embed testdata/mptest.wasm.bz2
var compressed string

//go:embed testdata/*.*test
//go:embed testdata/*
var scripts embed.FS

const qemuCI = runtime.GOARCH != "386" && runtime.GOARCH != "amd64" && runtime.GOARCH != "arm64"
Expand All @@ -57,10 +53,7 @@ func TestMain(m *testing.M) {
panic(err)
}

if !strings.HasPrefix(compressed, "BZh") {
panic("Please use Git LFS to clone this repo: https://git-lfs.com/")
}
binary, err := io.ReadAll(bzip2.NewReader(strings.NewReader(compressed)))
binary, err := os.ReadFile("wasm/mptest.wasm")
if err != nil {
panic(err)
}
Expand Down
3 changes: 1 addition & 2 deletions vfs/tests/mptest/testdata/.gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
mptest.wasm.bz2 filter=lfs diff=lfs merge=lfs -text
*.*test -crlf
* -crlf
3 changes: 0 additions & 3 deletions vfs/tests/mptest/testdata/mptest.wasm.bz2

This file was deleted.

File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,4 @@ WASI_SDK="$ROOT/tools/wasi-sdk/bin"
--enable-simd --enable-mutable-globals --enable-multivalue \
--enable-bulk-memory --enable-reference-types \
--enable-nontrapping-float-to-int --enable-sign-ext
mv mptest.tmp mptest.wasm
bzip2 -9f mptest.wasm
mv mptest.tmp mptest.wasm
File renamed without changes.
Empty file added vfs/tests/mptest/wasm/go.mod
Empty file.
File renamed without changes.
Binary file added vfs/tests/mptest/wasm/mptest.wasm
Binary file not shown.
9 changes: 1 addition & 8 deletions vfs/tests/speedtest1/speedtest1_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package speedtest1

import (
"bytes"
"compress/bzip2"
"context"
"crypto/rand"
_ "embed"
Expand All @@ -27,9 +26,6 @@ import (
_ "github.com/ncruces/go-sqlite3/vfs/xts"
)

//go:embed testdata/speedtest1.wasm.bz2
var compressed string

var (
rt wazero.Runtime
module wazero.CompiledModule
Expand All @@ -52,10 +48,7 @@ func TestMain(m *testing.M) {
panic(err)
}

if !strings.HasPrefix(compressed, "BZh") {
panic("Please use Git LFS to clone this repo: https://git-lfs.com/")
}
binary, err := io.ReadAll(bzip2.NewReader(strings.NewReader(compressed)))
binary, err := os.ReadFile("wasm/speedtest1.wasm")
if err != nil {
panic(err)
}
Expand Down
1 change: 0 additions & 1 deletion vfs/tests/speedtest1/testdata/.gitattributes

This file was deleted.

3 changes: 0 additions & 3 deletions vfs/tests/speedtest1/testdata/speedtest1.wasm.bz2

This file was deleted.

File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,4 @@ WASI_SDK="$ROOT/tools/wasi-sdk/bin"
--enable-simd --enable-mutable-globals --enable-multivalue \
--enable-bulk-memory --enable-reference-types \
--enable-nontrapping-float-to-int --enable-sign-ext
mv speedtest1.tmp speedtest1.wasm
bzip2 -9f speedtest1.wasm
mv speedtest1.tmp speedtest1.wasm
File renamed without changes.
Empty file.
File renamed without changes.
Binary file added vfs/tests/speedtest1/wasm/speedtest1.wasm
Binary file not shown.

0 comments on commit abfad02

Please sign in to comment.