From a0b57808d05feebdb07b64ccc6e9b4819b22eeb6 Mon Sep 17 00:00:00 2001 From: Wesley Wigham Date: Thu, 24 May 2018 12:23:43 -0700 Subject: [PATCH] Dont count duplicated errors in case-insensitive duped files in rwc (#24383) --- src/harness/harness.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/harness/harness.ts b/src/harness/harness.ts index 2d2c90dcb5e..d57de0cb910 100644 --- a/src/harness/harness.ts +++ b/src/harness/harness.ts @@ -1469,7 +1469,14 @@ namespace Harness { // Verify we didn't miss any errors in this file assert.equal(markedErrorCount, fileErrors.length, "count of errors in " + inputFile.unitName); + const isDupe = dupeCase.has(sanitizeTestFilePath(inputFile.unitName)); yield [checkDuplicatedFileName(inputFile.unitName, dupeCase), outputLines, errorsReported]; + if (isDupe && !(options && options.caseSensitive)) { + // Case-duplicated files on a case-insensitive build will have errors reported in both the dupe and the original + // thanks to the canse-insensitive path comparison on the error file path - We only want to count those errors once + // for the assert below, so we subtract them here. + totalErrorsReportedInNonLibraryFiles -= errorsReported; + } outputLines = ""; errorsReported = 0; }