From a41a27694ac9ca2848fb83cc0a5414c4c2c5338e Mon Sep 17 00:00:00 2001 From: Wesley Wigham Date: Fri, 22 Feb 2019 13:12:11 -0800 Subject: [PATCH] Fix baseline-accept-rwc (#30052) --- Gulpfile.js | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/Gulpfile.js b/Gulpfile.js index 3367010f6bd..93770f9d498 100644 --- a/Gulpfile.js +++ b/Gulpfile.js @@ -473,22 +473,23 @@ task("diff").description = "Diffs the compiler baselines using the diff tool spe task("diff-rwc", () => exec(getDiffTool(), [refRwcBaseline, localRwcBaseline], { ignoreExitCode: true })); task("diff-rwc").description = "Diffs the RWC baselines using the diff tool specified by the 'DIFF' environment variable"; -const baselineAccept = subfolder => merge2( - src([`${localBaseline}${subfolder ? `${subfolder}/` : ``}**`, `!${localBaseline}${subfolder}/**/*.delete`], { base: localBaseline }) +/** + * @param {string} localBaseline Path to the local copy of the baselines + * @param {string} refBaseline Path to the reference copy of the baselines + */ +const baselineAccept = (localBaseline, refBaseline) => merge2( + src([`${localBaseline}/**`, `!${localBaseline}/**/*.delete`], { base: localBaseline }) .pipe(dest(refBaseline)), - src([`${localBaseline}${subfolder ? `${subfolder}/` : ``}**/*.delete`], { base: localBaseline, read: false }) + src([`${localBaseline}/**/*.delete`], { base: localBaseline, read: false }) .pipe(rm()) .pipe(rename({ extname: "" })) .pipe(rm(refBaseline))); -task("baseline-accept", () => baselineAccept("")); +task("baseline-accept", () => baselineAccept(localBaseline, refBaseline)); task("baseline-accept").description = "Makes the most recent test results the new baseline, overwriting the old baseline"; -task("baseline-accept-rwc", () => baselineAccept("rwc")); +task("baseline-accept-rwc", () => baselineAccept(localRwcBaseline, refRwcBaseline)); task("baseline-accept-rwc").description = "Makes the most recent rwc test results the new baseline, overwriting the old baseline"; -task("baseline-accept-test262", () => baselineAccept("test262")); -task("baseline-accept-test262").description = "Makes the most recent test262 test results the new baseline, overwriting the old baseline"; - // TODO(rbuckton): Determine if 'webhost' is still in use. const buildWebHost = () => buildProject("tests/webhost/webtsc.tsconfig.json"); task("webhost", series(lkgPreBuild, buildWebHost));