]> git.argeo.org Git - gpl/argeo-slc.git/blob - org.argeo.slc.core/ext/test/org/argeo/slc/core/execution/tasks/SystemCallTest.java
Disable trace logging
[gpl/argeo-slc.git] / org.argeo.slc.core / ext / test / org / argeo / slc / core / execution / tasks / SystemCallTest.java
1 /*
2 * Copyright (C) 2007-2012 Argeo GmbH
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16 package org.argeo.slc.core.execution.tasks;
17
18 import org.apache.commons.logging.Log;
19 import org.apache.commons.logging.LogFactory;
20 import org.argeo.slc.core.execution.AbstractExecutionFlowTestCase;
21
22 public class SystemCallTest extends AbstractExecutionFlowTestCase {
23 private final static Log log = LogFactory.getLog(SystemCallTest.class);
24
25 private final String defFile = "systemCall.xml";
26
27 public void testSystemCallSimple() throws Exception {
28 if (isOsSupported())
29 configureAndExecuteSlcFlow(defFile, "systemCallSimple");
30 }
31
32 public void testSystemCallList() throws Exception {
33 if (isOsSupported())
34 configureAndExecuteSlcFlow(defFile, "systemCallList");
35 }
36
37 public void testSystemCallOsSpecific() throws Exception {
38 if (isOsSupported())
39 configureAndExecuteSlcFlow(defFile, "systemCallOsSpecific");
40 }
41
42 public void testSystemCallWithVar() throws Exception {
43 if (isOsSupported())
44 configureAndExecuteSlcFlow(defFile, "systemCallWithVar");
45 }
46
47 protected boolean isOsSupported() {
48 String osName = System.getProperty("os.name");
49 final Boolean ret;
50 if (osName.contains("Windows"))
51 ret = false;
52 else
53 ret = true;
54
55 if (ret == false)
56 log.warn("Skip test because OS '" + osName + "' is not supported.");
57 return ret;
58 }
59 }