промежуточный. немного изменил отображение задач сапфора. сравнение в процессе
This commit is contained in:
@@ -29,13 +29,10 @@ import Visual_DVM_2021.Passes.Pass_2021;
|
||||
import javafx.util.Pair;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
|
||||
import javax.swing.*;
|
||||
import javax.swing.Timer;
|
||||
import java.io.File;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.Arrays;
|
||||
import java.util.Comparator;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Vector;
|
||||
import java.util.*;
|
||||
public class TestingServer extends RepositoryServer<TestsDatabase> {
|
||||
/*
|
||||
@Override
|
||||
@@ -495,24 +492,56 @@ public class TestingServer extends RepositoryServer<TestsDatabase> {
|
||||
File repoSapforHome = Paths.get(repo.getAbsolutePath(), Constants.SAPFOR_REPOSITORY_BIN ).toFile();
|
||||
File repo_bin = new File(repoSapforHome, "Sapfor_F");
|
||||
//--
|
||||
System.out.println("Синхронизация ветви DVM...");
|
||||
Utils.startScript(repo, repo, "dvm_checkout",
|
||||
"svn checkout " +
|
||||
Constants.REPOSITORY_AUTHENTICATION +
|
||||
" " + Constants.DVM_REPOSITORY + " 1>dvm_out.txt 2>dvm_err.txt\n").waitFor();
|
||||
|
||||
System.out.println("Синхронизация ветви SAPFOR...");
|
||||
Utils.startScript(repo, repo, "spf_checkout",
|
||||
"svn checkout " +
|
||||
Constants.REPOSITORY_AUTHENTICATION +
|
||||
" " + Constants.SAPFOR_REPOSITORY + " 1>spf_out.txt 2>spf_err.txt\n").waitFor();
|
||||
//--
|
||||
|
||||
if (repo_bin.exists()){
|
||||
if (repo_bin.exists())
|
||||
FileUtils.forceDelete(repo_bin);
|
||||
}
|
||||
//--
|
||||
System.out.println("Сборка SAPFOR...");
|
||||
Utils.startScript(repoSapforHome, repoSapforHome, "build_sapfor",
|
||||
"cmake ../ 1>out.txt 2>err.txt\nmake -j 14 1>>out.txt 2>>err.txt\n").waitFor();
|
||||
//--
|
||||
response = new ServerExchangeUnit_2021(ServerCode.OK);
|
||||
System.out.println("DONE");
|
||||
File repoSapfor = new File(repoSapforHome, "Sapfor_F");
|
||||
System.out.println("Result file is "+Utils.Brackets(repoSapfor.getAbsolutePath()));
|
||||
if (repoSapfor.exists()) {
|
||||
System.out.println("assembly found!");
|
||||
response = new ServerExchangeUnit_2021(ServerCode.OK);
|
||||
File sapforsDirectory = new File(testingSystemHome, "Sapfors");
|
||||
//создать папку. Для того чтобы скопировать из репозитория.
|
||||
File sapforHome = new File(sapforsDirectory, Utils.getDateName("sapfor"));
|
||||
sapforHome.mkdir();
|
||||
File sapforBin = new File(sapforHome, "Sapfor_F");
|
||||
FileUtils.copyFile(repo_bin, sapforBin);
|
||||
sapforBin.setExecutable(true, false);
|
||||
// //-->>>
|
||||
ServerSapfor serverSapfor = new ServerSapfor();
|
||||
serverSapfor.home_path = sapforHome.getAbsolutePath();
|
||||
serverSapfor.call_command = sapforBin.getAbsolutePath();
|
||||
serverSapfor.languageName = LanguageName.fortran;
|
||||
serverSapfor.buildDate = new Date().getTime();
|
||||
response.object = serverSapfor;
|
||||
File version =new File(sapforHome, "version.txt");
|
||||
System.out.println("Запрос версии..");
|
||||
Utils.startScript(sapforHome, sapforHome, "get_version",
|
||||
serverSapfor.getVersionCommand()+" 1>"+Utils.DQuotes(version.getAbsolutePath())).waitFor();
|
||||
if (version.exists()){
|
||||
System.out.println("version.txt found");
|
||||
String raw = FileUtils.readFileToString(version);
|
||||
System.out.println(Utils.Brackets(raw));
|
||||
String[] data = raw.split(" ");
|
||||
if (data.length >= 4) serverSapfor.version = data[3].replace(",", "");
|
||||
}
|
||||
}else throw new RepositoryRefuseException("Не удалось собрать SAPFOR");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user