mirror of
https://github.com/ncruces/go-sqlite3.git
synced 2026-01-12 05:59:14 +00:00
Fix BSD tests.
This commit is contained in:
7
.github/workflows/bsd.yml
vendored
7
.github/workflows/bsd.yml
vendored
@@ -18,7 +18,7 @@ jobs:
|
||||
go-version: stable
|
||||
|
||||
- name: Build
|
||||
run: GOOS=freebsd go test -c ./...
|
||||
run: GOOS=freebsd go test -c . ./vfs/... ./tests/...
|
||||
|
||||
- name: Test
|
||||
uses: cross-platform-actions/action@v0.21.1
|
||||
@@ -26,4 +26,7 @@ jobs:
|
||||
operating_system: freebsd
|
||||
version: '13.2'
|
||||
sync_files: runner-to-vm
|
||||
run: find . -name '*.test' -maxdepth 1 -exec {} -test.v \;
|
||||
run: |
|
||||
foreach test ( *.test )
|
||||
./$test -test.v || exit $?
|
||||
end
|
||||
@@ -60,7 +60,7 @@ func TestMultiProcess(t *testing.T) {
|
||||
"&_pragma=journal_mode(truncate)" +
|
||||
"&_pragma=synchronous(off)"
|
||||
|
||||
cmd := exec.Command("go", "test", "-v", "-run", "TestChildProcess")
|
||||
cmd := exec.Command(os.Args[0], append(os.Args[1:], "-test.v", "-test.run=TestChildProcess")...)
|
||||
out, err := cmd.StdoutPipe()
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
@@ -71,8 +71,10 @@ func TestMultiProcess(t *testing.T) {
|
||||
|
||||
var buf [3]byte
|
||||
// Wait for child to start.
|
||||
if _, err := io.ReadFull(out, buf[:]); err != nil || string(buf[:]) != "===" {
|
||||
if _, err := io.ReadFull(out, buf[:]); err != nil {
|
||||
t.Fatal(err)
|
||||
} else if str := string(buf[:]); str != "===" {
|
||||
t.Fatal(str)
|
||||
}
|
||||
|
||||
testParallel(t, name, 1000)
|
||||
|
||||
Reference in New Issue
Block a user