From: Jérémy Lal Date: Tue, 15 Nov 2022 03:51:54 +0000 (+0000) Subject: test shoots itself in the foot with isPi X-Git-Tag: archive/raspbian/18.12.1+dfsg-2+rpi1~3 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=52c782ff1f492eaca504619cd39053b51cdc0f5b;p=nodejs.git 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 --- 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';