Skip to content

Commit

Permalink
ICE-6737 Improved gulp message if python not in PATH
Browse files Browse the repository at this point in the history
  • Loading branch information
dgboone committed Sep 18, 2015
1 parent fd91507 commit 1147986
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion js/gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
Expand Down Expand Up @@ -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()
{
Expand All @@ -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()
{
Expand Down

0 comments on commit 1147986

Please sign in to comment.