подсветка версий с ошибками в журнале
This commit is contained in:
@@ -5,7 +5,6 @@ import Common.Global;
|
||||
import Common.Utils.Utils;
|
||||
import GlobalData.Account.Account;
|
||||
import ProjectData.LanguageName;
|
||||
import Repository.Component.Sapfor.Sapfor;
|
||||
import Repository.EmailMessage;
|
||||
import Repository.RepositoryRefuseException;
|
||||
import Repository.RepositoryServer;
|
||||
@@ -299,7 +298,6 @@ public class TestingServer extends RepositoryServer<TestsDatabase> {
|
||||
throw new RepositoryRefuseException("Не удалось обновить репозиторий");
|
||||
//-->>
|
||||
Vector<Pair<Group, Vector<File>>> groups = new Vector<>();
|
||||
LinkedHashMap<Group, Vector<Test>> res = new LinkedHashMap<>();
|
||||
File testsSrc = Paths.get(
|
||||
Global.RepoDirectory.getAbsolutePath(),
|
||||
"dvm", "tools", "tester", "trunk", "test-suite").toFile();
|
||||
@@ -338,58 +336,8 @@ public class TestingServer extends RepositoryServer<TestsDatabase> {
|
||||
//-теперь создать тесты.
|
||||
System.out.println("найдено " + groups.size() + " групп");
|
||||
//--
|
||||
for (Pair<Group, Vector<File>> p : groups) {
|
||||
Group group = p.getKey();
|
||||
//-
|
||||
db.Insert(group);
|
||||
Vector<Test> testsIds = new Vector<>();
|
||||
res.put(group, testsIds);
|
||||
//-
|
||||
Vector<File> files = p.getValue();
|
||||
if (!files.isEmpty()) {
|
||||
//->>
|
||||
for (File file : files) {
|
||||
System.out.println("Создание теста " + file.getName());
|
||||
Test test = new Test();
|
||||
test.description = Utils.getNameWithoutExtension(file.getName()) + "_" + group.language.getDVMCompile();
|
||||
test.sender_name = account.name;
|
||||
test.sender_address = account.email;
|
||||
test.group_id = group.id;
|
||||
test.files = file.getName();
|
||||
db.Insert(test);
|
||||
testsIds.add(test);
|
||||
//->>
|
||||
File testDirectory = new File(Global.TestsDirectory, String.valueOf(test.id));
|
||||
Utils.CheckAndCleanDirectory(testDirectory);
|
||||
File testFile = Paths.get(testDirectory.getAbsolutePath(), file.getName()).toFile();
|
||||
FileUtils.copyFile(file, testFile);
|
||||
//----
|
||||
//архивация.
|
||||
File archive = test.getArchive();
|
||||
ZipFolderPass zip = new ZipFolderPass();
|
||||
zip.Do(testDirectory.getAbsolutePath(), archive.getAbsolutePath());
|
||||
//---
|
||||
//Определение размерности
|
||||
switch (group.language) {
|
||||
case fortran:
|
||||
// временная папка для анализа. чтобы не засорять нормальную.
|
||||
File tempProject = Utils.getTempFileName("test");
|
||||
FileUtils.forceMkdir(tempProject);
|
||||
FileUtils.copyDirectory(testDirectory, tempProject);
|
||||
//--
|
||||
if (Sapfor.getMinMaxDim(Sapfor.getTempCopy(new File(sapfor.call_command)), tempProject, test)) {
|
||||
db.Update(test);
|
||||
} else
|
||||
throw new RepositoryRefuseException("Не удалось определить размерность теста " + Utils.Brackets(test.description));
|
||||
break;
|
||||
case c:
|
||||
test.max_dim = Utils.getCTestMaxDim(testFile);
|
||||
db.Update(test);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
for (Pair<Group, Vector<File>> p : groups)
|
||||
db.RefreshGroup(account, sapfor, p);
|
||||
}
|
||||
private void GetFirstActiveDVMPackagesByMachines() {
|
||||
response = new ServerExchangeUnit_2021(ServerCode.OK);
|
||||
|
||||
Reference in New Issue
Block a user