diff --git a/src/harness/rwcRunner.ts b/src/harness/rwcRunner.ts index a1dc50349e4..cddb9b19d4a 100644 --- a/src/harness/rwcRunner.ts +++ b/src/harness/rwcRunner.ts @@ -90,9 +90,16 @@ namespace RWC { ts.setConfigFileInOptions(opts.options, configParseResult.options.configFile); } - // Load the files + // Deduplicate files so they are only printed once in baselines (they are deduplicated within the compiler already) + const uniqueNames = ts.createMap(); for (const fileName of fileNames) { - inputFiles.push(getHarnessCompilerInputUnit(fileName)); + // Must maintain order, build result list while checking map + const normalized = ts.normalizeSlashes(fileName); + if (!uniqueNames.has(normalized)) { + uniqueNames.set(normalized, true); + // Load the file + inputFiles.push(getHarnessCompilerInputUnit(fileName)); + } } // Add files to compilation