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. --- src/java/com/jogamp/common/os/AndroidVersion.java | 2 +- .../test/junit/generation/BuildEnvironment.java | 18 ++++++++---------- 2 files changed, 9 insertions(+), 11 deletions(-) (limited to 'src') 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