diff options
author | Sven Gothel <[email protected]> | 2012-03-28 17:40:49 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2012-03-28 17:40:49 +0200 |
commit | 133db9f855b351e25c1b9ebf752fdb05e03ae36c (patch) | |
tree | 5ab142086a6093e162d16fd36bdc3958e48fc1a4 | |
parent | 469a4987bd6be2fe49c2e6e0fb97a42f26eabfbe (diff) |
Test: Add dump of environment vars
-rwxr-xr-x | make/scripts/runtest.sh | 4 | ||||
-rw-r--r-- | src/junit/com/jogamp/common/util/TestSystemPropsAndEnvs.java (renamed from src/junit/com/jogamp/common/util/TestSystemProperties.java) | 21 |
2 files changed, 19 insertions, 6 deletions
diff --git a/make/scripts/runtest.sh b/make/scripts/runtest.sh index a0034d6..a7c136e 100755 --- a/make/scripts/runtest.sh +++ b/make/scripts/runtest.sh @@ -68,8 +68,8 @@ function onetest() { echo } -onetest com.jogamp.common.GlueGenVersion 2>&1 | tee -a $LOG -#onetest com.jogamp.common.util.TestSystemProperties 2>&1 | tee -a $LOG +#onetest com.jogamp.common.GlueGenVersion 2>&1 | tee -a $LOG +onetest com.jogamp.common.util.TestSystemPropsAndEnvs 2>&1 | tee -a $LOG #onetest com.jogamp.common.util.TestVersionInfo 2>&1 | tee -a $LOG #onetest com.jogamp.common.util.TestIteratorIndexCORE 2>&1 | tee -a $LOG #onetest com.jogamp.common.util.locks.TestRecursiveLock01 2>&1 | tee -a $LOG diff --git a/src/junit/com/jogamp/common/util/TestSystemProperties.java b/src/junit/com/jogamp/common/util/TestSystemPropsAndEnvs.java index 8ede038..d9afe1d 100644 --- a/src/junit/com/jogamp/common/util/TestSystemProperties.java +++ b/src/junit/com/jogamp/common/util/TestSystemPropsAndEnvs.java @@ -37,7 +37,7 @@ import org.junit.Test; import com.jogamp.junit.util.JunitTracer; -public class TestSystemProperties extends JunitTracer { +public class TestSystemPropsAndEnvs extends JunitTracer { @Test public void dumpProperties() { @@ -47,13 +47,26 @@ public class TestSystemProperties extends JunitTracer { while (iter.hasNext()) { i++; Map.Entry<Object, Object> entry = iter.next(); - System.out.println(i+": "+entry.getKey() + " = " + entry.getValue()); + System.out.format("%4d: %s = %s%n", i, entry.getKey(), entry.getValue()); } - System.out.println("Property count: "+i); + System.out.println("Property count: "+i); + } + + @Test + public void dumpEnvironment() { + int i=0; + Map<String, String> env = System.getenv(); + for (String envName : env.keySet()) { + i++; + System.out.format("%4d: %s = %s%n", + i, envName, + env.get(envName)); + } + System.out.println("Environment count: "+i); } public static void main(String args[]) throws IOException { - String tstname = TestSystemProperties.class.getName(); + String tstname = TestSystemPropsAndEnvs.class.getName(); org.junit.runner.JUnitCore.main(tstname); } |