cl.addArgument(arg);
}
- if (log.isDebugEnabled())
+ if (log.isTraceEnabled())
log.debug("Command line:\n" + cl.toString() + "\n");
return cl;
\r
private List<TreeSPath> activePaths;\r
\r
+ @SuppressWarnings("unchecked")\r
public <T extends StructureElement> T getElement(TreeSPath path) {\r
return (T) elements.get(path);\r
}\r
import java.util.UUID;\r
\r
import org.argeo.slc.core.structure.tree.TreeSPath;\r
-import org.argeo.slc.core.structure.tree.TreeSRegistry;\r
import org.argeo.slc.deploy.DeployedSystem;\r
import org.argeo.slc.process.SlcExecution;\r
import org.argeo.slc.process.SlcExecutionRelated;\r
import org.argeo.slc.process.SlcExecutionStep;\r
import org.argeo.slc.structure.StructureAware;\r
-import org.argeo.slc.structure.StructureElement;\r
import org.argeo.slc.structure.StructureRegistry;\r
import org.argeo.slc.test.ExecutableTestRun;\r
import org.argeo.slc.test.TestData;\r
private TestResult testResult;\r
\r
/** Executes the underlying test definition. */\r
+ @SuppressWarnings("unchecked")\r
public void run() {\r
uuid = UUID.randomUUID().toString();\r
if (testResult != null)\r
testDefinition.execute(this);\r
}\r
\r
+ @SuppressWarnings("unchecked")\r
public <T extends DeployedSystem> T getDeployedSystem() {\r
return (T) deployedSystem;\r
}\r
this.deployedSystem = deployedSystem;\r
}\r
\r
+ @SuppressWarnings("unchecked")\r
public <T extends TestData> T getTestData() {\r
return (T) testData;\r
}\r
this.testData = testData;\r
}\r
\r
+ @SuppressWarnings("unchecked")\r
public <T extends TestDefinition> T getTestDefinition() {\r
return (T) testDefinition;\r
}\r
this.testDefinition = testDefinition;\r
}\r
\r
+ @SuppressWarnings("unchecked")\r
public <T extends TestResult> T getTestResult() {\r
return (T) testResult;\r
}\r
* Returns it self after making the proper checks. Used for test data being\r
* their own data providers.\r
*/\r
+ @SuppressWarnings("unchecked")\r
public static <T extends TestData> T getItSelf(Class<T> clss,\r
TestData testDataObject) {\r
if (clss.isAssignableFrom(testDataObject.getClass())) {\r
}\r
}\r
\r
+ @SuppressWarnings("unchecked")\r
private static void registerInStructure(TestResult testResult,\r
TreeSRelated treeSRelated, String key) {\r
if (treeSRelated != null) {\r
}\r
}\r
\r
+ @SuppressWarnings("unchecked")\r
private static void resetStructure(TestResult testResult,\r
TreeSRelated treeSRelated) {\r
if (treeSRelated != null) {\r
private TreeSPath path;\r
private StructureRegistry<TreeSPath> registry;\r
\r
+ @SuppressWarnings("unchecked")\r
public void execute(TestRun testRun) {\r
if (log.isTraceEnabled())\r
log.trace("Execute sequence of test definitions...");\r
}\r
}\r
\r
+ @SuppressWarnings("unchecked")\r
public void notifyCurrentPath(StructureRegistry<TreeSPath> registry,\r
TreeSPath path) {\r
this.path = path;\r
return answer;
}
- public synchronized void sendRequest(DetachedRequest request) throws Exception {
+ public synchronized void sendRequest(DetachedRequest request)
+ throws Exception {
sendFile(requestsDir, request);
if (log.isTraceEnabled())
log.trace("Sent detached request #" + request.getUuid()
createIfNotExist(processedAnswersDir);
createIfNotExist(cleanedRequestsDir);
createIfNotExist(cleanedAnswersDir);
- log.info("Detached File Driver initialized on " + baseDir);
+ if (log.isDebugEnabled())
+ log.debug("Detached File Driver initialized on " + baseDir);
}
public void cleanPreviousRuns() throws Exception {
package org.argeo.slc.detached.drivers;
-import java.util.Stack;
-
import org.argeo.slc.detached.DetachedAnswer;
import org.argeo.slc.detached.DetachedClient;
import org.argeo.slc.detached.DetachedRequest;
public class MemoryDriver extends AbstractDriver implements DetachedClient {
- private final static Stack stack = new Stack();
// DRIVER
public DetachedRequest receiveRequest() throws Exception {
OsgiBoot osgiBoot = new OsgiBoot(bundleContext);
osgiBoot.bootstrap();
}
-//
-// protected static void startEquinox(Properties config) throws Exception {
-// info("java.home=" + System.getProperty("java.home"));
-// info("java.class.path=" + System.getProperty("java.class.path"));
-//
-// File baseDir = new File(System.getProperty("user.dir"))
-// .getCanonicalFile();
-// String equinoxConfigurationPath = baseDir.getPath() + File.separator
-// + "slc-detached" + File.separator + "equinoxConfiguration";
-//
-// String equinoxArgsLineDefault = "-console -noExit -clean -debug -configuration "
-// + equinoxConfigurationPath;
-// String equinoxArgsLine = config.getProperty(PROP_SLC_OSGI_EQUINOX_ARGS,
-// equinoxArgsLineDefault);
-// // String[] equinoxArgs = { "-console", "-noExit", "-clean", "-debug",
-// // "-configuration", equinoxConfigurationPath };
-// String[] equinoxArgs = equinoxArgsLine.split(" ");
-//
-// BundleContext context = EclipseStarter.startup(equinoxArgs, null);
-// }
protected static void startMainClass() {
Properties config = System.getProperties();
- String className = config.getProperty("slc.detached.appclass");
+ String className = config.getProperty("slc.osgiboot.appclass");
+ if (className == null)
+ return;
+
String[] uiArgs = readArgumentsFromLine(config.getProperty(
- "slc.detached.appargs", ""));
+ "slc.osgiboot.appargs", ""));
try {
// Launch main method using reflection
Class clss = Class.forName(className);