mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-07-26 06:38:42 +00:00
main: don't mutate compile options in Test
This commit is contained in:
@@ -209,6 +209,8 @@ func Build(pkgName, outpath string, config *compileopts.Config) error {
|
||||
// Test runs the tests in the given package. Returns whether the test passed and
|
||||
// possibly an error if the test failed to run.
|
||||
func Test(pkgName string, stdout, stderr io.Writer, options *compileopts.Options, outpath string) (bool, error) {
|
||||
optionsCopy := *options
|
||||
options = &optionsCopy
|
||||
options.TestConfig.CompileTestBinary = true
|
||||
config, err := builder.NewConfig(options)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user