mirror of
https://github.com/Nikolay-Shirokov/cc-1c-skills.git
synced 2026-07-31 16:57:46 +03:00
test(runner): гейт кейса по ОС (osOnly)
Фейк платформы, написанный как .cmd, на macOS не исполняется ни одним портом — такие кейсы падали на маке вместо пропуска. runtimeOnly для этого не годится: ограничение не по порту, а по ОС. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
f6165c8d35
commit
c0b4f3fb3b
@@ -588,6 +588,12 @@ async function runCaseAsync(testCase, opts) {
|
||||
let workDir = null;
|
||||
let inputFile = null;
|
||||
|
||||
// osOnly: gate a case to one OS (e.g. a fake platform written as a .cmd cannot run on
|
||||
// macOS/Linux at all, whatever the port). Values are process.platform strings.
|
||||
if (caseData.osOnly && caseData.osOnly !== process.platform) {
|
||||
return { id: testCase.id, skill: testCase.skillDir, name: testCase.name, passed: true, skipped: true, errors: [], elapsed: '0.0s' };
|
||||
}
|
||||
|
||||
// runtimeOnly: gate a case to a single port (e.g. a .cmd fake platform only runs via
|
||||
// PowerShell's Start-Process; python's list-exec can't launch it). Skipped elsewhere.
|
||||
if (caseData.runtimeOnly && caseData.runtimeOnly !== opts.runtime) {
|
||||
|
||||
Reference in New Issue
Block a user