From fe91ac15be461fc69ed56c6a6c2b18d127bec690 Mon Sep 17 00:00:00 2001 From: Yu Gu Date: Sat, 29 Oct 2022 20:15:14 +0800 Subject: [PATCH] test: fix timeout of test-heap-prof.js in riscv devices In riscv hardware test-heap-prof.js caused timeout in test. Because of weak performance. So there is a need to set TIMEOUT_SCALEFACTOR for riscv too. Fixes: https://github.com/nodejs/node/issues/40152 PR-URL: https://github.com/nodejs/node/pull/42674 Reviewed-By: James M Snell --- tools/test.py | 9 +++++---- tools/utils.py | 2 ++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/tools/test.py b/tools/test.py index 788d68734fe250..eb183c0b4e6a22 100755 --- a/tools/test.py +++ b/tools/test.py @@ -909,10 +909,11 @@ def GetTestStatus(self, context, sections, defs): TIMEOUT_SCALEFACTOR = { - 'arm' : { 'debug' : 8, 'release' : 3 }, # The ARM buildbots are slow. - 'ia32' : { 'debug' : 4, 'release' : 1 }, - 'ppc' : { 'debug' : 4, 'release' : 1 }, - 's390' : { 'debug' : 4, 'release' : 1 } } + 'arm' : { 'debug' : 8, 'release' : 3 }, # The ARM buildbots are slow. + 'riscv64' : { 'debug' : 8, 'release' : 3 }, # The riscv devices are slow. + 'ia32' : { 'debug' : 4, 'release' : 1 }, + 'ppc' : { 'debug' : 4, 'release' : 1 }, + 's390' : { 'debug' : 4, 'release' : 1 } } class Context(object): diff --git a/tools/utils.py b/tools/utils.py index d6dce5f7a52137..32a3b3dbcb824c 100644 --- a/tools/utils.py +++ b/tools/utils.py @@ -97,6 +97,8 @@ def GuessArchitecture(): return 'ppc' elif id == 's390x': return 's390' + elif id == 'riscv64': + return 'riscv64' else: id = platform.processor() if id == 'powerpc':