aboutsummaryrefslogtreecommitdiffhomepage
path: root/main_test.go
diff options
context:
space:
mode:
authorDamian Gryski <[email protected]>2022-08-04 15:26:44 -0700
committerRon Evans <[email protected]>2022-08-20 07:40:39 +0200
commit0b77e92c508bfd2a7d2cd871bc565ec63a679979 (patch)
tree8fb1a8c8e75b86885f01c56d8440afd9c80153ff /main_test.go
parenta4ee98e0e1f7a8a30b066c97936b32e795d5733d (diff)
downloadtinygo-0b77e92c508bfd2a7d2cd871bc565ec63a679979.tar.gz
tinygo-0b77e92c508bfd2a7d2cd871bc565ec63a679979.zip
make interp timeout configurable from command line
Diffstat (limited to 'main_test.go')
-rw-r--r--main_test.go30
1 files changed, 16 insertions, 14 deletions
diff --git a/main_test.go b/main_test.go
index aa96e8564..bc7906482 100644
--- a/main_test.go
+++ b/main_test.go
@@ -275,14 +275,15 @@ func emuCheck(t *testing.T, options compileopts.Options) {
func optionsFromTarget(target string, sema chan struct{}) compileopts.Options {
return compileopts.Options{
// GOOS/GOARCH are only used if target == ""
- GOOS: goenv.Get("GOOS"),
- GOARCH: goenv.Get("GOARCH"),
- GOARM: goenv.Get("GOARM"),
- Target: target,
- Semaphore: sema,
- Debug: true,
- VerifyIR: true,
- Opt: "z",
+ GOOS: goenv.Get("GOOS"),
+ GOARCH: goenv.Get("GOARCH"),
+ GOARM: goenv.Get("GOARM"),
+ Target: target,
+ Semaphore: sema,
+ InterpTimeout: 180 * time.Second,
+ Debug: true,
+ VerifyIR: true,
+ Opt: "z",
}
}
@@ -292,12 +293,13 @@ func optionsFromTarget(target string, sema chan struct{}) compileopts.Options {
func optionsFromOSARCH(osarch string, sema chan struct{}) compileopts.Options {
parts := strings.Split(osarch, "/")
options := compileopts.Options{
- GOOS: parts[0],
- GOARCH: parts[1],
- Semaphore: sema,
- Debug: true,
- VerifyIR: true,
- Opt: "z",
+ GOOS: parts[0],
+ GOARCH: parts[1],
+ Semaphore: sema,
+ InterpTimeout: 180 * time.Second,
+ Debug: true,
+ VerifyIR: true,
+ Opt: "z",
}
if options.GOARCH == "arm" {
options.GOARM = parts[2]