()
| 185 | const isRiscv64 = process.arch === 'riscv64'; |
| 186 | const isDebug = process.features.debug; |
| 187 | function isPi() { |
| 188 | try { |
| 189 | // Normal Raspberry Pi detection is to find the `Raspberry Pi` string in |
| 190 | // the contents of `/sys/firmware/devicetree/base/model` but that doesn't |
| 191 | // work inside a container. Match the chipset model number instead. |
| 192 | const cpuinfo = fs.readFileSync('/proc/cpuinfo', { encoding: 'utf8' }); |
| 193 | const ok = /^Hardware\s*:\s*(.*)$/im.exec(cpuinfo)?.[1] === 'BCM2835'; |
| 194 | /^/.test(''); // Clear RegExp.$_, some tests expect it to be empty. |
| 195 | return ok; |
| 196 | } catch { |
| 197 | return false; |
| 198 | } |
| 199 | } |
| 200 | |
| 201 | // When using high concurrency or in the CI we need much more time for each connection attempt. |
| 202 | // Default 500ms becomes 2500ms for tests. |
no test coverage detected
searching dependent graphs…