You are viewing a plain text version of this content. The canonical link for it is here.
Posted to kato-commits@incubator.apache.org by sp...@apache.org on 2009/09/28 14:51:09 UTC
svn commit: r819568 - in
/incubator/kato/trunk/org.apache.kato/kato.native/kato.native.vmapi:
tests/pom.xml
tests/src/test/java/test/apache/kato/vmapi/TestLibraryLoad.java win32/
Author: spoole
Date: Mon Sep 28 14:51:09 2009
New Revision: 819568
URL: http://svn.apache.org/viewvc?rev=819568&view=rev
Log:
2nd initial drop of code for vm api support
Modified:
incubator/kato/trunk/org.apache.kato/kato.native/kato.native.vmapi/tests/pom.xml
incubator/kato/trunk/org.apache.kato/kato.native/kato.native.vmapi/tests/src/test/java/test/apache/kato/vmapi/TestLibraryLoad.java
incubator/kato/trunk/org.apache.kato/kato.native/kato.native.vmapi/win32/ (props changed)
Modified: incubator/kato/trunk/org.apache.kato/kato.native/kato.native.vmapi/tests/pom.xml
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato/kato.native/kato.native.vmapi/tests/pom.xml?rev=819568&r1=819567&r2=819568&view=diff
==============================================================================
--- incubator/kato/trunk/org.apache.kato/kato.native/kato.native.vmapi/tests/pom.xml (original)
+++ incubator/kato/trunk/org.apache.kato/kato.native/kato.native.vmapi/tests/pom.xml Mon Sep 28 14:51:09 2009
@@ -24,7 +24,7 @@
</dependencies>
<properties>
- <foo>${basedir}/../target</foo>
+
</properties>
<build>
<plugins>
@@ -36,7 +36,7 @@
<systemProperties>
<property>
<name>libloc</name>
- <value>${foo}</value>
+ <value>${basedir}/../target</value>
</property>
</systemProperties>
</configuration>
Modified: incubator/kato/trunk/org.apache.kato/kato.native/kato.native.vmapi/tests/src/test/java/test/apache/kato/vmapi/TestLibraryLoad.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato/kato.native/kato.native.vmapi/tests/src/test/java/test/apache/kato/vmapi/TestLibraryLoad.java?rev=819568&r1=819567&r2=819568&view=diff
==============================================================================
--- incubator/kato/trunk/org.apache.kato/kato.native/kato.native.vmapi/tests/src/test/java/test/apache/kato/vmapi/TestLibraryLoad.java (original)
+++ incubator/kato/trunk/org.apache.kato/kato.native/kato.native.vmapi/tests/src/test/java/test/apache/kato/vmapi/TestLibraryLoad.java Mon Sep 28 14:51:09 2009
@@ -9,14 +9,24 @@
public class TestLibraryLoad extends TestCase {
private static String getLibName() {
- String libloc=System.getProperties().get("libloc").toString();
- File dir=new File(libloc);
+ Object libloc=System.getProperties().get("libloc");
+ if(libloc==null) throw new RuntimeException("system property libloc which defines the directory containing the native lib is missing");
+ String location=libloc.toString();
+ File dir=new File(location);
+ if(dir.exists()==false) {
+ throw new RuntimeException("Directory location defined by system property libloc does not exist [libloc="+location+"]");
+ }
+ if(dir.isDirectory()==false) {
+ throw new RuntimeException("Directory location defined by system property libloc exists but is not a directory [libloc="+location+"]");
+ }
+
File[] kids=dir.listFiles();
for(File kid:dir.listFiles()) {
String name=kid.getName();
if(name.contains("katovmapi")) return kid.getAbsolutePath();
}
- return null;
+ throw new RuntimeException("system property libloc location does not hold a file matching *katovmapi* [libloc="+location+"]");
+
}
public void testTrigger() {
Propchange: incubator/kato/trunk/org.apache.kato/kato.native/kato.native.vmapi/win32/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Mon Sep 28 14:51:09 2009
@@ -0,0 +1 @@
+target