mtchamengo / aparapi

Automatically exported from code.google.com/p/aparapi
Other
0 stars 0 forks source link

build.xml files need work to run runtime tests correctly in a shell #79

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Do "ant test" in the trunk/ dir
2. Look in the html results such as file:///... 
/trunk/test/runtime/junit/html/index.html
3.

What is the expected output? What do you see instead?

Currently you will see this in the :

Check your environment. Failed to load aparapi native library aparapi_x86_64 or 
possibly failed to locate opencl native library (opencl.dll/opencl.so). Ensure 
that both are in your PATH (windows) or in LD_LIBRARY_PATH (linux).

The java.library.path is wrong for these tests so they fall back to JTP

Please use labels and text to provide additional information.

Original issue reported on code.google.com by ecasp...@gmail.com on 1 Nov 2012 at 9:47

GoogleCodeExporter commented 9 years ago
I am working on testing this:

ecaspole@ecaspole-desktop:~/views/aparapi/svn/trunk$ svn diff build.xml 
Index: build.xml
===================================================================
--- build.xml   (revision 838)
+++ build.xml   (working copy)
@@ -55,8 +55,8 @@
       </subant>
    </target>

-   <target name="test" depends="clean">
-      <ant dir="com.amd.aparapi" target="build"/> 
+   <target name="test" depends="build">
+      <!-- <ant dir="com.amd.aparapi" target="build"/>  -->
       <subant target="junit">
          <fileset dir="test" includes="*/build.xml"/>
       </subant>
ecaspole@ecaspole-desktop:~/views/aparapi/svn/trunk$ 
ecaspole@ecaspole-desktop:~/views/aparapi/svn/trunk$ svn diff 
test/runtime/build.xml 
Index: test/runtime/build.xml
===================================================================
--- test/runtime/build.xml  (revision 838)
+++ test/runtime/build.xml  (working copy)
@@ -64,7 +64,7 @@
       <!-- even though fork is slower we need to set the library path and this requires fork -->

       <junit printsummary="false" fork="true" haltonfailure="false" failureproperty="tests.failed" showoutput="false">
-         <sysproperty key="java.library.path" 
value="..\..\com.amd.aparapi.jni\dist"/>
+         <sysproperty key="java.library.path" 
value="${basedir}/../../com.amd.aparapi.jni/dist"/>
          <formatter type="xml" />
          <classpath refid="classpath"/>
          <batchtest todir="junit/data">
ecaspole@ecaspole-desktop:~/views/aparapi/svn/trunk$ 

Original comment by ecasp...@gmail.com on 1 Nov 2012 at 9:48

GoogleCodeExporter commented 9 years ago
Here is a patch to fix the java.library.path and make test depend on build, not 
clean so the libraries are not erased in the course of the build.

Original comment by ecasp...@gmail.com on 2 Nov 2012 at 2:51

Attachments:

GoogleCodeExporter commented 9 years ago
 Test com.amd.aparapi.test.runtime.CallStaticFromAnonymousKernel FAILS form me after applying this patch.  Is this patch expecting to fix this?

Original comment by frost.g...@gmail.com on 2 Nov 2012 at 7:13

GoogleCodeExporter commented 9 years ago
Yes that test still needs fixing separate from build.xml changes.

Original comment by ecasp...@gmail.com on 9 Nov 2012 at 5:03

GoogleCodeExporter commented 9 years ago
I just updated the CallStaticFromAnonymousKernel so it is legal aparapi in r846.

Original comment by ecasp...@gmail.com on 9 Nov 2012 at 6:29

GoogleCodeExporter commented 9 years ago
I just committed this in rev 974. Tested on linux, and on windows with cygwin 
and dos shell

Original comment by ecasp...@gmail.com on 22 Jan 2013 at 5:20