.setKarmaPackageDirPath(myKarmaPackageDirPath)
.setRunSettings(myRunSettings)
.setWithCoverage(myExecutionType == KarmaExecutionType.COVERAGE)
.build();
KarmaServerRegistry registry = KarmaServerRegistry.getInstance(myProject);
KarmaServer server = registry.getServer(serverSettings);
if (server != null && server.getRestarter().isRestartRequired()) {
server.shutdownAsync();
server = null;
}
if (server == null) {
registry.startServer(
serverSettings,
new CatchingConsumer<KarmaServer, Exception>() {
@Override
public void consume(KarmaServer server) {
RunnerAndConfigurationSettings configuration = myExecutionEnvironment.getRunnerAndConfigurationSettings();