diff --git a/Jakefile.js b/Jakefile.js index 087bbb675117c..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; @@ -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); }); 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"); } 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); });