Skip to content
Browse files

Adding a test task to the Jakefile that runs all tests.

  • Loading branch information...
1 parent eb83d6f commit 525bfe2d4329439000a9dd87062f234b71a74c06 @hammerdr hammerdr committed
Showing with 12 additions and 1 deletion.
  1. +12 −1 Jakefile
View
13 Jakefile
@@ -4,6 +4,7 @@ JAKE = require("jake");
SYSTEM = require("system");
FILE = require("file");
OS = require("os");
+FileList = JAKE.FileList;
JAKE.task ("docs", ["documentation"]);
@@ -21,10 +22,20 @@ JAKE.task ("documentation", function()
print("doxygen not installed. skipping documentation generation.");
});
+JAKE.task("test", function(){
+ var tests = new FileList('Test/*Test.j');
+ var cmd = ["ojtest"].concat(tests.items());
+ var cmdString = cmd.map(OS.enquote).join(" ");
+
+ var code = OS.system(cmdString);
+ if (code !== 0)
+ OS.exit(code);
+});
+
executableExists = function(/*String*/ aFileName)
{
return SYSTEM.env["PATH"].split(':').some(function(/*String*/ aPath)
{
return FILE.exists(FILE.join(aPath, aFileName));
});
-}
+}

0 comments on commit 525bfe2

Please sign in to comment.
Something went wrong with that request. Please try again.