Currently android doesn't include godebug.md in its doc folder, and
TestAll in godebugs_test.go is failing because it can't open the file.
Add a skip in case the file is missing (except for linux so we can
catch the case where we stop generating the file).
Change-Id: I37a711e49a494c33bc92bf3e31cf40471ea9d5b6
Reviewed-on: https://go-review.googlesource.com/c/go/+/485795
Run-TryBot: Michael Matloob <matloob@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
Auto-Submit: Bryan Mills <bcmills@google.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
import (
"internal/godebugs"
+ "internal/testenv"
"os"
+ "runtime"
"strings"
"testing"
)
func TestAll(t *testing.T) {
data, err := os.ReadFile("../../../doc/godebug.md")
if err != nil {
+ if os.IsNotExist(err) && (testenv.Builder() == "" || runtime.GOOS != "linux") {
+ t.Skip(err)
+ }
t.Fatal(err)
}
doc := string(data)