mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 03:08:54 +01:00
parent
d22158b156
commit
99fb40f299
@ -21,6 +21,7 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
"runtime"
|
||||||
"strings"
|
"strings"
|
||||||
"sync"
|
"sync"
|
||||||
"testing"
|
"testing"
|
||||||
@ -29,7 +30,26 @@ import (
|
|||||||
exec "golang.org/x/sys/execabs"
|
exec "golang.org/x/sys/execabs"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
func isWSL() (bool, error) {
|
||||||
|
if runtime.GOOS != "windows" {
|
||||||
|
return false, nil
|
||||||
|
}
|
||||||
|
abs, err := filepath.Abs(".")
|
||||||
|
if err != nil {
|
||||||
|
return false, err
|
||||||
|
}
|
||||||
|
return strings.HasPrefix(abs, `\\wsl$\`), nil
|
||||||
|
}
|
||||||
|
|
||||||
func TestPrograms(t *testing.T) {
|
func TestPrograms(t *testing.T) {
|
||||||
|
wsl, err := isWSL()
|
||||||
|
if err != nil {
|
||||||
|
t.Fatal(err)
|
||||||
|
}
|
||||||
|
if wsl {
|
||||||
|
t.Skip("WSL doesn't support LockFileEx (#1864)")
|
||||||
|
}
|
||||||
|
|
||||||
dir := "testdata"
|
dir := "testdata"
|
||||||
ents, err := os.ReadDir(dir)
|
ents, err := os.ReadDir(dir)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user