From 3132b272dee5a757afbb213d1259c9b2e41aad93 Mon Sep 17 00:00:00 2001 From: Nuno Cruces Date: Mon, 10 Nov 2025 11:26:28 +0000 Subject: [PATCH] Test more, log less. --- .github/workflows/build-test.sh | 2 +- .github/workflows/test.yml | 45 +++++++++++++++++---------------- README.md | 2 +- vfs/shm.go | 2 +- vfs/shm_bsd.go | 2 +- vfs/shm_copy.go | 2 +- vfs/shm_memlk.go | 2 +- vfs/shm_ofd.go | 2 +- vfs/shm_other.go | 2 +- vfs/shm_windows.go | 2 +- 10 files changed, 32 insertions(+), 31 deletions(-) diff --git a/.github/workflows/build-test.sh b/.github/workflows/build-test.sh index 89723da..fdcd8a0 100755 --- a/.github/workflows/build-test.sh +++ b/.github/workflows/build-test.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -euo pipefail -echo 'set -eu' > test.sh +echo 'set -eux' > test.sh for p in $(go list ./...); do dir=".${p#github.com/ncruces/go-sqlite3}" diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 30a8f4d..1b12e4b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -51,17 +51,17 @@ jobs: run: go vet ./... - name: Build - run: go build -v ./... + run: go build ./... - name: Test - run: go test -v ./... -bench . -benchtime=1x + run: go test ./... -bench . -benchtime=1x - name: Test BSD locks - run: go test -v -tags sqlite3_flock ./... + run: go test -tags sqlite3_flock ./... if: matrix.os != 'windows-latest' - name: Test dot locks - run: go test -v -tags sqlite3_dotlk ./... + run: go test -tags sqlite3_dotlk ./... if: matrix.os != 'windows-latest' - name: Test modules @@ -69,7 +69,7 @@ jobs: run: | go work init . go work use -r embed gormlite - go test -v ./embed/bcw2/... + go test ./embed/bcw2/... - name: Test GORM shell: bash @@ -99,21 +99,19 @@ jobs: os: - name: freebsd version: '14.3' - flags: '-test.v' - name: netbsd version: '10.1' - flags: '-test.v' - name: freebsd arch: arm64 version: '14.3' - flags: '-test.v -test.short' + tflags: '-test.short' - name: netbsd arch: arm64 version: '10.1' - flags: '-test.v -test.short' + tflags: '-test.short' - name: openbsd version: '7.8' - flags: '-test.v -test.short' + tflags: '-test.short' runs-on: ubuntu-latest needs: test @@ -124,7 +122,7 @@ jobs: env: GOOS: ${{ matrix.os.name }} GOARCH: ${{ matrix.os.arch }} - TESTFLAGS: ${{ matrix.os.flags }} + TESTFLAGS: ${{ matrix.os.tflags }} run: .github/workflows/build-test.sh - name: Test @@ -143,14 +141,11 @@ jobs: os: - name: dragonfly action: 'vmactions/dragonflybsd-vm@v1' - tflags: '-test.v' - name: illumos action: 'vmactions/omnios-vm@v1' - tflags: '-test.v' - name: solaris action: 'vmactions/solaris-vm@v1' bflags: '-tags sqlite3_dotlk' - tflags: '-test.v' runs-on: ubuntu-latest needs: test @@ -187,7 +182,7 @@ jobs: GOARCH: wasm GOWASIRUNTIME: wasmtime GOWASIRUNTIMEARGS: '--env CI=true' - run: go test -v -short -tags sqlite3_dotlk -skip Example ./... + run: go test -short -tags sqlite3_dotlk -skip Example ./... test-qemu: runs-on: ubuntu-latest @@ -200,16 +195,19 @@ jobs: with: { go-version: stable } - name: Test 386 (32-bit) - run: GOARCH=386 go test -v -short ./... + run: GOARCH=386 go test -short ./... - name: Test riscv64 (interpreter) - run: GOARCH=riscv64 go test -v -short ./... + run: GOARCH=riscv64 go test -short ./... - name: Test ppc64le (interpreter) - run: GOARCH=ppc64le go test -v -short ./... + run: GOARCH=ppc64le go test -short ./... + + - name: Test loong64 (interpreter) + run: GOARCH=loong64 go test -short ./... - name: Test s390x (big-endian) - run: GOARCH=s390x go test -v -short -tags sqlite3_dotlk ./... + run: GOARCH=s390x go test -short -tags sqlite3_dotlk ./... test-linuxarm: runs-on: ubuntu-24.04-arm @@ -221,7 +219,10 @@ jobs: with: { go-version: stable } - name: Test - run: go test -v ./... + run: go test ./... + + - name: Test arm (32-bit) + run: GOARCH=arm GOARM=7 go test -short ./... test-macintel: runs-on: macos-15-intel @@ -233,7 +234,7 @@ jobs: with: { go-version: stable } - name: Test - run: go test -v ./... + run: go test ./... test-winarm: runs-on: windows-11-arm @@ -245,4 +246,4 @@ jobs: with: { go-version: stable } - name: Test - run: go test -v ./... \ No newline at end of file + run: go test ./... \ No newline at end of file diff --git a/README.md b/README.md index d6d963e..3ff97b6 100644 --- a/README.md +++ b/README.md @@ -84,7 +84,7 @@ It also benefits greatly from [SQLite's](https://sqlite.org/testing.html) and thorough testing. Every commit is tested on: -* Linux: amd64, arm64, 386, riscv64, ppc64le, s390x +* Linux: amd64, arm64, 386, arm, riscv64, ppc64le, loong64, s390x * macOS: amd64, arm64 * Windows: amd64, arm64 * BSD: diff --git a/vfs/shm.go b/vfs/shm.go index f289552..d1cb56f 100644 --- a/vfs/shm.go +++ b/vfs/shm.go @@ -1,4 +1,4 @@ -//go:build ((linux || darwin || windows || freebsd || openbsd || netbsd || dragonfly || illumos) && (386 || arm || amd64 || arm64 || riscv64 || ppc64le)) || sqlite3_flock || sqlite3_dotlk +//go:build ((linux || darwin || windows || freebsd || openbsd || netbsd || dragonfly || illumos) && (386 || arm || amd64 || arm64 || riscv64 || ppc64le || loong64)) || sqlite3_flock || sqlite3_dotlk package vfs diff --git a/vfs/shm_bsd.go b/vfs/shm_bsd.go index ebf8418..fc5303a 100644 --- a/vfs/shm_bsd.go +++ b/vfs/shm_bsd.go @@ -1,4 +1,4 @@ -//go:build ((freebsd || openbsd || netbsd || dragonfly || illumos) && (386 || arm || amd64 || arm64 || riscv64 || ppc64le) && !sqlite3_dotlk) || sqlite3_flock +//go:build ((freebsd || openbsd || netbsd || dragonfly || illumos) && (386 || arm || amd64 || arm64 || riscv64 || ppc64le || loong64) && !sqlite3_dotlk) || sqlite3_flock package vfs diff --git a/vfs/shm_copy.go b/vfs/shm_copy.go index 8e40aaf..fce6325 100644 --- a/vfs/shm_copy.go +++ b/vfs/shm_copy.go @@ -1,4 +1,4 @@ -//go:build (windows && (386 || arm || amd64 || arm64 || riscv64 || ppc64le)) || sqlite3_dotlk +//go:build (windows && (386 || arm || amd64 || arm64 || riscv64 || ppc64le || loong64)) || sqlite3_dotlk package vfs diff --git a/vfs/shm_memlk.go b/vfs/shm_memlk.go index d23c26c..b418905 100644 --- a/vfs/shm_memlk.go +++ b/vfs/shm_memlk.go @@ -1,4 +1,4 @@ -//go:build ((freebsd || openbsd || netbsd || dragonfly || illumos) && (386 || arm || amd64 || arm64 || riscv64 || ppc64le)) || sqlite3_flock || sqlite3_dotlk +//go:build ((freebsd || openbsd || netbsd || dragonfly || illumos) && (386 || arm || amd64 || arm64 || riscv64 || ppc64le || loong64)) || sqlite3_flock || sqlite3_dotlk package vfs diff --git a/vfs/shm_ofd.go b/vfs/shm_ofd.go index de31e59..e61ae7e 100644 --- a/vfs/shm_ofd.go +++ b/vfs/shm_ofd.go @@ -1,4 +1,4 @@ -//go:build (linux || darwin) && (386 || arm || amd64 || arm64 || riscv64 || ppc64le) && !(sqlite3_flock || sqlite3_dotlk) +//go:build (linux || darwin) && (386 || arm || amd64 || arm64 || riscv64 || ppc64le || loong64) && !(sqlite3_flock || sqlite3_dotlk) package vfs diff --git a/vfs/shm_other.go b/vfs/shm_other.go index 69319f0..c5890cb 100644 --- a/vfs/shm_other.go +++ b/vfs/shm_other.go @@ -1,4 +1,4 @@ -//go:build !(((linux || darwin || windows || freebsd || openbsd || netbsd || dragonfly || illumos) && (386 || arm || amd64 || arm64 || riscv64 || ppc64le)) || sqlite3_flock || sqlite3_dotlk) +//go:build !(((linux || darwin || windows || freebsd || openbsd || netbsd || dragonfly || illumos) && (386 || arm || amd64 || arm64 || riscv64 || ppc64le || loong64)) || sqlite3_flock || sqlite3_dotlk) package vfs diff --git a/vfs/shm_windows.go b/vfs/shm_windows.go index 80ddad5..33e6599 100644 --- a/vfs/shm_windows.go +++ b/vfs/shm_windows.go @@ -1,4 +1,4 @@ -//go:build (386 || arm || amd64 || arm64 || riscv64 || ppc64le) && !sqlite3_dotlk +//go:build (386 || arm || amd64 || arm64 || riscv64 || ppc64le || loong64) && !sqlite3_dotlk package vfs