(t *testing.T, targetString, pkgName string)
| 116 | } |
| 117 | |
| 118 | func buildBinary(t *testing.T, targetString, pkgName string) BuildResult { |
| 119 | options := compileopts.Options{ |
| 120 | Target: targetString, |
| 121 | Opt: "z", |
| 122 | Semaphore: sema, |
| 123 | InterpTimeout: 60 * time.Second, |
| 124 | Debug: true, |
| 125 | VerifyIR: true, |
| 126 | } |
| 127 | target, err := compileopts.LoadTarget(&options) |
| 128 | if err != nil { |
| 129 | t.Fatal("could not load target:", err) |
| 130 | } |
| 131 | config := &compileopts.Config{ |
| 132 | Options: &options, |
| 133 | Target: target, |
| 134 | } |
| 135 | result, err := Build(pkgName, "", t.TempDir(), config) |
| 136 | if err != nil { |
| 137 | t.Fatal("could not build:", err) |
| 138 | } |
| 139 | return result |
| 140 | } |
no test coverage detected