From bc13d840b07fff7c9ecda0492dcdc33a927867b3 Mon Sep 17 00:00:00 2001 From: Wesley Wigham Date: Fri, 25 Aug 2017 10:10:52 -0700 Subject: [PATCH 1/2] Always use case-insensitive fs operartions for RWC --- src/harness/rwcRunner.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/harness/rwcRunner.ts b/src/harness/rwcRunner.ts index cddb9b19d4a4b..ef19283f8883d 100644 --- a/src/harness/rwcRunner.ts +++ b/src/harness/rwcRunner.ts @@ -79,7 +79,7 @@ namespace RWC { tsconfigFiles.push({ unitName: tsconfigFile.path, content: tsconfigFileContents.content }); const parsedTsconfigFileContents = ts.parseJsonText(tsconfigFile.path, tsconfigFileContents.content); const configParseHost: ts.ParseConfigHost = { - useCaseSensitiveFileNames: Harness.IO.useCaseSensitiveFileNames(), + useCaseSensitiveFileNames: false, fileExists: Harness.IO.fileExists, readDirectory: Harness.IO.readDirectory, readFile: Harness.IO.readFile From 0a7b12290c52f4a7bb383475fdbcad2afe910a00 Mon Sep 17 00:00:00 2001 From: Wesley Wigham Date: Fri, 25 Aug 2017 17:34:47 -0700 Subject: [PATCH 2/2] wrappedIO handles case sensitivity checks --- src/harness/loggedIO.ts | 5 ++++- src/harness/rwcRunner.ts | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/harness/loggedIO.ts b/src/harness/loggedIO.ts index f113b9ddb9db8..42519c729e5c6 100644 --- a/src/harness/loggedIO.ts +++ b/src/harness/loggedIO.ts @@ -70,6 +70,7 @@ interface IOLog { depth: number, result: ReadonlyArray, }[]; + useCaseSensitiveFileNames?: boolean; } interface PlaybackControl { @@ -151,7 +152,7 @@ namespace Playback { wrapper.startRecord = (fileNameBase) => { recordLogFileNameBase = fileNameBase; recordLog = createEmptyLog(); - + recordLog.useCaseSensitiveFileNames = typeof underlying.useCaseSensitiveFileNames === "function" ? underlying.useCaseSensitiveFileNames() : underlying.useCaseSensitiveFileNames; if (typeof underlying.args !== "function") { recordLog.arguments = underlying.args; } @@ -249,6 +250,8 @@ namespace Playback { } underlying.exit(exitCode); }; + + wrapper.useCaseSensitiveFileNames = () => !!recordLog.useCaseSensitiveFileNames; } function recordReplay(original: T, underlying: any) { diff --git a/src/harness/rwcRunner.ts b/src/harness/rwcRunner.ts index ef19283f8883d..cddb9b19d4a4b 100644 --- a/src/harness/rwcRunner.ts +++ b/src/harness/rwcRunner.ts @@ -79,7 +79,7 @@ namespace RWC { tsconfigFiles.push({ unitName: tsconfigFile.path, content: tsconfigFileContents.content }); const parsedTsconfigFileContents = ts.parseJsonText(tsconfigFile.path, tsconfigFileContents.content); const configParseHost: ts.ParseConfigHost = { - useCaseSensitiveFileNames: false, + useCaseSensitiveFileNames: Harness.IO.useCaseSensitiveFileNames(), fileExists: Harness.IO.fileExists, readDirectory: Harness.IO.readDirectory, readFile: Harness.IO.readFile