aboutsummaryrefslogtreecommitdiffstats
path: root/make
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2012-02-23 19:25:05 +0100
committerSven Gothel <[email protected]>2012-02-23 19:25:05 +0100
commit5459979a097f91011d3f23ff6f25e1dc34b1d52a (patch)
tree4d10979ed458d1cb8e9a4a35712c48479e8f1517 /make
parent071a08dd884dced1bd1f4b24c8e968f3d468aec6 (diff)
Passing environment-vars and ant-properties to junit tests, enabling fine grained controll of test behavior.
Environment vars, mapped to properties: JUNIT_RUN_ARG0 -> junit.run.arg0 JUNIT_RUN_ARG1 -> junit.run.arg1 This allows us to disable ScreenMode on Linux-ARM-Omap4 for example, where XRandR calls consume up to 3s per test.
Diffstat (limited to 'make')
-rw-r--r--make/build-test.xml7
-rwxr-xr-xmake/jogamp-env.xml15
2 files changed, 21 insertions, 1 deletions
diff --git a/make/build-test.xml b/make/build-test.xml
index 2a7220a..0a8a14f 100644
--- a/make/build-test.xml
+++ b/make/build-test.xml
@@ -243,6 +243,9 @@ export ${system.env.library.path}=${env.TARGET_ROOT}/gluegen/${rootrel.build}/ob
<echo message="Testing ${test.class.fqn} -- ${test.class.result.file}"/>
<echo message="${line.separator}
java \${line.separator}
+${junit.run.arg0}\${line.separator}
+${junit.run.arg1}\${line.separator}
+${jvmDataModel.arg}\${line.separator}
-Djava.library.path=${env.TARGET_ROOT}/gluegen/${rootrel.build}/obj${path.separator}${env.TARGET_ROOT}/gluegen/${rootrel.build}/test/build/natives\${line.separator}
-cp ${junit.run.remote.jars}\${line.separator}
-Dgluegen.root=${gluegen.root} \${line.separator}
@@ -266,7 +269,7 @@ ${line.separator}
<arg line='-x -c "
chmod 0755 ${build_t}/targetcommand.sh ;
scp ${build_t}/targetcommand.sh ${env.TARGET_UID}@${env.TARGET_IP}:${env.TARGET_ROOT}/targetcommand.sh ;
- ssh ${env.TARGET_UID}@${env.TARGET_IP} ${env.TARGET_ROOT}/targetcommand.sh ;
+ ssh -x ${env.TARGET_UID}@${env.TARGET_IP} ${env.TARGET_ROOT}/targetcommand.sh ;
scp -pr ${env.TARGET_UID}@${env.TARGET_IP}:${env.TARGET_ROOT}/gluegen/make/${results}/* ${results}/ "'/>
</exec>
</target>
@@ -337,6 +340,8 @@ ${line.separator}
<!-- Perform the junit tests-->
<junit forkmode="once" showoutput="true" fork="true" timeout="${batchtest.timeout}">
<env key="${system.env.library.path}" path="${gluegen.lib.abs}${path.separator}${build_t.lib.abs}"/>
+ <jvmarg value="${junit.run.arg0}"/>
+ <jvmarg value="${junit.run.arg1}"/>
<jvmarg value="${jvmDataModel.arg}"/>
<jvmarg value="-Djava.library.path=${gluegen.lib.abs}${path.separator}${build_t.lib.abs}"/>
<jvmarg value="-Dgluegen.root=${gluegen.root}"/>
diff --git a/make/jogamp-env.xml b/make/jogamp-env.xml
index d6143f8..de8995d 100755
--- a/make/jogamp-env.xml
+++ b/make/jogamp-env.xml
@@ -52,6 +52,19 @@
<target name="jogamp.env.init" depends="jogamp.env.validation">
<property environment="env" />
+ <condition property="junit.run.arg0" value="${env.JUNIT_RUN_ARG0}">
+ <not>
+ <equals arg1="${env.JUNIT_RUN_ARG0}" arg2="$${env.JUNIT_RUN_ARG0}" casesensitive="true" />
+ </not>
+ </condition>
+ <property name="junit.run.arg0" value="-Djunit.run.arg0=dummy" /> <!-- default dummy values -->
+ <condition property="junit.run.arg1" value="${env.JUNIT_RUN_ARG1}">
+ <not>
+ <equals arg1="${env.JUNIT_RUN_ARG1}" arg2="$${env.JUNIT_RUN_ARG1}" casesensitive="true" />
+ </not>
+ </condition>
+ <property name="junit.run.arg1" value="-Djunit.run.arg1=dummy" /> <!-- default dummy values -->
+
<!-- only set 'build.archiveon' if set in environment to trigger archive creation -->
<condition property="build.archiveon" value="${env.BUILD_ARCHIVE}">
<istrue value="${env.BUILD_ARCHIVE}"/>
@@ -179,6 +192,8 @@
<echo message="android.version ${android.version}"/>
+ <echo message="junit.run.arg0 ${junit.run.arg0}"/>
+ <echo message="junit.run.arg1 ${junit.run.arg1}"/>
</target>
</project>