Skip to content

Commit cbcffa4

Browse files
authored
fixed ability to execute tests with/without isolation between tests
A proposition to fix codenameone#2054
1 parent db11145 commit cbcffa4

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Ports/JavaSE/src/com/codename1/impl/javase/TestRunner.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,14 @@ private TestRunner() {
4949
}
5050

5151
private void printUsage() {
52-
System.out.println("Usage: TestRunner mainClass [-testCases testCase1,testCase2...] [-skins skin1,skin2...] [-quiet] [-cleanMode]"
52+
System.out.println("Usage: TestRunner mainClass [-testCases testCase1,testCase2...] [-skins skin1,skin2...] [-quiet] [-noCleanMode]"
5353
+ "[-stopOnFail]\n\n"
5454
+ "mainClass - the main application class which is being tested, this is the full name for the lifecycle class.\n"
5555
+ "testCases - optional set of test cases to run using the full package/class name syntax and comma delimited. If "
5656
+ "ommitted all test cases will be executed.\n"
5757
+ "skins - the skins on which the test cases should be executed. If ommitted the default simulator skin is used.\n"
5858
+ "quietMode - when set the skin running the tests will not appear and the tests will be executed in the background\n"
59-
+ "cleanMode - clean mode executes every test in complete isolation from the previous test restarting the Classloader"
59+
+ "noCleanMode - when set executes every test without isolation from the previous test (by default, without this flag, it executes every test in complete isolation from the previous test restarting the Classloader)"
6060
+ "completely. Clean mode can't be used on the device so its only useful for debugging\n"
6161
+ "stopOnFail - indicates that execution should stop the moment a failure occured");
6262
}
@@ -92,12 +92,12 @@ private void init(String[] argv) {
9292
continue;
9393
}
9494

95-
if(s.equalsIgnoreCase("-cleanMode")) {
96-
cleanMode = true;
95+
if(s.equalsIgnoreCase("-noCleanMode")) {
96+
cleanMode = false;
9797
pos++;
9898
continue;
9999
}
100-
100+
101101
System.out.println("Unrecognized argument: " + s);
102102
printUsage();
103103
System.exit(1);

0 commit comments

Comments
 (0)