Test Solaris.

This commit is contained in:
Nuno Cruces
2024-05-04 14:42:23 +01:00
parent f0ce3e58eb
commit 1c58744f87
4 changed files with 47 additions and 38 deletions

View File

@@ -6,6 +6,6 @@ echo 'set -eu' > test.sh
for p in $(go list ./...); do
dir=".${p#github.com/ncruces/go-sqlite3}"
name="$(basename "$p").test"
(cd ${dir}; GOOS=freebsd go test -c)
[ -f "${dir}/${name}" ] && echo "(cd ${dir}; ./${name} -test.v)" >> test.sh
(cd ${dir}; go test -c)
[ -f "${dir}/${name}" ] && echo "(cd ${dir}; ./${name} ${TESTFLAGS})" >> test.sh
done

View File

@@ -1,11 +0,0 @@
#!/usr/bin/env bash
set -euo pipefail
echo 'set -eu' > test.sh
for p in $(go list ./...); do
dir=".${p#github.com/ncruces/go-sqlite3}"
name="$(basename "$p").test"
(cd ${dir}; GOOS=illumos go test -c)
[ -f "${dir}/${name}" ] && echo "(cd ${dir}; ./${name} -test.v -test.short)" >> test.sh
done

View File

@@ -78,7 +78,10 @@ jobs:
with: { go-version: stable }
- name: Build
run: .github/workflows/bsd.sh
env:
GOOS: freebsd
TESTFLAGS: '-test.v'
run: .github/workflows/build-test.sh
- name: Test
uses: cross-platform-actions/action@v0.24.0
@@ -88,28 +91,7 @@ jobs:
shell: bash
run: . ./test.sh
sync_files: runner-to-vm
test-illumos:
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v4
with: { lfs: 'true' }
- uses: actions/setup-go@v5
with: { go-version: stable }
- name: Build
run: .github/workflows/illumos.sh
- name: Test
uses: vmactions/omnios-vm@v1
with:
usesh: true
copyback: false
run: . ./test.sh
test-m1:
runs-on: macos-14
needs: test
@@ -147,4 +129,41 @@ jobs:
run: GOARCH=riscv64 go test -v -short ./...
- name: Test s390x (like z/OS)
run: GOARCH=s390x go test -v -short -tags sqlite3_flock ./...
run: GOARCH=s390x go test -v -short -tags sqlite3_flock ./...
test-vm:
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v4
with: { lfs: 'true' }
- uses: actions/setup-go@v5
with: { go-version: stable }
- name: Build illumos
env:
GOOS: illumos
TESTFLAGS: '-test.v -test.short'
run: .github/workflows/build-test.sh
- name: Test illumos
uses: vmactions/omnios-vm@v1
with:
usesh: true
copyback: false
run: . ./test.sh
- name: Build Solaris
env:
GOOS: solaris
TESTFLAGS: '-test.v -test.short'
run: .github/workflows/build-test.sh
- name: Test Solaris
uses: vmactions/solaris-vm@v1
with:
usesh: true
copyback: false
run: . ./test.sh

View File

@@ -88,7 +88,8 @@ It also benefits greatly from [SQLite's](https://sqlite.org/testing.html) and
[wazero's](https://tetrate.io/blog/introducing-wazero-from-tetrate/#:~:text=Rock%2Dsolid%20test%20approach) thorough testing.
Every commit is [tested](.github/workflows/test.yml) on
Linux (amd64/arm64/386/riscv64), macOS (amd64/arm64), Windows, FreeBSD and illumos.
Linux (amd64/arm64/386/riscv64/s390x), macOS (amd64/arm64),
Windows, FreeBSD, illumos, and Solaris.
The Go VFS is tested by running SQLite's
[mptest](https://github.com/sqlite/sqlite/blob/master/mptest/mptest.c).