From 52c782ff1f492eaca504619cd39053b51cdc0f5b Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9my=20Lal?= Date: Tue, 15 Nov 2022 03:51:54 +0000 Subject: [PATCH] test shoots itself in the foot with isPi Forwarded: https://github.com/nodejs/node/issues/44840 Last-Update: 2022-10-01 Gbp-Pq: Topic armel Gbp-Pq: Name nopi.patch --- test/common/index.js | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/test/common/index.js b/test/common/index.js index 2d24b9432..e3679f287 100644 --- a/test/common/index.js +++ b/test/common/index.js @@ -121,15 +121,7 @@ const isOpenBSD = process.platform === 'openbsd'; const isLinux = process.platform === 'linux'; const isOSX = process.platform === 'darwin'; const isPi = (() => { - try { - // Normal Raspberry Pi detection is to find the `Raspberry Pi` string in - // the contents of `/sys/firmware/devicetree/base/model` but that doesn't - // work inside a container. Match the chipset model number instead. - const cpuinfo = fs.readFileSync('/proc/cpuinfo', { encoding: 'utf8' }); - return /^Hardware\s*:\s*(.*)$/im.exec(cpuinfo)?.[1] === 'BCM2835'; - } catch { - return false; - } + return false; })(); const isDumbTerminal = process.env.TERM === 'dumb'; -- 2.30.2