From 1d1fd17cca064306dd5d528d59a4bce0581dcc63 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Mon, 25 Jul 2011 13:58:45 +0200 Subject: Cross JUnit Tests - All Passed: Android+Linux armv7 - junit.cross targets: - use scripting to save time, ie write all target commands to script, xfer, exec - junit: delete result folder just before junit.run - Test BuildEnvironment.java: Simplify path config via properties (for android) - AndroidVersion: No annoying exception dump if Build$VERSION* is not found (not android) - launch scripts: use absolute TARGET_ROOT path for dynamic linker env. --- make/build-test.xml | 153 ++++++++++----------- make/build.xml | 2 +- .../make.gluegen.all.android-armv7-cross.sh | 2 +- make/scripts/make.gluegen.all.linux-armv7-cross.sh | 2 +- src/java/com/jogamp/common/os/AndroidVersion.java | 2 +- .../test/junit/generation/BuildEnvironment.java | 18 ++- 6 files changed, 86 insertions(+), 93 deletions(-) diff --git a/make/build-test.xml b/make/build-test.xml index a0a9783..51dc554 100644 --- a/make/build-test.xml +++ b/make/build-test.xml @@ -196,12 +196,6 @@ - - - - - - @@ -216,11 +210,13 @@ - - - - - + + + @@ -240,46 +236,45 @@ - - - - - - - - - - - - - - - - - - - - - - + - - + + - - - - - + + + @@ -299,42 +294,35 @@ - - - - - - - - - - - - - - - - - - - - - - - - - + - - + + - @@ -342,6 +330,7 @@ + + + + + + + diff --git a/make/build.xml b/make/build.xml index 89426ec..29f1428 100644 --- a/make/build.xml +++ b/make/build.xml @@ -737,7 +737,7 @@ - + diff --git a/make/scripts/make.gluegen.all.android-armv7-cross.sh b/make/scripts/make.gluegen.all.android-armv7-cross.sh index 21f4263..a19a092 100755 --- a/make/scripts/make.gluegen.all.android-armv7-cross.sh +++ b/make/scripts/make.gluegen.all.android-armv7-cross.sh @@ -6,7 +6,7 @@ export HOST_RSYNC_ROOT=PROJECTS/JOGL export TARGET_UID=jogamp export TARGET_IP=beagle01 -export TARGET_ROOT=projects-cross +export TARGET_ROOT=/projects export TARGET_ANT_HOME=/usr/share/ant if [ -z "$NDK_ROOT" ] ; then diff --git a/make/scripts/make.gluegen.all.linux-armv7-cross.sh b/make/scripts/make.gluegen.all.linux-armv7-cross.sh index ee355ac..1002756 100755 --- a/make/scripts/make.gluegen.all.linux-armv7-cross.sh +++ b/make/scripts/make.gluegen.all.linux-armv7-cross.sh @@ -16,7 +16,7 @@ export HOST_RSYNC_ROOT=PROJECTS/JOGL export TARGET_UID=jogamp export TARGET_IP=beagle01 -export TARGET_ROOT=projects-cross +export TARGET_ROOT=/home/jogamp/projects-cross export TARGET_ANT_HOME=/usr/share/ant ant \ diff --git a/src/java/com/jogamp/common/os/AndroidVersion.java b/src/java/com/jogamp/common/os/AndroidVersion.java index b5a7cfa..22786d2 100644 --- a/src/java/com/jogamp/common/os/AndroidVersion.java +++ b/src/java/com/jogamp/common/os/AndroidVersion.java @@ -43,7 +43,7 @@ public class AndroidVersion { abvObject = abvClass.newInstance(); abvcClass = ReflectionUtil.getClass(androidBuildVersionCodes, true, cl); abvcObject = abvcClass.newInstance(); - } catch (Exception e) { e.printStackTrace(); /* n/a */ } + } catch (Exception e) { /* n/a */ } isAvailable = null != abvObject ; if(isAvailable) { CODENAME = getString(abvClass, abvObject, "CODENAME"); diff --git a/src/junit/com/jogamp/gluegen/test/junit/generation/BuildEnvironment.java b/src/junit/com/jogamp/gluegen/test/junit/generation/BuildEnvironment.java index 3b883aa..a09d1a9 100644 --- a/src/junit/com/jogamp/gluegen/test/junit/generation/BuildEnvironment.java +++ b/src/junit/com/jogamp/gluegen/test/junit/generation/BuildEnvironment.java @@ -51,23 +51,21 @@ public final class BuildEnvironment { out.println(VersionUtil.getPlatformInfo()); out.println("VM: " + System.getProperty("java.vm.name")); + // setup paths String rootrel_build_tmp = System.getProperty("rootrel.build"); if(null==rootrel_build_tmp || rootrel_build_tmp.length()==0) { - rootrel_build_tmp = "build" ; + throw new RuntimeException("Pls specify property rootrel.build"); } rootrel_build = rootrel_build_tmp; out.println("rootrel.build: " + rootrel_build); - // setup paths - try { - File executionRoot = new File(BuildEnvironment.class.getProtectionDomain().getCodeSource().getLocation().toURI()); - out.println("execution root: " + executionRoot); - gluegenRoot = executionRoot.getParentFile().getParentFile().getParentFile().getParentFile().toString(); - out.println("gluegen project root: " + gluegenRoot); - } catch (URISyntaxException ex) { - throw new RuntimeException("can not determine gluegen root", ex); + String gluegen_root_tmp = System.getProperty("gluegen.root"); + if(null==gluegen_root_tmp || gluegen_root_tmp.length()==0) { + throw new RuntimeException("Pls specify property gluegen.root"); } - + gluegenRoot = gluegen_root_tmp; + out.println("gluegen.root: " + gluegenRoot); + testOutput = gluegenRoot + "/" + rootrel_build + "/test"; out.println("testOutput: "+testOutput); -- cgit v1.2.3