]> git.argeo.org Git - gpl/argeo-slc.git/blob - runtime/org.argeo.slc.core/src/test/java/org/argeo/slc/core/execution/tasks/SystemCallTest.java
b007b9a54dc8924d4768a861bae4db63a581fd0e
[gpl/argeo-slc.git] / runtime / org.argeo.slc.core / src / test / java / org / argeo / slc / core / execution / tasks / SystemCallTest.java
1 package org.argeo.slc.core.execution.tasks;
2
3 import org.apache.commons.logging.Log;
4 import org.apache.commons.logging.LogFactory;
5 import org.argeo.slc.core.execution.AbstractExecutionFlowTestCase;
6
7 public class SystemCallTest extends AbstractExecutionFlowTestCase {
8 private final static Log log = LogFactory.getLog(SystemCallTest.class);
9
10 private final String defFile = "systemCall.xml";
11
12 public void testSystemCallSimple() throws Exception {
13 if (isOsSupported())
14 configureAndExecuteSlcFlow(defFile, "systemCallSimple");
15 }
16
17 public void testSystemCallList() throws Exception {
18 if (isOsSupported())
19 configureAndExecuteSlcFlow(defFile, "systemCallList");
20 }
21
22 public void testSystemCallOsSpecific() throws Exception {
23 if (isOsSupported())
24 configureAndExecuteSlcFlow(defFile, "systemCallOsSpecific");
25 }
26
27 public void testSystemCallWithVar() throws Exception {
28 if (isOsSupported())
29 configureAndExecuteSlcFlow(defFile, "systemCallWithVar");
30 }
31
32 protected boolean isOsSupported() {
33 String osName = System.getProperty("os.name");
34 final Boolean ret;
35 if (osName.contains("Windows"))
36 ret = false;
37 else
38 ret = true;
39
40 if (ret == false)
41 log.warn("Skip test because OS '" + osName + "' is not supported.");
42 return ret;
43 }
44 }