From 07ab5cc10d4ce8db0c3b099d8bd34da66db51b9e Mon Sep 17 00:00:00 2001
From: Cheng Shao <terrorjack@type.dance>
Date: Fri, 20 Oct 2023 21:24:16 +0000
Subject: [PATCH] testsuite: increase timeout of ghc-api tests for wasm32

ghc-api tests for wasm32 are more likely to timeout due to the large
wasm module sizes, especially when testing with wasm native tail
calls, given wasmtime's handling of tail call opcodes are suboptimal
at the moment. It makes sense to increase timeout specifically for
these tests on wasm32. This doesn't affect other targets, and for
wasm32 we don't increase timeout for all tests, so not to risk letting
major performance regressions slip through the testsuite.
---
 testsuite/tests/ghc-api/all.T           | 2 ++
 testsuite/tests/ghc-api/downsweep/all.T | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/testsuite/tests/ghc-api/all.T b/testsuite/tests/ghc-api/all.T
index 15c02b93084e..09da396ec61a 100644
--- a/testsuite/tests/ghc-api/all.T
+++ b/testsuite/tests/ghc-api/all.T
@@ -1,3 +1,5 @@
+setTestOpts(when(arch('wasm32'), run_timeout_multiplier(2)))
+
 test('ghcApi', normal, compile_and_run, ['-package ghc'])
 test('T6145', js_broken(22352), makefile_test, ['T6145'])
 test('T8639_api', req_rts_linker,
diff --git a/testsuite/tests/ghc-api/downsweep/all.T b/testsuite/tests/ghc-api/downsweep/all.T
index 1096159c2c6a..75de163b9e7f 100644
--- a/testsuite/tests/ghc-api/downsweep/all.T
+++ b/testsuite/tests/ghc-api/downsweep/all.T
@@ -1,3 +1,5 @@
+setTestOpts(when(arch('wasm32'), run_timeout_multiplier(2)))
+
 test('PartialDownsweep',
      [ extra_run_opts('"' + config.libdir + '"')
      , ignore_stderr
-- 
GitLab