новые директивы. v++
This commit is contained in:
@@ -380,6 +380,7 @@ public class Global {
|
||||
planner.Start();
|
||||
}
|
||||
//---
|
||||
//---
|
||||
public static void Init(String... args) {
|
||||
System.out.println("VisualSapfor.jar started..");
|
||||
Home = System.getProperty("user.dir"); //если Linux, дает без слеша в конце !!!
|
||||
|
||||
@@ -39,7 +39,10 @@ public enum DirectiveName {
|
||||
ASYNC,
|
||||
FLEXIBLE,
|
||||
PARAMETER,
|
||||
UNROLL
|
||||
UNROLL,
|
||||
PROCESS_PRIVATE,
|
||||
COVER,
|
||||
MERGE
|
||||
;
|
||||
public String getDescription() {
|
||||
switch (this) {
|
||||
@@ -117,7 +120,12 @@ public enum DirectiveName {
|
||||
return "Асинхронная";
|
||||
case FLEXIBLE:
|
||||
return "Гибкая";
|
||||
|
||||
case PROCESS_PRIVATE:
|
||||
return "Клауза приватных для процесса переменных";
|
||||
case COVER:
|
||||
return "Клауза покрытия";
|
||||
case MERGE:
|
||||
return "Клауза для объединения циклов";
|
||||
default:
|
||||
return "?";
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@ public class Spec3Directive extends SpecDirective {
|
||||
&& getOwner().flags.get(1).equals(DirectiveName.TRANSFORM)
|
||||
&& getOwner().nearestGroup.equals(DirectiveName.TRANSFORM)
|
||||
&& !getOwner().flags.contains(DirectiveName.NOINLINE)
|
||||
&& !getOwner().flags.contains(DirectiveName.MERGE)
|
||||
&& !getOwner().flags.contains(DirectiveName.FISSION)
|
||||
&& !getOwner().flags.contains(DirectiveName.SHRINK)
|
||||
&& !getOwner().flags.contains(DirectiveName.EXPAND)
|
||||
|
||||
@@ -10,7 +10,8 @@ public class SpecDirective extends BaseDirective {
|
||||
super(provider_in, name_in);
|
||||
}
|
||||
public String get_word() {
|
||||
boolean noBrackets = name.equals(DirectiveName.NOINLINE)||name.equals(DirectiveName.UNROLL);
|
||||
boolean noBrackets = name.equals(DirectiveName.NOINLINE)||
|
||||
name.equals(DirectiveName.UNROLL)|| name.equals(DirectiveName.MERGE);
|
||||
return name.getText() + (noBrackets ? "" : "()");
|
||||
}
|
||||
@Override
|
||||
|
||||
@@ -7,6 +7,8 @@ public class Spec1Provider extends PrefixWordProvider {
|
||||
super(owner_in);
|
||||
addDirective(new Spec1Directive(this, DirectiveName.REDUCTION));
|
||||
addDirective(new Spec1Directive(this, DirectiveName.PRIVATE));
|
||||
addDirective(new Spec1Directive(this, DirectiveName.PROCESS_PRIVATE));
|
||||
addDirective(new Spec1Directive(this, DirectiveName.PARAMETER));
|
||||
addDirective(new Spec1Directive(this, DirectiveName.COVER));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,5 +10,6 @@ public class Spec3Provider extends PrefixWordProvider {
|
||||
addDirective(new Spec3Directive(this, DirectiveName.SHRINK));
|
||||
addDirective(new Spec3Directive(this, DirectiveName.EXPAND));
|
||||
addDirective(new Spec3Directive(this, DirectiveName.UNROLL));
|
||||
addDirective(new Spec3Directive(this, DirectiveName.MERGE));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ public class Visualiser extends Component {
|
||||
//http://www.seostella.com/ru/article/2012/02/05/formatirovanie-daty-v-java.html
|
||||
@Override
|
||||
public void GetVersionInfo() {
|
||||
version = 1094;
|
||||
version = 1095;
|
||||
String pattern = "MMM dd yyyy HH:mm:ss";
|
||||
DateFormat df = new SimpleDateFormat(pattern, Locale.ENGLISH);
|
||||
date_text = df.format(getClassBuildTime());
|
||||
|
||||
@@ -109,23 +109,19 @@ public abstract class TestingPlanner<P extends TestingPackage> {
|
||||
case TestsSynchronize:
|
||||
TestsSynchronize();
|
||||
UpdatePackageState(TasksPackageState.PackageWorkspaceCreation);
|
||||
Disconnect();
|
||||
break;
|
||||
case PackageWorkspaceCreation:
|
||||
PackageWorkspaceCreation();
|
||||
UpdatePackageState(TasksPackageState.PackageStart);
|
||||
Disconnect();
|
||||
break;
|
||||
case PackageStart:
|
||||
PackageStart();
|
||||
testingPackage.StartDate = new Date().getTime();
|
||||
UpdatePackageState(getStateAfterStart());
|
||||
Disconnect();
|
||||
break;
|
||||
case RunningEnd:
|
||||
DownloadResults();
|
||||
UpdatePackageState(TasksPackageState.Analysis);
|
||||
Disconnect();
|
||||
break;
|
||||
default:
|
||||
if (CheckNextState()) UpdatePackage();
|
||||
@@ -166,11 +162,11 @@ public abstract class TestingPlanner<P extends TestingPackage> {
|
||||
} catch (Exception ex) {
|
||||
Print("Ошибка сеанса. Соединение будет разорвано.");
|
||||
Print(ex.getMessage());
|
||||
Disconnect();
|
||||
//
|
||||
testingPackage.connectionErrosCount++;
|
||||
UpdatePackage();
|
||||
} finally {
|
||||
Disconnect();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,7 +27,6 @@ import java.util.*;
|
||||
public class DVMTestingPlanner extends TestingPlanner<DVMPackage> {
|
||||
//----
|
||||
LinkedHashMap<String, Machine> machines = new LinkedHashMap<>();
|
||||
//todo приделать к ним очередь? или сделать в бд тестирования список машин.
|
||||
LinkedHashMap<String, User> users = new LinkedHashMap<>();
|
||||
//-- текущие машина и пользователь.
|
||||
Machine machine = null;
|
||||
@@ -196,25 +195,6 @@ public class DVMTestingPlanner extends TestingPlanner<DVMPackage> {
|
||||
Print("waiting for package start...");
|
||||
Utils.sleep(1000);
|
||||
}
|
||||
/*
|
||||
String plannerStartCommand = String.join(" ", "nohup",
|
||||
Utils.DQuotes(getPlanner()),
|
||||
Utils.DQuotes(user.workspace),
|
||||
Utils.DQuotes(packageRemoteWorkspace.full_name),
|
||||
Utils.DQuotes(testingPackage.kernels),
|
||||
Utils.DQuotes(testingPackage.drv), "&");
|
||||
|
||||
user.connection.CommandNoWait("ulimit -s unlimited",plannerStartCommand);
|
||||
RemoteFile PID = new RemoteFile(packageRemoteWorkspace, "PID");
|
||||
RemoteFile STARTED = new RemoteFile(packageRemoteWorkspace, "STARTED");
|
||||
while (!user.connection.Exists(STARTED)) {
|
||||
Print("waiting for package start...");
|
||||
Utils.sleep(1000);
|
||||
}
|
||||
if (user.connection.Exists(PID)) {
|
||||
testingPackage.PID = user.connection.readFromFile(PID);
|
||||
}
|
||||
*/
|
||||
}
|
||||
@Override
|
||||
protected boolean CheckNextState() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user