From 4dbd403fd0978b91ffe3bb2f2a749511591644dd Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Wed, 8 May 2024 12:24:46 +0200 Subject: pkg/csource: replace go:generate with go:embed go:embed is a more modern way to do this and it does not require a special Makefile step. Since go:embed cannot use paths that contains "..", the actual embeding is moved to executor package. --- pkg/csource/csource_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'pkg/csource/csource_test.go') diff --git a/pkg/csource/csource_test.go b/pkg/csource/csource_test.go index 8b4d83296..86f18af39 100644 --- a/pkg/csource/csource_test.go +++ b/pkg/csource/csource_test.go @@ -13,6 +13,7 @@ import ( "sync/atomic" "testing" + "github.com/google/syzkaller/executor" "github.com/google/syzkaller/pkg/testutil" "github.com/google/syzkaller/prog" _ "github.com/google/syzkaller/sys" @@ -163,7 +164,7 @@ func TestExecutorMacros(t *testing.T) { expected["SYZ_HAVE_RESET_LOOP"] = true expected["SYZ_HAVE_SETUP_TEST"] = true expected["SYZ_TEST_COMMON_EXT_EXAMPLE"] = true - macros := regexp.MustCompile("SYZ_[A-Za-z0-9_]+").FindAllString(commonHeader, -1) + macros := regexp.MustCompile("SYZ_[A-Za-z0-9_]+").FindAllString(string(executor.CommonHeader), -1) for _, macro := range macros { if strings.HasPrefix(macro, "SYZ_HAVE_") { continue -- cgit mrf-deployment