only:Improve toolset for default tune canned tune generation #4871

This commit is contained in:
Andrey 2023-06-16 19:34:35 -04:00
parent 55013d86ed
commit c55f8aec1e
2 changed files with 6 additions and 3 deletions

View File

@ -117,8 +117,11 @@ public class IoUtil {
public static void connectToSimulator(LinkManager linkManager, boolean startProcess) throws InterruptedException {
if (startProcess) {
if (!TcpConnector.getAvailablePorts().isEmpty())
throw new IllegalStateException("Port already binded on startup?");
if (FileLog.isWindows()) {
// this check seems not to work on Linux
if (!TcpConnector.getAvailablePorts().isEmpty())
throw new IllegalStateException("Port already binded on startup?");
}
SimulatorExecHelper.startSimulator();
}

View File

@ -22,7 +22,7 @@ public class WriteSimulatorConfiguration {
IoUtil.connectToSimulator(linkManager, true);
BinaryProtocol bp = Objects.requireNonNull(linkManager.getBinaryProtocol(), "getBinaryProtocol");
ConfigurationImage configuration = bp.getControllerConfiguration();
System.out.println("Got " + configuration);
System.out.println("Got " + Objects.requireNonNull(configuration, "configuration"));
IniFileModel ini = new IniFileModel().readIniFile(INI_FILE_FOR_SIMULATOR);
if (ini == null)
throw new IllegalStateException("Not found " + INI_FILE_FOR_SIMULATOR);