diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2024-05-08 12:24:46 +0200 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2024-05-08 12:26:59 +0000 |
| commit | 4dbd403fd0978b91ffe3bb2f2a749511591644dd (patch) | |
| tree | a43a92648849d5127c4165b744e05e38c90bf9ee /pkg/csource/csource_test.go | |
| parent | dc488c459880e3f3af557dc336697138ecb8228b (diff) | |
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.
Diffstat (limited to 'pkg/csource/csource_test.go')
| -rw-r--r-- | pkg/csource/csource_test.go | 3 |
1 files changed, 2 insertions, 1 deletions
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 |
