Commits

Anonymous committed 9a8bf95

set these as default properties unless you provide differnet values on the command line.

Comments (0)

Files changed (3)

             depends="jar, compile.test, test-basic, test-multi, test-report" 
             description="Run junit tests.">
 
-        <available property="test.failed" file="target/test-reports/failed.true" />
+        <available property="test.failed" file="target/test-failed.true" />
 
         <echo message="test.failed (fail(3)): ${test.failed}"/>
 
 
         <echo message="test.failed: ${test.failed}"/>
 
-        <touch file="target/test-reports/failed.${test.failed}" />
+        <touch file="target/test-failed.${test.failed}" />
 
     </target>
 

src/test/peregrine/BaseTest.java

 
     }
 
+    public static void setPropertyDefault( String key, String value ) {
+
+        if ( System.getProperty( key ) == null )
+            System.setProperty( key , value );
+        
+    }
+    
     /**
      * Method to allow ALL junit classes to be called from the command line
      * which allows for us having less main() methods cluttering up the test

src/test/peregrine/TestMapReduce.java

 
         //System.setProperty( "peregrine.test.config", "1:1:1" ); // 3sec
 
-        System.setProperty( "peregrine.test.factor", "1" ); // 
-        System.setProperty( "peregrine.test.config", "01:01:04" ); // takes 3 seconds
+        setPropertyDefault( "peregrine.test.factor", "1" ); // 
+        setPropertyDefault( "peregrine.test.config", "01:01:04" ); // takes 3 seconds
 
         // 256 partitions... 
         //System.setProperty( "peregrine.test.config", "08:01:32" );  // 1m