Add ssh command "test-submit-rule"

The command creates a fresh prolog environment and loads a prolog script
either from stdin or rules.pl in the project refs/meta/config branch
depending on the options used.
can_submit/1 is then queried and the results are returned in human
readable text or json.

Change-Id: I246a89f9f35718320b69ec43ddf11fbe002ed566
This commit is contained in:
Johan Björk
2012-08-02 15:57:13 +02:00
parent 7fcb0f2dce
commit 20ae0696b3
5 changed files with 338 additions and 1 deletions

View File

@@ -571,7 +571,7 @@ public class ChangeControl {
&& who.arg(0).isInteger();
}
private static Term toListTerm(List<Term> terms) {
public static Term toListTerm(List<Term> terms) {
Term list = Prolog.Nil;
for (int i = terms.size() - 1; i >= 0; i--) {
list = new ListTerm(terms.get(i), list);