Initiate Rascal tests from shell for CI purposes

If I want to start all tests within a module, I simply write:

> import Example;
> :test

and all of the test bool functions run. However, I want to start them using the Rascal .jar for CI purposes. Is there any flag that I can use? For example:

$ rascal.jar TestsModule --test

Or any alternative solution so I can run my Rascal tests for CI purposes?

Upvotes: 4

Views: 137

Answers (1)

Davy Landman
Davy Landman

Reputation: 15439

At the moment, not yet from the command line. For the (almost finished) compiler backend we now have --rascalTests <modules> but for now that won't solve your problem.

If your CI supports JUnit style tests, we have added a JUnit compatible layer around the rascal tests. For example this class runs all the tests in the Rascal modules in the lang::rascal::tests::basic package.

Another way to make it work is to pipe commands into the rascal-shell?

$ echo -e "import IO;\n println(\"Hello World\");\n:quit\n" | java -jar rascal-shell-unstable.jar
Version: 0.8.0.201604121603
rascal>import IO;
ok
rascal> println("Hello World");
Hello World
ok
rascal>:quit
Quiting REPL
$

Upvotes: 3

Related Questions