Skip to content

Commit

Permalink
hotfix: add new options in EntryPoint and ParserOptions
Browse files Browse the repository at this point in the history
  • Loading branch information
danglotb committed Feb 11, 2022
1 parent 74cf89b commit adb1c99
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/main/java/eu/stamp_project/testrunner/EntryPoint.java
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,8 @@ public static TestResult runTests(String classpath, String[] fullQualifiedNameOf
+ String.join(ConstantsHelper.PATH_SEPARATOR, methodNames)),
EntryPoint.blackList.isEmpty() ? ""
: (ParserOptions.FLAG_blackList + ConstantsHelper.WHITE_SPACE
+ String.join(ConstantsHelper.PATH_SEPARATOR, EntryPoint.blackList))
+ String.join(ConstantsHelper.PATH_SEPARATOR, EntryPoint.blackList)),
ParserOptions.FLAG_nbFailingLoadClass, "" + nbFailingLoadClass
}
);
return EntryPoint.runTests(javaCommand);
Expand Down Expand Up @@ -353,6 +354,7 @@ public static Coverage runCoverage(String classpath,
EntryPoint.coverageDetail == ParserOptions.CoverageTransformerDetail.SUMMARIZED ? "" :
(ParserOptions.FLAG_coverage_detail + ConstantsHelper.WHITE_SPACE
+ EntryPoint.coverageDetail.name()),
ParserOptions.FLAG_nbFailingLoadClass, "" + nbFailingLoadClass
});
return EntryPoint.runCoverage(javaCommand);
}
Expand Down Expand Up @@ -460,6 +462,7 @@ public static CoveragePerTestMethod runCoveragePerTestMethods(String classpath,
EntryPoint.coverageDetail == ParserOptions.CoverageTransformerDetail.SUMMARIZED ? "" :
(ParserOptions.FLAG_coverage_detail + ConstantsHelper.WHITE_SPACE
+ EntryPoint.coverageDetail.name()),
ParserOptions.FLAG_nbFailingLoadClass, "" + nbFailingLoadClass
});
try {
EntryPoint.runGivenCommandLine(javaCommand);
Expand Down Expand Up @@ -564,6 +567,7 @@ public static CoveredTestResultPerTestMethod runCoveredTestResultPerTestMethods(
EntryPoint.coverageDetail == ParserOptions.CoverageTransformerDetail.SUMMARIZED ? "" :
(ParserOptions.FLAG_coverage_detail + ConstantsHelper.WHITE_SPACE
+ EntryPoint.coverageDetail.name()),
ParserOptions.FLAG_nbFailingLoadClass, "" + nbFailingLoadClass
});
try {
EntryPoint.runGivenCommandLine(javaCommand);
Expand Down Expand Up @@ -657,6 +661,7 @@ public static CoveredTestResultPerTestMethod runOnlineCoveredTestResultPerTestMe
EntryPoint.coverageDetail == ParserOptions.CoverageTransformerDetail.SUMMARIZED ? "" :
(ParserOptions.FLAG_coverage_detail + ConstantsHelper.WHITE_SPACE
+ EntryPoint.coverageDetail.name()),
ParserOptions.FLAG_nbFailingLoadClass, "" + nbFailingLoadClass
});
try {
EntryPoint.runGivenCommandLine(javaCommand);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ public static ParserOptions parse(String[] args) {
case FLAG_coverage_detail:
parserOptions.coverageTransformerDetail = CoverageTransformerDetail.valueOf(args[++i]);
break;
case FLAG_nbFailingLoadClass:
parserOptions.nbFailingLoadClass = Integer.parseInt(args[++i]);
break;
case " ":
case "":
break;
Expand Down Expand Up @@ -83,6 +86,9 @@ private static void usage() {
usage.append(FLAG_coverage_detail).append(ConstantsHelper.WHITE_SPACE)
.append(FLAG_HELP_coverage_detail).append(ConstantsHelper.LINE_SEPARATOR);

usage.append(FLAG_nbFailingLoadClass).append(ConstantsHelper.WHITE_SPACE)
.append(FLAG_HELP_nbFailingLoadClass).append(ConstantsHelper.LINE_SEPARATOR);

System.out.println(usage.toString());
}

Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit adb1c99

Please sign in to comment.