удаление отладочной печати сравнения и не только

This commit is contained in:
2024-07-22 00:57:05 +03:00
parent 3374c9783b
commit 53ad5e637f
76 changed files with 78 additions and 328 deletions

View File

@@ -39,7 +39,6 @@ public class ArchivesBackupPass extends ConnectionPass<File> {
//сортируем по времени обновления. по убыванию.
files.sort((o1, o2) -> (int) (o2.updateTime - o1.updateTime));
for (int i = 2; i < files.size(); ++i) {
System.out.println(files.get(i).full_name + ":" + files.get(i).updateTime);
user.connection.sftpChannel.rm(files.get(i).full_name);
}
//--------------

View File

@@ -207,10 +207,6 @@ public class CloneDVMPackage extends AddObjectPass<DVMPackage> {
target.tasksCount++;
}
}
//--
for (String test_id : inexistingTests) {
System.out.println("Тест " + test_id + " не найден!");
}
return inexistingTests.isEmpty() || UI.Question(inexistingTests.size() + " тестов отсутствует. Продолжить");
}
@Override

View File

@@ -36,7 +36,6 @@ public class CloneSapforPackage extends AddObjectPass<SapforPackage> {
//--
for (SapforTest_json src_TestJson : src.tests) {
if (Global.testingServer.db.tests.containsKey(src_TestJson.id)) {
System.out.println("test=" + src_TestJson.id);
Test test = Global.testingServer.db.tests.get(src_TestJson.id);
SapforTest_json testJson = new SapforTest_json();
//--
@@ -53,7 +52,6 @@ public class CloneSapforPackage extends AddObjectPass<SapforPackage> {
//--
for (SapforConfiguration_json src_configuration : src.configurations) {
if (Global.testingServer.db.sapforConfigurations.containsKey(src_configuration.id)) {
System.out.println("configuration=" + src_configuration.id);
SapforConfiguration configuration = Global.testingServer.db.sapforConfigurations.get(src_configuration.id);
SapforConfiguration_json configurationJson = new SapforConfiguration_json();
//--
@@ -170,13 +168,6 @@ public class CloneSapforPackage extends AddObjectPass<SapforPackage> {
target.testsNames = String.join(";", target.package_json.getTestsNames());
target.configurationsNames = String.join(";", target.package_json.getConfigurationsNames());
//--
for (String test_id : inexistingTests) {
System.out.println("Тест " + test_id + " не найден!");
}
for (String configiration_id : inexistingConfigurations) {
System.out.println("Конфигурация " + configiration_id + " не найдена!");
}
//--
return inexistingTests.isEmpty() && inexistingConfigurations.isEmpty() ||
UI.Question(
(inexistingTests.isEmpty() ? "" : (inexistingTests.size() + " тестов отсутствует;")) +
@@ -187,8 +178,5 @@ public class CloneSapforPackage extends AddObjectPass<SapforPackage> {
@Override
protected void body() throws Exception {
Global.testingServer.db.sapforPackages.Data.put(target.id, target);
//--
// Utils.CheckAndCleanDirectory(target.getLocalWorkspace());
// target.saveJson();
}
}

View File

@@ -178,7 +178,6 @@ public class CreateTestFromDirectory extends Pass_2021<Test> {
FileUtils.forceMkdir(tempProject);
//--
for (ProjectFile projectFile : project_files) {
System.out.println(projectFile.file.getAbsolutePath());
File dst = new File(tempProject, projectFile.file.getName());
FileUtils.copyFile(projectFile.file, dst);
}

View File

@@ -17,7 +17,6 @@ public class DeleteLonelyM extends Pass_2021<db_project_info> {
@Override
protected void body() throws Exception {
Vector<db_project_info> targets = target.getLonelyM();
System.out.println(targets.size());
for (db_project_info m : targets) {
passes.get(PassCode_2021.DeleteVersion).Do(m);
}

View File

@@ -21,7 +21,6 @@ public class DownloadProject extends CurrentConnectionPass {
dialogOK = (UI.getRemoteFileChooser().ShowDialog(getDescription(), this, true));
if (dialogOK) {
src = Current.getRemoteFile();
System.out.println(Current.getRemoteFile());
remote_archive = new RemoteFile(src.full_name, src.name + ".zip", false);
local_archive = Utils.getTempFileName(remote_archive.name);
if ((user.connection.getFileKBSize(src.full_name)) <= maxSize) {

View File

@@ -46,7 +46,6 @@ public class EditAccount extends Email {
"Подтверждение адреса почты",
JOptionPane.INFORMATION_MESSAGE);
if (attempt != null) {
System.out.println("Введенный код: " + Utils.Brackets(attempt));
if (attempt.equals(password)) {
UI.Info("Почта успешно подтверждена!");
return true;

View File

@@ -23,16 +23,13 @@ public class InstallComponentFromFolder extends CurrentComponentPass {
if (super.canStart(args)){
VFileChooser fileChooser = target.getFileChooser();
String propertyName = target.getComponentType()+"Path";
System.out.println(propertyName);
String lastDirectory = (String) GlobalProperties.class.getField(propertyName).get(Global.properties);
System.out.println("last directory = "+ Utils.Brackets(lastDirectory));
if (!lastDirectory.isEmpty()){
//настройка выставлена не впервые, устанавливаем ее как папку
fileChooser.SetCurrentDirectory(lastDirectory);
}
boolean res = (file = fileChooser.ShowDialog()) != null;
File newDirectory = fileChooser.getCurrentDirectory();
System.out.println("new directory = "+newDirectory.getAbsolutePath());
GlobalProperties.class.getField(propertyName).set(Global.properties, newDirectory.getAbsolutePath());
Global.properties.Update();
return res;

View File

@@ -17,7 +17,6 @@ public class OpenCurrentFile extends Pass_2021<DBProjectFile> {
}
@Override
protected void body() throws Exception {
System.out.println(getDescription() + " " + target.file.getAbsolutePath());
}
@Override
protected void performDone() throws Exception {

View File

@@ -29,7 +29,6 @@ public class PingComponentsServer extends ComponentsRepositoryPass {
Throwable cause = getCauseRec(ex);
if ((cause instanceof ConnectException) && cause.getMessage().contains("Connection refused: connect")) {
//так как это пинг, игнорируем.
System.out.println("Server inactive");
return;
}
}

View File

@@ -28,7 +28,6 @@ public class PingTestingServer extends TestingSystemPass {
Throwable cause = getCauseRec(ex);
if ((cause instanceof ConnectException) && cause.getMessage().contains("Connection refused: connect")) {
//так как это пинг, игнорируем.
System.out.println("Server inactive");
return;
}
}

View File

@@ -216,7 +216,6 @@ public class Precompilation extends Pass_2021<db_project_info> {
}
@Override
protected void performDone() throws Exception {
System.out.println("DONE");
}
@Override
protected void performFinish() throws Exception {
@@ -248,10 +247,8 @@ public class Precompilation extends Pass_2021<db_project_info> {
if (Global.isWindows) {
if (!name_to_kill.isEmpty()) {
killed = true;
System.out.println("time to kill...");
Process killer = Runtime.getRuntime().exec("taskkill /FI \"IMAGENAME eq " + name_to_kill + "\" /F /T");
killer.waitFor();
System.out.println("DEAD");
}
} else {
UI.Info("Прерывание процессов под Linux не реализовано");

View File

@@ -36,10 +36,7 @@ public class PublishComponentsServer extends RepositoryServerSSHPass {
user.connection.tryRM(dst);
user.connection.putSingleFile(src, dst);
//-
StartServer();
System.out.println("userHome=" + Utils.Brackets(userHome.full_name));
System.out.println("testingHome=" + Utils.Brackets(serverHome.full_name));
}
@Override
protected boolean validate() {

View File

@@ -39,8 +39,6 @@ public class PublishTestingServer extends RepositoryServerSSHPass {
//-
StartServer();
System.out.println("userHome=" + Utils.Brackets(userHome.full_name));
System.out.println("testingHome=" + Utils.Brackets(serverHome.full_name));
}
@Override
protected boolean validate() {

View File

@@ -94,10 +94,8 @@ public class ResurrectComponentFromServer extends CurrentComponentPass {
}
@Override
protected void ServerAction() throws Exception {
System.out.println(remoteFile.full_name);
Command(new ServerExchangeUnit_2021(ServerCode.ReceiveFile, remoteFile.full_name));
localFile = Utils.getTempFileName(remoteFile.name);
System.out.println(response.object);
response.Unpack(localFile);
}
};

View File

@@ -18,12 +18,10 @@ public class SPF_GetArrayLinks extends SilentSapforPass {
id_1|number_1|link_id1|link_id2|link_id3|id_2|number_2|link_id1|link_id2|link_id3
*/
//эту инфу суем в список объявленных массивов, чтобы не плодить лишних таблиц.
System.out.println(packed);
String[] data = packed.split("\\|");
long current_id;
int links_size = 0;
ProjectArray current_array = null;
System.out.println("parsing..");
int j = 0;
for (int i = 0; i < data.length; ++i) {
switch (j) {
@@ -32,38 +30,25 @@ public class SPF_GetArrayLinks extends SilentSapforPass {
current_array =
target.declaratedArrays.get(current_id);
current_array.links.clear();
System.out.print(current_array.id + "[");
j++;
break;
case 1:
links_size = Integer.parseInt(data[i]);
System.out.print(links_size + "]-> {");
j++;
break;
default:
if (links_size > 0) {
long link_id = Long.parseLong(data[i]);
System.out.print(link_id + ",");
current_array.links.put(link_id, target.declaratedArrays.get(link_id));
links_size--;
}
if (links_size == 0) {
j = 0;
current_array = null;
System.out.println("}");
}
break;
}
}
System.out.println("DONE");
/*
for (long id: target.arraysLinks.keySet()){
System.out.print(id+"|");
System.out.print(target.arraysLinks.get(id).size()+"|");
for (long link_id: target.arraysLinks.get(id))
System.out.print(link_id+"|");
}
*/
}
@Override
protected void performDone() throws Exception {

View File

@@ -52,7 +52,6 @@ public class SPF_GetGCovInfo extends SilentSapforPass {
unpack(sapfor.getResult());
}
protected void unpack(String packed) throws Exception {
System.out.println("PACKED GCOV INFO ="+Utils.Brackets(packed));
String[] byFiles = packed.split("@");
for (int z = 0; z < byFiles.length; ++z) {
DBProjectFile cur = target.db.files.get((byFiles[z++]).replace("/", "\\"));

View File

@@ -236,11 +236,6 @@ public class SPF_GetGraphFunctionPositions extends SilentSapforPass {
break;
}
}
/*
System.out.println("Got "+target.functionsGraph.vertexMap.keySet().size()+" functions to draw");
System.out.println(String.join("\n", target.functionsGraph.vertexMap.keySet()));
System.out.println("===============================================");
*/
//теперь добавить ребер.
for (String funcName : target.functionsGraph.vertexMap.keySet()) {
FuncInfo fi = target.allFunctions.get(funcName);

View File

@@ -43,9 +43,7 @@ public class SPF_InlineProcedures extends SapforTransformation {
return false;
}
Options = Utils.toU(String.join("|", Result));
System.out.println(Utils.Brackets(Options));
Global.changeSetting(SettingName.PARSE_FOR_INLINE, "1");
// Pass_2021.passes.get(PassCode_2021.UpdateSetting).Do(SettingName.PARSE_FOR_INLINE, "1");
SPF_ParseFilesWithOrder.silent = true;
return passes.get(PassCode_2021.SPF_ParseFilesWithOrder).Do(false);
}

View File

@@ -73,7 +73,6 @@ public class SPF_InlineProceduresH extends SapforTransformation {
}
}
Options = Utils.toU(String.join("|", Result));
System.out.println(Utils.Brackets(Options));
Global.changeSetting(SettingName.PARSE_FOR_INLINE, "1");
SPF_ParseFilesWithOrder.silent = true;
return passes.get(PassCode_2021.SPF_ParseFilesWithOrder).Do();

View File

@@ -36,7 +36,6 @@ public class SPF_InsertIncludesPass extends SapforTransformation {
return false;
}
Options = Utils.toU(String.join("|", Result));
System.out.println(Utils.Brackets(Options));
return true;
}
return false;

View File

@@ -81,8 +81,7 @@ public class SPF_ModifyArrayDistribution extends SapforModification {
}
coeffs.insertElementAt(String.valueOf(coeffs.size() + 1), 0);
addOpt2 = String.join("|", coeffs);
System.out.println("addOpt1=" + Utils.Brackets(addOpt1));
System.out.println("addOpt2=" + Utils.Brackets(addOpt2));
addOpt2 = String.join("|", coeffs);
return true;
}
Log.Writeln("Коефициенты выравнивания актуальны");

View File

@@ -7,37 +7,4 @@ public class TestPass extends TestingSystemPass {
protected void ServerAction() throws Exception {
// Command(new ServerExchangeUnit_2021(ServerCode.GetSapforActualVersion));
}
/*
@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 определить по адресу сервера совпадает ли он с локальным
}
*/
}

View File

@@ -21,8 +21,6 @@ public class UnzipFolderPass<T> extends Pass_2021<T> {
protected boolean canStart(Object... args) {
src = (String) args[0];
dst = (String) args[1];
System.out.println("src=" + src);
System.out.println("dst=" + dst);
clean_dst = args.length > 2 && (boolean) args[2];
return true;
}

View File

@@ -37,7 +37,6 @@ public abstract class ProcessPass<T> extends Pass_2021<T> {
//ожидать завершения читая весь его поток в процессе выполнения.
public void WaitForProcess() throws Exception {
exit_code = process.waitFor();
System.out.println("завершено с кодом " + exit_code);
process = null;
if (exit_code != 0)
throw new PassException("Процесс завершился с кодом " + exit_code);
@@ -49,7 +48,6 @@ public abstract class ProcessPass<T> extends Pass_2021<T> {
BufferedReader brStdout = new BufferedReader(isrStdout);
String line;
while ((line = brStdout.readLine()) != null) {
System.out.println(line);
output.add(line);
}
} catch (Exception ex) {

View File

@@ -10,7 +10,6 @@ public class ConnectionPass<T> extends Pass_2021<T> {
protected void Connect() throws Exception{
user.connection = null;
user.connection = new UserConnection(machine, user);
System.out.println("Соединение c " + machine.getURL() + " " + user.login + " успешно установлено.");
}
void Disconnect(){
if (user.connection!=null){

View File

@@ -36,8 +36,6 @@ public abstract class RepositoryServerSSHPass extends ConnectionPass {
userHome = new RemoteFile(user.connection.sftpChannel.getHome(), true);
serverHome = new RemoteFile(userHome, getServerHomeName());
//-
System.out.println("userHome=" + Utils.Brackets(userHome.full_name));
System.out.println("testingHome=" + Utils.Brackets(serverHome.full_name));
}
//--
protected void StartServer() throws Exception {
@@ -82,6 +80,5 @@ public abstract class RepositoryServerSSHPass extends ConnectionPass {
new Date().toString()
);
user.connection.sftpChannel.rename(ABORTED.full_name, AbortLog.full_name);
System.out.println("Done");
}
}

View File

@@ -79,7 +79,6 @@ public class SapforAnalysis extends SapforPass {
@Override
protected void performDone() throws Exception {
if (!sapfor.getResult().isEmpty()) {
System.out.println("UNPACK");
unpack(sapfor.getResult());
}
if (!isAtomic() && !asDonePhase) {

View File

@@ -45,7 +45,6 @@ public abstract class RepositoryPass<S extends RepositoryServer, T> extends Pass
in = new ObjectInputStream(clientSocket.getInputStream());
}
protected void disconnect() throws Exception {
//System.out.println("разрыв соединения...");
if (clientSocket != null)
clientSocket.close();
if (in != null)
@@ -56,7 +55,6 @@ public abstract class RepositoryPass<S extends RepositoryServer, T> extends Pass
clientSocket = null;
in = null;
out = null;
// System.out.println("done");
}
protected abstract void ServerAction() throws Exception;
protected void Command(ServerExchangeUnit_2021 request_in) throws Exception {