From 0dce3191754bd73138ff6a72e576a2af05f850ba Mon Sep 17 00:00:00 2001
From: Sven Gothel <sgothel@jausoft.com>
Date: Fri, 24 Feb 2012 17:43:45 +0100
Subject: Introduce environment-var/property to disable unit tests (per node)

JUNIT_DISABLED -> junit.is.disabled
---
 make/build-test.xml                                | 9 +++++----
 make/gluegen-cpptasks.xml                          | 4 ----
 make/jogamp-env.xml                                | 7 +++++++
 make/scripts/make.gluegen.all.linux-armv7-cross.sh | 1 +
 4 files changed, 13 insertions(+), 8 deletions(-)

diff --git a/make/build-test.xml b/make/build-test.xml
index 4c06b7b..bfae919 100644
--- a/make/build-test.xml
+++ b/make/build-test.xml
@@ -373,7 +373,7 @@ ${line.separator}
         </junit>
     </target>
 
-    <target name="junit.run.settings">
+    <target name="junit.run.settings" depends="init, gluegen.cpptasks.detect.os">
         <!-- Use absolute path -->
         <property name="gluegen.lib.abs" location="${gluegen.lib}" />
         <property name="build_t.lib.abs" location="${build_t.lib}" />
@@ -386,7 +386,7 @@ ${line.separator}
         <mkdir dir="${build}/test/results"/>
     </target>
 
-    <target name="junit.run.d32" if="isOSX">
+    <target name="junit.run.local.d32" if="isOSX">
         <var name="jvmDataModel.arg" unset="true"/>
         <var name="jvmDataModel.arg" value="-d32"/>
 
@@ -402,9 +402,10 @@ ${line.separator}
         <var name="jvmDataModel.arg" value="-d64"/>
     </target>
 
-    <target name="junit.run.tests" depends="junit.run.local, junit.run.remote.ssh, junit.run.remote.adb"/>
+    <target name="junit.run.tests" depends="junit.run.local.d32, junit.run.local, junit.run.remote.ssh, junit.run.remote.adb"/>
 
-    <target name="junit.run" depends="init, gluegen.cpptasks.detect.os, junit.run.settings, junit.run.d32, junit.run.tests">
+    <target name="junit.run" depends="junit.run.settings" unless="junit.is.disabled">
+        <antcall target="junit.run.tests"      inheritRefs="true" inheritAll="true"/>
         <antcall target="test-zip-archive" inheritRefs="true" />
     </target>
 
diff --git a/make/gluegen-cpptasks.xml b/make/gluegen-cpptasks.xml
index 30944d8..bae7c6d 100755
--- a/make/gluegen-cpptasks.xml
+++ b/make/gluegen-cpptasks.xml
@@ -35,10 +35,6 @@
   <property name="gluegen-cpptasks.file"             value="${gluegen.root}/make/gluegen-cpptasks-base.xml" />   <!-- default value -->
   <property name="gluegen-cpptasks.file.abs-path" location="${gluegen-cpptasks.file}" />
 
-  <!--echo message="GLUEGEN_CPPTASKS_FILE        ${env.GLUEGEN_CPPTASKS_FILE}"/>
-  <echo message="gluegen-cpptasks.file           ${gluegen-cpptasks.file}"/-->
-  <echo message="gluegen-cpptasks.file.abs-path  ${gluegen-cpptasks.file.abs-path}"/>
-
   <import file="${gluegen-cpptasks.file.abs-path}" optional="false" />
 
 </project>
diff --git a/make/jogamp-env.xml b/make/jogamp-env.xml
index de8995d..07083c7 100755
--- a/make/jogamp-env.xml
+++ b/make/jogamp-env.xml
@@ -52,6 +52,13 @@
   <target name="jogamp.env.init" depends="jogamp.env.validation">
     <property environment="env" />
 
+    <condition property="junit.is.disabled" value="${env.JUNIT_DISABLED}">
+        <not>
+         <equals arg1="${env.JUNIT_DISABLED}" arg2="$${env.JUNIT_DISABLED}" casesensitive="true" />
+        </not>
+    </condition>
+    <echo message="junit.is.disabled         ${junit.is.disabled}"/>
+
     <condition property="junit.run.arg0" value="${env.JUNIT_RUN_ARG0}">
         <not>
          <equals arg1="${env.JUNIT_RUN_ARG0}" arg2="$${env.JUNIT_RUN_ARG0}" casesensitive="true" />
diff --git a/make/scripts/make.gluegen.all.linux-armv7-cross.sh b/make/scripts/make.gluegen.all.linux-armv7-cross.sh
index 43aed5f..152c247 100755
--- a/make/scripts/make.gluegen.all.linux-armv7-cross.sh
+++ b/make/scripts/make.gluegen.all.linux-armv7-cross.sh
@@ -32,6 +32,7 @@ export TARGET_JAVA_LIBS=/opt-linux-armv7-eabi/jre/lib/arm
 
 export GLUEGEN_CPPTASKS_FILE="lib/gluegen-cpptasks-linux-armv7.xml"
 
+#export JUNIT_DISABLED="true"
 export JUNIT_RUN_ARG0="-Dnewt.test.Screen.disableScreenMode"
 
 ant \
-- 
cgit v1.2.3