Skip to content

Commit

Permalink
feat: Use main class for fast tests if there is any
Browse files Browse the repository at this point in the history
  • Loading branch information
Borja Lorente committed Nov 16, 2023
1 parent 1e5adf2 commit 6468dfb
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,11 @@ GeneralCommandLine createCommandLine(
getTestClassProperty(),
FastBuildTestClassFinder.getInstance(project).getTestClass(target, targetJavaInfo));

commandBuilder.setMainClass(getTestRunner());
if (targetJavaInfo.mainClass().isPresent()) {
commandBuilder.setMainClass(targetJavaInfo.mainClass().get());
} else {
commandBuilder.setMainClass(getTestRunner());
}

commandBuilder
.addEnvironmentVariable(TEST_BINARY_VARIABLE, getTestBinary(target))
Expand Down

0 comments on commit 6468dfb

Please sign in to comment.