diff options
Diffstat (limited to 'js/gulpfile.js')
-rw-r--r-- | js/gulpfile.js | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/js/gulpfile.js b/js/gulpfile.js index 7417cef61a2..bd59ea2716f 100644 --- a/js/gulpfile.js +++ b/js/gulpfile.js @@ -218,7 +218,7 @@ tests.forEach( return gulp.src(path.join(name, ".depend")) .pipe(paths(del)); }); - + gulp.task(testCleanTask(name), [testCleanDependTask(name)], function(){ return gulp.src(path.join(name, "*.ice")) @@ -385,6 +385,18 @@ gulp.task("test:run-with-browser", ["watch"].concat(useBinDist ? ["test"] : ["bu require("./bin/HttpServer")(); var p = require("child_process").spawn("python", ["../scripts/TestController.py"], {stdio: "inherit"}); + p.on("error", function(err) + { + if(err.message == "spawn python ENOENT") + { + console.log("Error: python is required in PATH to run tests") + process.exit(1) + } + else + { + throw err; + } + }); process.on(process.platform == "win32" ? "SIGBREAK" : "SIGINT", function() { @@ -401,6 +413,18 @@ gulp.task("test:run-with-browser", ["watch"].concat(useBinDist ? ["test"] : ["bu gulp.task("test:run-with-node", (useBinDist ? ["test"] : ["build"]), function(){ var p = require("child_process").spawn("python", ["allTests.py", "--all"], {stdio: "inherit"}); + p.on("error", function(err) + { + if(err.message == "spawn python ENOENT") + { + console.log("Error: python is required in PATH to run tests") + process.exit(1) + } + else + { + throw err; + } + }); process.on(process.platform == "win32" ? "SIGBREAK" : "SIGINT", function() { |