test shoots itself in the foot with isPi
authorJérémy Lal <kapouer@melix.org>
Tue, 15 Nov 2022 03:51:54 +0000 (03:51 +0000)
committerPeter Michael Green <plugwash@raspbian.org>
Tue, 15 Nov 2022 03:51:54 +0000 (03:51 +0000)
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

index 2d24b94326d8e516bd04ed1d3facd122ad3b120c..e3679f2872402aa9536b1c3b14d7529cbcb1035c 100644 (file)
@@ -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';