назначение окружения PATH LD_LIBRARY_PATH
++
This commit is contained in:
10
.idea/workspace.xml
generated
10
.idea/workspace.xml
generated
@@ -8,10 +8,14 @@
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="e42177c3-2328-4b27-8a01-35779b2beb99" name="Default Changelist" comment="">
|
||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/ComponentsServer/Component/Json/ComponentPublicationInfoJson.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/ComponentsServer/Component/Json/ComponentPublicationInfoJson.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/ComponentsServer/ComponentsServer.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/ComponentsServer/ComponentsServer.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/properties" beforeDir="false" afterPath="$PROJECT_DIR$/properties" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Constants.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Constants.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/PublishComponent.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/PublishComponent.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Repository/Server/RepositoryServer.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Repository/Server/RepositoryServer.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/files/Global.h" beforeDir="false" afterPath="$PROJECT_DIR$/src/files/Global.h" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/files/RunTask.h" beforeDir="false" afterPath="$PROJECT_DIR$/src/files/RunTask.h" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/files/Task.h" beforeDir="false" afterPath="$PROJECT_DIR$/src/files/Task.h" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/files/planner.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/src/files/planner.cpp" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/files/version.h" beforeDir="false" afterPath="$PROJECT_DIR$/src/files/version.h" afterDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
|
||||
10
properties
10
properties
@@ -4,7 +4,7 @@
|
||||
"ServerUserPassword": "mprit_2011",
|
||||
"OfferRegistrationOnStart": true,
|
||||
"Workspace": "E:\\Tests",
|
||||
"ProjectsSearchDirectory": "E:\\BUG",
|
||||
"ProjectsSearchDirectory": "E:\\Tests",
|
||||
"DocumentsDirectory": "C:\\Users\\misha\\Documents\\_testing_system",
|
||||
"VisualiserPath": "C:\\Users\\misha\\Downloads",
|
||||
"Sapfor_FPath": "E:\\_sapfor_x64\\Components\\Sapfor_F",
|
||||
@@ -26,13 +26,13 @@
|
||||
"Kernels": 8,
|
||||
"LocalMakePathWindows": "C:\\MinGW\\msys\\1.0\\bin\\make.exe",
|
||||
"CheckTestingIntervalSeconds": 10,
|
||||
"AutoCheckTesting": false,
|
||||
"AutoCheckTesting": true,
|
||||
"EmailOnTestingProgress": true,
|
||||
"CompleteCompilationOptions": false,
|
||||
"CompleteRunEnvironments": false,
|
||||
"lastMachineId": 13,
|
||||
"lastUserId": 34,
|
||||
"lastCompilerId": 52,
|
||||
"lastMachineId": 28,
|
||||
"lastUserId": 36,
|
||||
"lastCompilerId": 110,
|
||||
"RegisterOn": false,
|
||||
"SpacesOn": false,
|
||||
"EmptyLinesOn": false,
|
||||
|
||||
@@ -3,8 +3,8 @@ import Common.Utils.Vector_;
|
||||
|
||||
import java.util.Vector;
|
||||
public class Constants {
|
||||
public static final int version = 1203;
|
||||
public static final int planner_version = 12;
|
||||
public static final int version = 1204;
|
||||
public static final int planner_version = 15;
|
||||
public static final int testingMaxKernels = 64;
|
||||
//--
|
||||
public static final String ApplicationFileName = "VisualSapfor.jar";
|
||||
|
||||
@@ -225,9 +225,6 @@ public abstract class RepositoryServer<D extends Database> {
|
||||
case ReceiveFile:
|
||||
ReceiveFile();
|
||||
break;
|
||||
case Email:
|
||||
Email();
|
||||
break;
|
||||
default:
|
||||
UnsafeSession();
|
||||
break;
|
||||
|
||||
@@ -8,3 +8,5 @@ int maxKernels;
|
||||
int busyKernels;
|
||||
int freeKernels;
|
||||
String dvm_drv;
|
||||
String PATH;
|
||||
String LD_LIBRARY_PATH;
|
||||
|
||||
@@ -91,12 +91,9 @@ public:
|
||||
}
|
||||
|
||||
String getStartCommand() override {
|
||||
String res = workspace + "/run";
|
||||
String res = Task::getStartCommand();
|
||||
if (!environments.isEmpty())
|
||||
res = environments + " " + res;
|
||||
#if DEB
|
||||
printf("START %ld: %s\n", id, res.getCharArray());
|
||||
#endif
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
@@ -122,9 +122,13 @@ public:
|
||||
virtual void prepareWorkspace() {}
|
||||
virtual String getLaunchScriptText() = 0;
|
||||
virtual String getStartCommand() {
|
||||
return workspace + "/run";
|
||||
String res = workspace + "/run";
|
||||
if (!PATH.isEmpty())
|
||||
res = "PATH="+String::DQuotes(PATH)+ " " + res;
|
||||
if (!LD_LIBRARY_PATH.isEmpty())
|
||||
res = "LD_LIBRARY_PATH="+String::DQuotes(LD_LIBRARY_PATH)+ " " + res;
|
||||
return res;
|
||||
}
|
||||
|
||||
void createWorkspace() {
|
||||
Utils::Mkdir(workspace);
|
||||
}
|
||||
|
||||
@@ -88,6 +88,14 @@ void set_handlers() {
|
||||
#endif
|
||||
}
|
||||
|
||||
void getEnv_(String& res, const char * name_in){
|
||||
char * value_ = getenv(name_in);
|
||||
if (value_ != NULL){
|
||||
res = String(value_);
|
||||
value_ = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
int main(int argc, char ** argv)
|
||||
{
|
||||
//+
|
||||
@@ -101,18 +109,20 @@ int main(int argc, char ** argv)
|
||||
freeKernels = maxKernels;
|
||||
busyKernels= 0;
|
||||
//--
|
||||
|
||||
getEnv_(PATH,"PATH");
|
||||
getEnv_(LD_LIBRARY_PATH,"LD_LIBRARY_PATH");
|
||||
//--
|
||||
("PATH="+PATH).println();
|
||||
("LD_LIBRARY_PATH="+LD_LIBRARY_PATH).println();
|
||||
//--
|
||||
#if __cplusplus >= 201703L
|
||||
std::filesystem::current_path(packageWorkspace.getCharArray());
|
||||
#else
|
||||
chdir(packageWorkspace.getCharArray());
|
||||
#endif
|
||||
|
||||
#if DEB
|
||||
userWorkspace.println();
|
||||
packageWorkspace.println();
|
||||
printf("%d\n", maxKernels);
|
||||
#endif
|
||||
|
||||
#ifndef _WIN32
|
||||
int pid = getpid();
|
||||
@@ -120,29 +130,17 @@ int main(int argc, char ** argv)
|
||||
int pid = _getpid();
|
||||
#endif
|
||||
|
||||
#if DEB
|
||||
printf("PID=%d\n", pid);
|
||||
#endif
|
||||
File pidFile("PID", String(pid)+"\n");
|
||||
pidFile.Close();
|
||||
//---
|
||||
File startFile("STARTED", "+");
|
||||
startFile.Close();
|
||||
//---
|
||||
#if DEB
|
||||
printf(">>>>\n");
|
||||
#endif
|
||||
CompilationSupervisor * compilationSupervisor = new CompilationSupervisor();
|
||||
#if DEB
|
||||
printf("%ld\n", compilationSupervisor->getLength());
|
||||
#endif
|
||||
compilationSupervisor->DoWithSchedule(maxKernels);
|
||||
|
||||
RunSupervisor * runSupervisor = new RunSupervisor(compilationSupervisor);
|
||||
#if DEB
|
||||
printf("%ld\n", runSupervisor->getLength());
|
||||
runSupervisor->print();
|
||||
#endif
|
||||
runSupervisor->DoWithSchedule(maxKernels);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
13
|
||||
15
|
||||
Reference in New Issue
Block a user