mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-15 12:51:30 -05:00
12
Jakefile.js
12
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);
|
||||
});
|
||||
|
||||
|
||||
|
||||
@@ -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");
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user