Skip to content

Commit a41a276

Browse files
authored
Fix baseline-accept-rwc (#30052)
1 parent 999eb0b commit a41a276

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

Gulpfile.js

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -473,22 +473,23 @@ task("diff").description = "Diffs the compiler baselines using the diff tool spe
473473
task("diff-rwc", () => exec(getDiffTool(), [refRwcBaseline, localRwcBaseline], { ignoreExitCode: true }));
474474
task("diff-rwc").description = "Diffs the RWC baselines using the diff tool specified by the 'DIFF' environment variable";
475475

476-
const baselineAccept = subfolder => merge2(
477-
src([`${localBaseline}${subfolder ? `${subfolder}/` : ``}**`, `!${localBaseline}${subfolder}/**/*.delete`], { base: localBaseline })
476+
/**
477+
* @param {string} localBaseline Path to the local copy of the baselines
478+
* @param {string} refBaseline Path to the reference copy of the baselines
479+
*/
480+
const baselineAccept = (localBaseline, refBaseline) => merge2(
481+
src([`${localBaseline}/**`, `!${localBaseline}/**/*.delete`], { base: localBaseline })
478482
.pipe(dest(refBaseline)),
479-
src([`${localBaseline}${subfolder ? `${subfolder}/` : ``}**/*.delete`], { base: localBaseline, read: false })
483+
src([`${localBaseline}/**/*.delete`], { base: localBaseline, read: false })
480484
.pipe(rm())
481485
.pipe(rename({ extname: "" }))
482486
.pipe(rm(refBaseline)));
483-
task("baseline-accept", () => baselineAccept(""));
487+
task("baseline-accept", () => baselineAccept(localBaseline, refBaseline));
484488
task("baseline-accept").description = "Makes the most recent test results the new baseline, overwriting the old baseline";
485489

486-
task("baseline-accept-rwc", () => baselineAccept("rwc"));
490+
task("baseline-accept-rwc", () => baselineAccept(localRwcBaseline, refRwcBaseline));
487491
task("baseline-accept-rwc").description = "Makes the most recent rwc test results the new baseline, overwriting the old baseline";
488492

489-
task("baseline-accept-test262", () => baselineAccept("test262"));
490-
task("baseline-accept-test262").description = "Makes the most recent test262 test results the new baseline, overwriting the old baseline";
491-
492493
// TODO(rbuckton): Determine if 'webhost' is still in use.
493494
const buildWebHost = () => buildProject("tests/webhost/webtsc.tsconfig.json");
494495
task("webhost", series(lkgPreBuild, buildWebHost));

0 commit comments

Comments
 (0)