Added an integration test showing how to use LSF C API to get LSF parameters.
git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@6025 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
parent
8e149cc52f
commit
a1f8aa90c0
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
package org.broadinstitute.sting.jna.lsf.v7_0_6;
|
||||
|
||||
import com.sun.jna.StringArray;
|
||||
import com.sun.jna.*;
|
||||
import com.sun.jna.ptr.IntByReference;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
import org.broadinstitute.sting.utils.Utils;
|
||||
|
|
@ -34,6 +34,7 @@ import org.testng.annotations.Test;
|
|||
import org.broadinstitute.sting.BaseTest;
|
||||
import org.broadinstitute.sting.jna.lsf.v7_0_6.LibBat.*;
|
||||
|
||||
import javax.jws.soap.SOAPBinding;
|
||||
import java.io.File;
|
||||
|
||||
/**
|
||||
|
|
@ -52,6 +53,29 @@ public class LibBatIntegrationTest extends BaseTest {
|
|||
Assert.assertNotNull(clusterName);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testReadConfEnv() {
|
||||
LibLsf.config_param[] unitsParam = (LibLsf.config_param[]) new LibLsf.config_param().toArray(4);
|
||||
|
||||
unitsParam[0].paramName = "LSF_UNIT_FOR_LIMITS";
|
||||
unitsParam[1].paramName = "LSF_CONFDIR";
|
||||
unitsParam[2].paramName = "MADE_UP_PARAMETER";
|
||||
|
||||
Structure.autoWrite(unitsParam);
|
||||
|
||||
if (LibLsf.ls_readconfenv(unitsParam[0], null) != 0) {
|
||||
Assert.fail(LibLsf.ls_sysmsg());
|
||||
}
|
||||
|
||||
Structure.autoRead(unitsParam);
|
||||
|
||||
System.out.println("LSF_UNIT_FOR_LIMITS: " + unitsParam[0].paramValue);
|
||||
Assert.assertNotNull(unitsParam[1].paramValue);
|
||||
Assert.assertNull(unitsParam[2].paramValue);
|
||||
Assert.assertNull(unitsParam[3].paramName);
|
||||
Assert.assertNull(unitsParam[3].paramValue);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testReadQueueLimits() {
|
||||
String queue = "hour";
|
||||
|
|
|
|||
Loading…
Reference in New Issue