pass testing arguments to wasmtime
Этот коммит содержится в:
родитель
c1d697f868
коммит
782c57cc11
1 изменённых файлов: 11 добавлений и 1 удалений
12
main.go
12
main.go
|
@ -244,8 +244,18 @@ func runPackageTest(config *compileopts.Config, result builder.BuildResult, test
|
|||
cmd.Dir = result.MainDir
|
||||
} else {
|
||||
// Run in an emulator.
|
||||
// TODO: pass the -test.v flag if needed.
|
||||
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.Stdout = os.Stdout
|
||||
|
|
Загрузка…
Создание таблицы
Сослаться в новой задаче