Skip to content

Commit 2d16b19

Browse files
authored
Merge pull request #12431 from Microsoft/rwcFixes
Rwc fixes
2 parents 77c0540 + b8b6e61 commit 2d16b19

File tree

3 files changed

+7
-9
lines changed

3 files changed

+7
-9
lines changed

Jakefile.js

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -930,7 +930,7 @@ function runConsoleTests(defaultReporter, runInParallel) {
930930
}
931931

932932
if (tests && tests.toLocaleLowerCase() === "rwc") {
933-
testTimeout = 400000;
933+
testTimeout = 800000;
934934
}
935935

936936
colors = process.env.colors || process.env.color;
@@ -1086,12 +1086,10 @@ task("tests-debug", ["setDebugMode", "tests"]);
10861086
// Makes the test results the new baseline
10871087
desc("Makes the most recent test results the new baseline, overwriting the old baseline");
10881088
task("baseline-accept", function () {
1089-
acceptBaseline("");
1089+
acceptBaseline(localBaseline, refBaseline);
10901090
});
10911091

1092-
function acceptBaseline(containerFolder) {
1093-
var sourceFolder = path.join(localBaseline, containerFolder);
1094-
var targetFolder = path.join(refBaseline, containerFolder);
1092+
function acceptBaseline(sourceFolder, targetFolder) {
10951093
console.log('Accept baselines from ' + sourceFolder + ' to ' + targetFolder);
10961094
var files = fs.readdirSync(sourceFolder);
10971095
var deleteEnding = '.delete';
@@ -1115,12 +1113,12 @@ function acceptBaseline(containerFolder) {
11151113

11161114
desc("Makes the most recent rwc test results the new baseline, overwriting the old baseline");
11171115
task("baseline-accept-rwc", function () {
1118-
acceptBaseline("rwc");
1116+
acceptBaseline(localRwcBaseline, refRwcBaseline);
11191117
});
11201118

11211119
desc("Makes the most recent test262 test results the new baseline, overwriting the old baseline");
11221120
task("baseline-accept-test262", function () {
1123-
acceptBaseline("test262");
1121+
acceptBaseline(localTest262Baseline, refTest262Baseline);
11241122
});
11251123

11261124

src/harness/harness.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2015,7 +2015,7 @@ namespace Harness {
20152015

20162016
export function isDefaultLibraryFile(filePath: string): boolean {
20172017
// We need to make sure that the filePath is prefixed with "lib." not just containing "lib." and end with ".d.ts"
2018-
const fileName = ts.getBaseFileName(filePath);
2018+
const fileName = ts.getBaseFileName(ts.normalizeSlashes(filePath));
20192019
return ts.startsWith(fileName, "lib.") && ts.endsWith(fileName, ".d.ts");
20202020
}
20212021

src/harness/rwcRunner.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ namespace RWC {
199199
}
200200
// Do not include the library in the baselines to avoid noise
201201
const baselineFiles = inputFiles.concat(otherFiles).filter(f => !Harness.isDefaultLibraryFile(f.unitName));
202-
const errors = compilerResult.errors.filter(e => !Harness.isDefaultLibraryFile(e.file.fileName));
202+
const errors = compilerResult.errors.filter(e => e.file && !Harness.isDefaultLibraryFile(e.file.fileName));
203203
return Harness.Compiler.getErrorBaseline(baselineFiles, errors);
204204
}, baselineOpts);
205205
});

0 commit comments

Comments
 (0)