mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-14 07:53:40 +00:00
pass testing arguments to wasmtime
This commit is contained in:
@@ -244,8 +244,18 @@ func runPackageTest(config *compileopts.Config, result builder.BuildResult, test
|
|||||||
cmd.Dir = result.MainDir
|
cmd.Dir = result.MainDir
|
||||||
} else {
|
} else {
|
||||||
// Run in an emulator.
|
// Run in an emulator.
|
||||||
// TODO: pass the -test.v flag if needed.
|
|
||||||
args := append(config.Target.Emulator[1:], result.Binary)
|
args := append(config.Target.Emulator[1:], result.Binary)
|
||||||
|
if config.Target.Emulator[0] == "wasmtime" {
|
||||||
|
// allow reading from current directory: --dir=.
|
||||||
|
// mark end of wasmtime arguments and start of program ones: --
|
||||||
|
args = append(args, "--dir=.", "--")
|
||||||
|
if testVerbose {
|
||||||
|
args = append(args, "-test.v")
|
||||||
|
}
|
||||||
|
if testShort {
|
||||||
|
args = append(args, "-test.short")
|
||||||
|
}
|
||||||
|
}
|
||||||
cmd = executeCommand(config.Options, config.Target.Emulator[0], args...)
|
cmd = executeCommand(config.Options, config.Target.Emulator[0], args...)
|
||||||
}
|
}
|
||||||
cmd.Stdout = os.Stdout
|
cmd.Stdout = os.Stdout
|
||||||
|
|||||||
Reference in New Issue
Block a user