From 9009da225c75bdb1d100b1f9bb2af6acae29863e Mon Sep 17 00:00:00 2001 From: Mohamed Hegazy Date: Mon, 21 Nov 2016 17:25:31 -0800 Subject: [PATCH 1/4] Update baseline-accept configuration --- Jakefile.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/Jakefile.js b/Jakefile.js index 087bbb675117c..24d1cc3c79ed3 100644 --- a/Jakefile.js +++ b/Jakefile.js @@ -1086,12 +1086,10 @@ task("tests-debug", ["setDebugMode", "tests"]); // Makes the test results the new baseline desc("Makes the most recent test results the new baseline, overwriting the old baseline"); task("baseline-accept", function () { - acceptBaseline(""); + acceptBaseline(localBaseline, refBaseline); }); -function acceptBaseline(containerFolder) { - var sourceFolder = path.join(localBaseline, containerFolder); - var targetFolder = path.join(refBaseline, containerFolder); +function acceptBaseline(sourceFolder, targetFolder) { console.log('Accept baselines from ' + sourceFolder + ' to ' + targetFolder); var files = fs.readdirSync(sourceFolder); var deleteEnding = '.delete'; @@ -1115,12 +1113,12 @@ function acceptBaseline(containerFolder) { desc("Makes the most recent rwc test results the new baseline, overwriting the old baseline"); task("baseline-accept-rwc", function () { - acceptBaseline("rwc"); + acceptBaseline(localRwcBaseline, refRwcBaseline); }); desc("Makes the most recent test262 test results the new baseline, overwriting the old baseline"); task("baseline-accept-test262", function () { - acceptBaseline("test262"); + acceptBaseline(localTest262Baseline, refTest262Baseline); }); From 843d08b5af6a31c2c3c92f57bfbe0abad6e53e77 Mon Sep 17 00:00:00 2001 From: Mohamed Hegazy Date: Mon, 21 Nov 2016 17:25:38 -0800 Subject: [PATCH 2/4] increase timeout --- Jakefile.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jakefile.js b/Jakefile.js index 24d1cc3c79ed3..3454ca8ae30aa 100644 --- a/Jakefile.js +++ b/Jakefile.js @@ -930,7 +930,7 @@ function runConsoleTests(defaultReporter, runInParallel) { } if (tests && tests.toLocaleLowerCase() === "rwc") { - testTimeout = 400000; + testTimeout = 800000; } colors = process.env.colors || process.env.color; From 5403ce62ed0df80177d664c0ab77d6a62c672d28 Mon Sep 17 00:00:00 2001 From: Mohamed Hegazy Date: Mon, 21 Nov 2016 17:26:10 -0800 Subject: [PATCH 3/4] normalize path in harness --- src/harness/harness.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/harness/harness.ts b/src/harness/harness.ts index 88346557ba7c2..26a4a6f963dc9 100644 --- a/src/harness/harness.ts +++ b/src/harness/harness.ts @@ -2015,7 +2015,7 @@ namespace Harness { export function isDefaultLibraryFile(filePath: string): boolean { // We need to make sure that the filePath is prefixed with "lib." not just containing "lib." and end with ".d.ts" - const fileName = ts.getBaseFileName(filePath); + const fileName = ts.getBaseFileName(ts.normalizeSlashes(filePath)); return ts.startsWith(fileName, "lib.") && ts.endsWith(fileName, ".d.ts"); } From b8b6e6149194e6c99b752de469334a676a91a975 Mon Sep 17 00:00:00 2001 From: Mohamed Hegazy Date: Mon, 21 Nov 2016 17:26:18 -0800 Subject: [PATCH 4/4] handel missing files gracefully --- 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 9f9bf8589f08a..44d2c981c8476 100644 --- a/src/harness/rwcRunner.ts +++ b/src/harness/rwcRunner.ts @@ -199,7 +199,7 @@ namespace RWC { } // Do not include the library in the baselines to avoid noise const baselineFiles = inputFiles.concat(otherFiles).filter(f => !Harness.isDefaultLibraryFile(f.unitName)); - const errors = compilerResult.errors.filter(e => !Harness.isDefaultLibraryFile(e.file.fileName)); + const errors = compilerResult.errors.filter(e => e.file && !Harness.isDefaultLibraryFile(e.file.fileName)); return Harness.Compiler.getErrorBaseline(baselineFiles, errors); }, baselineOpts); });