diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2020-03-15 22:20:09 +0100 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2020-03-17 21:19:13 +0100 |
| commit | 5de34a784c610ab08888c185dd0c09f542d62d4f (patch) | |
| tree | ce67031fb9cdf389da95747e2691627971861899 /pkg/compiler/compiler_test.go | |
| parent | acf69c5ed9f8722bd1659342b7de4dfbaf3fef91 (diff) | |
pkg/compiler: don't specify syscall consts for test OS
This is just tedious. Fabricate them on the fly.
Diffstat (limited to 'pkg/compiler/compiler_test.go')
| -rw-r--r-- | pkg/compiler/compiler_test.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/pkg/compiler/compiler_test.go b/pkg/compiler/compiler_test.go index f1c18f9ee..c6421b17f 100644 --- a/pkg/compiler/compiler_test.go +++ b/pkg/compiler/compiler_test.go @@ -53,12 +53,6 @@ func TestCompileAll(t *testing.T) { func TestNoErrors(t *testing.T) { t.Parallel() - consts := map[string]uint64{ - "SYS_foo": 1, - "C0": 0, - "C1": 1, - "C2": 2, - } for _, name := range []string{"all.txt"} { for _, arch := range []string{"32_shmem", "64"} { name, arch := name, arch @@ -88,6 +82,12 @@ func TestNoErrors(t *testing.T) { if constInfo == nil { t.Fatalf("const extraction failed") } + consts := map[string]uint64{ + "C0": 0, + "C1": 1, + "C2": 2, + } + FabricateSyscallConsts(target, constInfo, consts) desc := Compile(astDesc, consts, target, eh) if desc == nil { t.Fatalf("compilation failed") |
