aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/compiler/compiler_test.go
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2020-03-15 22:20:09 +0100
committerDmitry Vyukov <dvyukov@google.com>2020-03-17 21:19:13 +0100
commit5de34a784c610ab08888c185dd0c09f542d62d4f (patch)
treece67031fb9cdf389da95747e2691627971861899 /pkg/compiler/compiler_test.go
parentacf69c5ed9f8722bd1659342b7de4dfbaf3fef91 (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.go12
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")