From 2f8071e58d8182b9d9ba72599889d262363f3efc Mon Sep 17 00:00:00 2001 From: ArchFeh Date: Sun, 10 Apr 2022 00:02:58 +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 --- 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 9a7de5ed24d706..dc35f490e6ff17 100755 --- a/tools/test.py +++ b/tools/test.py @@ -896,10 +896,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 9d53bd56bd1036..2d800f1046cc8e 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':