From 342279b29e42d55f44021a9076d88dca870e73b9 Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Tue, 31 May 2022 11:00:25 -0700 Subject: [PATCH] Add TODOs in Gulpfile --- Gulpfile.js | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/Gulpfile.js b/Gulpfile.js index 7f527a93a0b57..9eb06af3f68cb 100644 --- a/Gulpfile.js +++ b/Gulpfile.js @@ -19,6 +19,8 @@ const cmdLineOptions = require("./scripts/build/options"); const copyright = "CopyrightNotice.txt"; const cleanTasks = []; +const testRunner = "./built/local/testRunner/_namespaces/Harness.js" + const buildScripts = () => buildProject("scripts"); task("scripts", buildScripts); task("scripts").description = "Builds files in the 'scripts' folder."; @@ -119,6 +121,9 @@ const localPreBuild = parallel(generateLibs, series(buildScripts, generateDiagno const preBuild = cmdLineOptions.lkg ? lkgPreBuild : localPreBuild; const buildServices = (() => { + // TODO(jakebailey): fix this for modules + return cb => { console.log("!!!TODO!!! buildServices"); cb(); }; + // build typescriptServices.out.js const buildTypescriptServicesOut = () => buildProject("src/typescriptServices/tsconfig.json", cmdLineOptions); @@ -252,6 +257,9 @@ task("watch-min").flags = { }; const buildLssl = (() => { + // TODO(jakebailey): fix this for modules + return cb => { console.log("!!!TODO!!! buildLssl"); cb(); }; + // build tsserverlibrary.out.js const buildServerLibraryOut = () => buildProject("src/tsserverlibrary/tsconfig.json", cmdLineOptions); @@ -429,8 +437,8 @@ preTest.displayName = "preTest"; const postTest = (done) => cmdLineOptions.lint ? lint() : done(); -const runTests = () => runConsoleTests("built/local/run.js", "mocha-fivemat-progress-reporter", /*runInParallel*/ false, /*watchMode*/ false); -task("runtests", series(preBuild, preTest, runTests, postTest)); +const runTests = () => runConsoleTests(testRunner, "mocha-fivemat-progress-reporter", /*runInParallel*/ false, /*watchMode*/ false); +task("runtests", series(/*preBuild, preTest,*/ runTests /*, postTest*/)); // TODO(jakebailey): fix this for modules task("runtests").description = "Runs the tests using the built run.js file."; task("runtests").flags = { "-t --tests=": "Pattern for tests to run.", @@ -449,8 +457,8 @@ task("runtests").flags = { " --shardId": "1-based ID of this shard (default: 1)", }; -const runTestsParallel = () => runConsoleTests("built/local/run.js", "min", /*runInParallel*/ cmdLineOptions.workers > 1, /*watchMode*/ false); -task("runtests-parallel", series(preBuild, preTest, runTestsParallel, postTest)); +const runTestsParallel = () => runConsoleTests(testRunner, "min", /*runInParallel*/ cmdLineOptions.workers > 1, /*watchMode*/ false); +task("runtests-parallel", series(/*preBuild, preTest,*/ runTestsParallel /*, postTest*/)); // TODO(jakebailey): fix this for modules task("runtests-parallel").description = "Runs all the tests in parallel using the built run.js file."; task("runtests-parallel").flags = { " --no-lint": "disables lint.", @@ -599,10 +607,10 @@ task("publish-nightly").description = "Runs `npm publish --tag next` to create a // write some kind of trigger file that indicates build completion that we could listen for instead. const watchRuntests = () => watch(["built/local/*.js", "tests/cases/**/*.ts", "tests/cases/**/tsconfig.json"], { delay: 5000 }, async () => { if (cmdLineOptions.tests || cmdLineOptions.failed) { - await runConsoleTests("built/local/run.js", "mocha-fivemat-progress-reporter", /*runInParallel*/ false, /*watchMode*/ true); + await runConsoleTests(testRunner, "mocha-fivemat-progress-reporter", /*runInParallel*/ false, /*watchMode*/ true); } else { - await runConsoleTests("built/local/run.js", "min", /*runInParallel*/ true, /*watchMode*/ true); + await runConsoleTests(testRunner, "min", /*runInParallel*/ true, /*watchMode*/ true); } }); task("watch", series(preBuild, preTest, parallel(watchLib, watchDiagnostics, watchServices, watchLssl, watchTests, watchRuntests)));