Files
RuView/harness/ruview/test/helpers/python.mjs
T
ruv 3620abff12 fix(toolkit): integrate capture and device corrections for 0.9.2
Integrate reviewed source PRs #2201-#2223, #2225-#2231, #2235-#2240, #2242 and #2243 (firmware README hunks remain in #2247). Regenerate one package manifest after integration, validate native Windows test execution, bound MTK listener startup, support official C6 release bundles, and retain stronger release metadata gates.
2026-10-12 11:49:52 -04:00

12 lines
550 B
JavaScript

import { spawnSync } from 'node:child_process';
// Windows commonly installs python.exe without a python3.exe alias.
const candidates = process.platform === 'win32' ? ['python', 'python3'] : ['python3', 'python'];
export const python = candidates.find(command => {
const result = spawnSync(command, ['-c', 'import sys; assert sys.version_info >= (3, 9)'], {
stdio: 'ignore', timeout: 5000, windowsHide: true,
});
return result.status === 0;
});
if (!python) throw new Error('Capture regression tests require Python 3.9 or newer on PATH');