no message

This commit is contained in:
2023-09-30 18:22:14 +03:00
parent 2a69143550
commit ccedf38229
3 changed files with 7 additions and 9 deletions

View File

@@ -1,5 +1,6 @@
package SapforTestingSystem.SapforTest;
import Common.Constants.Constants;
import Common.Global;
import Common.Utils.Utils;
import ProjectData.Project.db_project_info;
import Visual_DVM_2021.Passes.PassCode_2021;
@@ -62,7 +63,7 @@ public class SapforTest {
Utils.delete_with_check(outputFile);
Utils.delete_with_check(errorsFile);
//---
File file = new File(data_workspace, name + ".bat");
File file = new File(data_workspace, name + (Global.isWindows?".bat":".sh"));
FileUtils.write(file,
Utils.DQuotes(sapfor_drv.getAbsolutePath())
+ (flags.isEmpty() ? "" : (" " + flags))
@@ -74,7 +75,7 @@ public class SapforTest {
Utils.DQuotes(errorsFile.getAbsolutePath()),
Charset.defaultCharset());
if (!file.setExecutable(true))
throw new PassException("Не удалось сделать файл скрипта " + name + " исполняемым!");
throw new Exception("Не удалось сделать файл скрипта " + name + " исполняемым!");
//--
ProcessBuilder procBuilder = new ProcessBuilder(file.getAbsolutePath());
procBuilder.directory(workspace);