Files
VisualSapfor/src/Visual_DVM_2021/Passes/All/TestPass.java

49 lines
1.9 KiB
Java
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
package Visual_DVM_2021.Passes.All;
import Common.Current;
import Common.Global;
import Common.GlobalProperties;
import Common.Utils.Utils;
import TestingSystem.Common.TasksPackageState;
import Visual_DVM_2021.Passes.Pass_2021;
import org.apache.commons.io.FileUtils;
import java.io.File;
import java.net.InetAddress;
import java.util.Vector;
public class TestPass extends Pass_2021 {
@Override
protected void body() throws Exception {
/*
File workspace = new File("E:\\Workspace");
Utils.CheckAndCleanDirectory(workspace);
//копирование визуализатора
File supervisor = new File(workspace, "VisualSapfor.jar");
//
FileUtils.copyFile(Global.visualiser.getFile(), supervisor);
//создание настроек
GlobalProperties properties = new GlobalProperties();
properties.Mode = Current.Mode.DVMPackage;
Utils.jsonToFile(properties, new File(workspace, "properties"));
Vector<String> args = new Vector<>();
args.add(Utils.DQuotes("dvm.keldysh.ru"));
args.add(Utils.DQuotes("2222"));
args.add(Utils.DQuotes("dvmuser1"));
args.add(Utils.DQuotes("nkat_2023"));
args.add(Utils.DQuotes("/home/dvmuser1/visual_sapfor_workspace_1711108722"));
args.add("777");
args.add(String.valueOf(TasksPackageState.TestsSynchronize));
//подготовка пакетного режима. Запустит его уже очередь.
Utils.createScript(workspace, workspace,
"start",
"java -jar VisualSapfor.jar "+ String.join(" ", args));
*/
byte[] localIp = InetAddress.getLocalHost().getAddress();
InetAddress address = InetAddress.getByName("alex-freenas.ddns.net");
System.out.println(address);
//java определить по адресу сервера совпадает ли он с локальным
}
}