From ec1531937e016c0a7b21e885a3f3a8a9bf9986ff Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Wed, 27 May 2020 14:55:17 +0200 Subject: pkg/cover: skip test on old gcc's --- pkg/cover/report_test.go | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'pkg') diff --git a/pkg/cover/report_test.go b/pkg/cover/report_test.go index 480fba1de..d0d6fc992 100644 --- a/pkg/cover/report_test.go +++ b/pkg/cover/report_test.go @@ -13,6 +13,7 @@ import ( "path/filepath" "regexp" "runtime" + "strings" "testing" "time" @@ -123,6 +124,13 @@ int main() {} "-x", "c", src, }, target.CFlags...), test.CFlags...) if _, err := osutil.RunCmd(time.Hour, "", target.CCompiler, flags...); err != nil { + errText := err.Error() + errText = strings.ReplaceAll(errText, "‘", "'") + errText = strings.ReplaceAll(errText, "’", "'") + if strings.Contains(errText, "error: unrecognized command line option '-fsanitize-coverage=trace-pc'") && + os.Getenv("CI") == "" { + t.Skip("skipping test, -fsanitize-coverage=trace-pc is not supported") + } t.Fatal(err) } rg, err := MakeReportGenerator(target, bin, filepath.Dir(src), filepath.Dir(src)) -- cgit mrf-deployment