From: Michael Matloob Date: Tue, 18 Apr 2023 16:16:43 +0000 (-0400) Subject: src/internal/godebugs: add a skip for missing godebug.md X-Git-Tag: go1.21rc1~863 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=59c2d787d30052afaa4eb627130475bae12fb831;p=gostls13.git src/internal/godebugs: add a skip for missing godebug.md 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 Reviewed-by: Bryan Mills Auto-Submit: Bryan Mills Reviewed-by: Michael Matloob TryBot-Result: Gopher Robot --- diff --git a/src/internal/godebugs/godebugs_test.go b/src/internal/godebugs/godebugs_test.go index 663268f02b..a1cb8d492a 100644 --- a/src/internal/godebugs/godebugs_test.go +++ b/src/internal/godebugs/godebugs_test.go @@ -6,7 +6,9 @@ package godebugs_test import ( "internal/godebugs" + "internal/testenv" "os" + "runtime" "strings" "testing" ) @@ -14,6 +16,9 @@ import ( 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)