When ci-test-scope falls back to the 'unit' sentinel (#408 intent) and ci-prepare-test-scope writes it verbatim, run-tests --files-from received a bare 'unit' token that was not a filename, causing exit 2 with "requested test file(s) not found: unit". selectExplicitFiles() now recognises any SUITES member and delegates to the existing selectFiles() resolver before the path-existence check, reusing the suite expansion logic rather than reimplementing it. Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -161,7 +161,15 @@ function selectExplicitFiles(allFiles, filesValue, filesFrom) {
|
||||
const selected = [];
|
||||
const missing = [];
|
||||
for (const file of requested) {
|
||||
if (available.has(file)) {
|
||||
// If the token is a bare suite name (e.g. "unit" written by ci-test-scope
|
||||
// as the #408 fallback sentinel), delegate to the existing suite resolver
|
||||
// rather than treating it as a filename. This prevents the
|
||||
// "requested test file(s) not found: unit" crash (#641).
|
||||
if (SUITES.includes(file)) {
|
||||
for (const f of selectFiles(allFiles, file)) {
|
||||
selected.push(f);
|
||||
}
|
||||
} else if (available.has(file)) {
|
||||
selected.push(file);
|
||||
} else {
|
||||
missing.push(file);
|
||||
|
||||
Reference in New Issue
Block a user