diff --git a/Gulpfile.js b/Gulpfile.js index 5f4f365915dda..7adec3238514e 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,12 @@ 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 +260,12 @@ 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); @@ -424,8 +438,8 @@ task("watch-local").flags = { const preTest = parallel(buildTsc, buildTests, buildServices, buildLssl); preTest.displayName = "preTest"; -const runTests = () => runConsoleTests("built/local/run.js", "mocha-fivemat-progress-reporter", /*runInParallel*/ false, /*watchMode*/ false); -task("runtests", series(preBuild, preTest, runTests)); +const runTests = () => runConsoleTests(testRunner, "mocha-fivemat-progress-reporter", /*runInParallel*/ false, /*watchMode*/ false); +task("runtests", series(/*preBuild, preTest,*/ runTests)); // 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.", @@ -443,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)); +const runTestsParallel = () => runConsoleTests(testRunner, "min", /*runInParallel*/ cmdLineOptions.workers > 1, /*watchMode*/ false); +task("runtests-parallel", series(/*preBuild, preTest,*/ runTestsParallel)); // 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 = { " --light": "Run tests in light mode (fewer verifications, but tests run faster).", @@ -592,10 +606,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)));