http://git-wip-us.apache.org/repos/asf/systemml/blob/95bf8cfe/src/test/java/org/apache/sysml/test/integration/functions/ternary/FullIfElseTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/ternary/FullIfElseTest.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/ternary/FullIfElseTest.java
index 95f43ac..efb87d8 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/ternary/FullIfElseTest.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/ternary/FullIfElseTest.java
@@ -297,15 +297,11 @@ public class FullIfElseTest extends AutomatedTestBase
        
        private void runIfElseTest(boolean matrix1, boolean matrix2, boolean 
matrix3, boolean sparse, ExecType et)
        {
-               //rtplatform for MR
-               RUNTIME_PLATFORM platformOld = rtplatform;
-               switch( et ){
-                       case MR: rtplatform = RUNTIME_PLATFORM.HADOOP; break;
-                       case SPARK: rtplatform = RUNTIME_PLATFORM.SPARK; break;
-                       default: rtplatform = RUNTIME_PLATFORM.HYBRID_SPARK; 
break;
-               }
-       
                boolean sparkConfigOld = DMLScript.USE_LOCAL_SPARK_CONFIG;
+               RUNTIME_PLATFORM platformOld = setRuntimePlatform(et);
+               if(shouldSkipTest())
+                       return;
+               
                boolean rewritesOld = 
OptimizerUtils.ALLOW_ALGEBRAIC_SIMPLIFICATION;
                if( rtplatform == RUNTIME_PLATFORM.SPARK || rtplatform == 
RUNTIME_PLATFORM.HYBRID_SPARK )
                        DMLScript.USE_LOCAL_SPARK_CONFIG = true;

http://git-wip-us.apache.org/repos/asf/systemml/blob/95bf8cfe/src/test/java/org/apache/sysml/test/integration/functions/ternary/QuantileWeightsTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/ternary/QuantileWeightsTest.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/ternary/QuantileWeightsTest.java
index 44b4282..c8efd90 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/ternary/QuantileWeightsTest.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/ternary/QuantileWeightsTest.java
@@ -206,17 +206,10 @@ public class QuantileWeightsTest extends AutomatedTestBase
        
        private void runQuantileTest( String TEST_NAME, double p, boolean 
sparse, ExecType et)
        {
-               //rtplatform for MR
-               RUNTIME_PLATFORM platformOld = rtplatform;
-               switch( et ){
-                       case MR: rtplatform = RUNTIME_PLATFORM.HADOOP; break;
-                       case SPARK: rtplatform = RUNTIME_PLATFORM.SPARK; break;
-                       default: rtplatform = RUNTIME_PLATFORM.HYBRID; break;
-               }
-       
                boolean sparkConfigOld = DMLScript.USE_LOCAL_SPARK_CONFIG;
-               if( rtplatform == RUNTIME_PLATFORM.SPARK )
-                       DMLScript.USE_LOCAL_SPARK_CONFIG = true;
+               RUNTIME_PLATFORM platformOld = setRuntimePlatform(et);
+               if(shouldSkipTest())
+                       return;
                
                try
                {

http://git-wip-us.apache.org/repos/asf/systemml/blob/95bf8cfe/src/test/java/org/apache/sysml/test/integration/functions/ternary/TableOutputTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/ternary/TableOutputTest.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/ternary/TableOutputTest.java
index 2c51ad8..91b66db 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/ternary/TableOutputTest.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/ternary/TableOutputTest.java
@@ -21,7 +21,6 @@ package org.apache.sysml.test.integration.functions.ternary;
 
 import java.util.HashMap;
 
-import org.junit.Assert;
 import org.junit.Test;
 
 import org.apache.sysml.api.DMLScript;
@@ -114,18 +113,10 @@ public class TableOutputTest extends AutomatedTestBase
         */
        private void runTableOutputTest( ExecType et, int delta)
        {
-               //rtplatform for MR
-               RUNTIME_PLATFORM platformOld = rtplatform;
-
-               switch( et ){
-                       case MR: rtplatform = RUNTIME_PLATFORM.HADOOP; break;
-                       case SPARK: rtplatform = RUNTIME_PLATFORM.SPARK; break;
-                       default: rtplatform = RUNTIME_PLATFORM.HYBRID; break;
-               }
-       
                boolean sparkConfigOld = DMLScript.USE_LOCAL_SPARK_CONFIG;
-               if( rtplatform == RUNTIME_PLATFORM.SPARK )
-                       DMLScript.USE_LOCAL_SPARK_CONFIG = true;
+               RUNTIME_PLATFORM platformOld = setRuntimePlatform(et);
+               if(shouldSkipTest())
+                       return;
                
                try
                {
@@ -177,7 +168,7 @@ public class TableOutputTest extends AutomatedTestBase
                        } catch(Exception e) {
                                e.printStackTrace();
                        }
-                       Assert.assertEquals(0, numErrors);
+                       assertEquals(0, numErrors);
 
                        numErrors = 0;
                        if ( delta > 0 ) {
@@ -193,7 +184,7 @@ public class TableOutputTest extends AutomatedTestBase
                                        }
                                }
                        }
-                       Assert.assertEquals(0, numErrors);
+                       assertEquals(0, numErrors);
                }
                finally
                {
@@ -201,4 +192,4 @@ public class TableOutputTest extends AutomatedTestBase
                        DMLScript.USE_LOCAL_SPARK_CONFIG = sparkConfigOld;
                }
        }
-} 
\ No newline at end of file
+} 

http://git-wip-us.apache.org/repos/asf/systemml/blob/95bf8cfe/src/test/java/org/apache/sysml/test/integration/functions/ternary/TernaryAggregateTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/ternary/TernaryAggregateTest.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/ternary/TernaryAggregateTest.java
index 600a6c0..440aadf 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/ternary/TernaryAggregateTest.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/ternary/TernaryAggregateTest.java
@@ -21,7 +21,6 @@ package org.apache.sysml.test.integration.functions.ternary;
 
 import java.util.HashMap;
 
-import org.junit.Assert;
 import org.junit.Test;
 
 import org.apache.sysml.api.DMLScript;
@@ -206,17 +205,10 @@ public class TernaryAggregateTest extends 
AutomatedTestBase
        
        private void runTernaryAggregateTest(String testname, boolean sparse, 
boolean vectors, boolean rewrites, ExecType et)
        {
-               //rtplatform for MR
-               RUNTIME_PLATFORM platformOld = rtplatform;
-               switch( et ){
-                       case MR: rtplatform = RUNTIME_PLATFORM.HADOOP; break;
-                       case SPARK: rtplatform = RUNTIME_PLATFORM.SPARK; break;
-                       default: rtplatform = RUNTIME_PLATFORM.HYBRID; break;
-               }
-       
                boolean sparkConfigOld = DMLScript.USE_LOCAL_SPARK_CONFIG;
-               if( rtplatform == RUNTIME_PLATFORM.SPARK )
-                       DMLScript.USE_LOCAL_SPARK_CONFIG = true;
+               RUNTIME_PLATFORM platformOld = setRuntimePlatform(et);
+               if(shouldSkipTest())
+                       return;
        
                boolean rewritesOld = OptimizerUtils.ALLOW_SUM_PRODUCT_REWRITES;
                
@@ -254,7 +246,7 @@ public class TernaryAggregateTest extends AutomatedTestBase
                        if( rewrites && et != ExecType.MR ) {
                                String opcode = ((et == ExecType.SPARK) ? 
Instruction.SP_INST_PREFIX : "") + 
                                        (((testname.equals(TEST_NAME1) || 
vectors ) ? "tak+*" : "tack+*"));
-                               Assert.assertEquals(Boolean.TRUE,
+                               assertEquals(Boolean.TRUE,
                                                
Boolean.valueOf(Statistics.getCPHeavyHitterOpCodes().contains(opcode)));
                        }
                }

http://git-wip-us.apache.org/repos/asf/systemml/blob/95bf8cfe/src/test/java/org/apache/sysml/test/integration/functions/transform/FrameCSVReadWriteTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/transform/FrameCSVReadWriteTest.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/transform/FrameCSVReadWriteTest.java
index 04684a5..4e669dd 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/transform/FrameCSVReadWriteTest.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/transform/FrameCSVReadWriteTest.java
@@ -72,13 +72,10 @@ public class FrameCSVReadWriteTest extends AutomatedTestBase
         */
        private void runCSVQuotesReadWriteTest( RUNTIME_PLATFORM rt, String 
ofmt )
        {
-               //set runtime platform
-               RUNTIME_PLATFORM rtold = rtplatform;
-               rtplatform = rt;
-
                boolean sparkConfigOld = DMLScript.USE_LOCAL_SPARK_CONFIG;
-               if( rtplatform == RUNTIME_PLATFORM.SPARK || rtplatform == 
RUNTIME_PLATFORM.HYBRID_SPARK)
-                       DMLScript.USE_LOCAL_SPARK_CONFIG = true;
+               RUNTIME_PLATFORM rtold = setRuntimePlatform(rt);
+               if(shouldSkipTest())
+                       return;
 
                if( !ofmt.equals("csv") )
                        throw new RuntimeException("Unsupported test output 
format");
@@ -112,4 +109,4 @@ public class FrameCSVReadWriteTest extends AutomatedTestBase
                        DMLScript.USE_LOCAL_SPARK_CONFIG = sparkConfigOld;
                }
        }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/systemml/blob/95bf8cfe/src/test/java/org/apache/sysml/test/integration/functions/transform/TransformApplyEmptyRecodeMapTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/transform/TransformApplyEmptyRecodeMapTest.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/transform/TransformApplyEmptyRecodeMapTest.java
index c694fe4..63b90ea 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/transform/TransformApplyEmptyRecodeMapTest.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/transform/TransformApplyEmptyRecodeMapTest.java
@@ -19,7 +19,6 @@
 
 package org.apache.sysml.test.integration.functions.transform;
 
-import org.junit.Assert;
 import org.junit.Test;
 import org.apache.sysml.parser.Expression.ValueType;
 import org.apache.sysml.runtime.DMLRuntimeException;
@@ -43,6 +42,9 @@ public class TransformApplyEmptyRecodeMapTest extends 
AutomatedTestBase
        
        @Test
        public void testTransformApplyEmptyRecodeMap() {
+               if(shouldSkipTest())
+                       return;
+               
                try {
                        //generate input data
                        FrameBlock data = DataConverter.convertToFrameBlock(
@@ -55,11 +57,11 @@ public class TransformApplyEmptyRecodeMapTest extends 
AutomatedTestBase
                        MatrixBlock out = encoder.apply(data, new 
MatrixBlock(rows, cols, true));
                        
                        //check outputs
-                       Assert.assertEquals(rows, out.getNumRows());
-                       Assert.assertEquals(cols, out.getNumColumns());
+                       assertEquals(rows, out.getNumRows());
+                       assertEquals(cols, out.getNumColumns());
                        for(int i=0; i<rows; i++)
                                for(int j=0; j<cols; j++)
-                                       
Assert.assertTrue(Double.isNaN(out.quickGetValue(i, j)));
+                                       
assertTrue(Double.isNaN(out.quickGetValue(i, j)));
                } 
                catch (DMLRuntimeException e) {
                        throw new RuntimeException(e);

http://git-wip-us.apache.org/repos/asf/systemml/blob/95bf8cfe/src/test/java/org/apache/sysml/test/integration/functions/transform/TransformCSVFrameEncodeDecodeTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/transform/TransformCSVFrameEncodeDecodeTest.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/transform/TransformCSVFrameEncodeDecodeTest.java
index 86a0cfd..d9505af 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/transform/TransformCSVFrameEncodeDecodeTest.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/transform/TransformCSVFrameEncodeDecodeTest.java
@@ -19,7 +19,6 @@
 
 package org.apache.sysml.test.integration.functions.transform;
 
-import org.junit.Assert;
 import org.junit.Test;
 import org.apache.sysml.api.DMLScript;
 import org.apache.sysml.api.DMLScript.RUNTIME_PLATFORM;
@@ -72,13 +71,10 @@ public class TransformCSVFrameEncodeDecodeTest extends 
AutomatedTestBase
         */
        private void runTransformTest( RUNTIME_PLATFORM rt, String ofmt )
        {
-               //set runtime platform
-               RUNTIME_PLATFORM rtold = rtplatform;
-               rtplatform = rt;
-
                boolean sparkConfigOld = DMLScript.USE_LOCAL_SPARK_CONFIG;
-               if( rtplatform == RUNTIME_PLATFORM.SPARK || rtplatform == 
RUNTIME_PLATFORM.HYBRID_SPARK)
-                       DMLScript.USE_LOCAL_SPARK_CONFIG = true;
+               RUNTIME_PLATFORM rtold = setRuntimePlatform(rt);
+               if(shouldSkipTest())
+                       return;
 
                if( !ofmt.equals("csv") )
                        throw new RuntimeException("Unsupported test output 
format");
@@ -105,7 +101,7 @@ public class TransformCSVFrameEncodeDecodeTest extends 
AutomatedTestBase
                        TestUtils.compareFrames(R1, R2, R1.length, 
R1[0].length);                       
                        
                        if( rt == RUNTIME_PLATFORM.HYBRID_SPARK ) {
-                               Assert.assertEquals("Wrong number of executed 
Spark instructions: " + 
+                               assertEquals("Wrong number of executed Spark 
instructions: " + 
                                        Statistics.getNoOfExecutedSPInst(), new 
Long(2), new Long(Statistics.getNoOfExecutedSPInst()));
                        }
                }
@@ -117,4 +113,4 @@ public class TransformCSVFrameEncodeDecodeTest extends 
AutomatedTestBase
                        DMLScript.USE_LOCAL_SPARK_CONFIG = sparkConfigOld;
                }
        }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/systemml/blob/95bf8cfe/src/test/java/org/apache/sysml/test/integration/functions/transform/TransformCSVFrameEncodeReadTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/transform/TransformCSVFrameEncodeReadTest.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/transform/TransformCSVFrameEncodeReadTest.java
index d63890f..e5cbd62 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/transform/TransformCSVFrameEncodeReadTest.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/transform/TransformCSVFrameEncodeReadTest.java
@@ -117,13 +117,10 @@ public class TransformCSVFrameEncodeReadTest extends 
AutomatedTestBase
         */
        private void runTransformTest( RUNTIME_PLATFORM rt, String ofmt, 
boolean subset, boolean parRead )
        {
-               //set runtime platform
-               RUNTIME_PLATFORM rtold = rtplatform;
-               rtplatform = rt;
-
                boolean sparkConfigOld = DMLScript.USE_LOCAL_SPARK_CONFIG;
-               if( rtplatform == RUNTIME_PLATFORM.SPARK || rtplatform == 
RUNTIME_PLATFORM.HYBRID_SPARK)
-                       DMLScript.USE_LOCAL_SPARK_CONFIG = true;
+               RUNTIME_PLATFORM rtold = setRuntimePlatform(rt);
+               if(shouldSkipTest())
+                       return;
 
                if( !ofmt.equals("csv") )
                        throw new RuntimeException("Unsupported test output 
format");
@@ -155,4 +152,4 @@ public class TransformCSVFrameEncodeReadTest extends 
AutomatedTestBase
                        DMLScript.USE_LOCAL_SPARK_CONFIG = sparkConfigOld;
                }
        }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/systemml/blob/95bf8cfe/src/test/java/org/apache/sysml/test/integration/functions/transform/TransformEncodeDecodeTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/transform/TransformEncodeDecodeTest.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/transform/TransformEncodeDecodeTest.java
index 8e55140..eeddfb2 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/transform/TransformEncodeDecodeTest.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/transform/TransformEncodeDecodeTest.java
@@ -22,8 +22,8 @@ package org.apache.sysml.test.integration.functions.transform;
 import java.util.HashMap;
 import java.util.Iterator;
 
-import org.junit.Assert;
 import org.junit.Test;
+import org.apache.sysml.api.DMLScript;
 import org.apache.sysml.api.DMLScript.RUNTIME_PLATFORM;
 import org.apache.sysml.lops.LopProperties.ExecType;
 import org.apache.sysml.runtime.io.FrameReader;
@@ -92,8 +92,9 @@ public class TransformEncodeDecodeTest extends 
AutomatedTestBase
        
        private void runTransformEncodeDecodeTest( ExecType et, boolean sparse, 
String fmt)
        {
-               RUNTIME_PLATFORM platformOld = rtplatform;
-               rtplatform = RUNTIME_PLATFORM.HYBRID; //only CP supported
+               RUNTIME_PLATFORM platformOld = 
setRuntimePlatform(RUNTIME_PLATFORM.HYBRID_SPARK);
+               if(shouldSkipTest())
+                       return;
 
                try
                {
@@ -126,13 +127,13 @@ public class TransformEncodeDecodeTest extends 
AutomatedTestBase
                                String[] row = iterFO.next();
                                Double expected = (double)cFA.get(row[1]);
                                Double val = 
(row[0]!=null)?Double.valueOf(row[0]) : 0;
-                               Assert.assertEquals("Output aggregates don't 
match: "+
+                               assertEquals("Output aggregates don't match: "+
                                                expected+" vs "+val, expected, 
val);
                        }
                }
                catch(Exception ex) {
                        ex.printStackTrace();
-                       Assert.fail(ex.getMessage());
+                       fail(ex.getMessage());
                }
                finally {
                        rtplatform = platformOld;

http://git-wip-us.apache.org/repos/asf/systemml/blob/95bf8cfe/src/test/java/org/apache/sysml/test/integration/functions/transform/TransformFrameEncodeApplySubsetTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/transform/TransformFrameEncodeApplySubsetTest.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/transform/TransformFrameEncodeApplySubsetTest.java
index 16e1057..7483253 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/transform/TransformFrameEncodeApplySubsetTest.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/transform/TransformFrameEncodeApplySubsetTest.java
@@ -19,7 +19,6 @@
 
 package org.apache.sysml.test.integration.functions.transform;
 
-import org.junit.Assert;
 import org.junit.Test;
 import org.apache.sysml.api.DMLScript;
 import org.apache.sysml.api.DMLScript.RUNTIME_PLATFORM;
@@ -85,14 +84,11 @@ public class TransformFrameEncodeApplySubsetTest extends 
AutomatedTestBase
         */
        private void runTransformTest(String testname, RUNTIME_PLATFORM rt, 
String ofmt, boolean colnames)
        {
-               //set runtime platform
-               RUNTIME_PLATFORM rtold = rtplatform;
-               rtplatform = rt;
-
                boolean sparkConfigOld = DMLScript.USE_LOCAL_SPARK_CONFIG;
-               if( rtplatform == RUNTIME_PLATFORM.SPARK || rtplatform == 
RUNTIME_PLATFORM.HYBRID_SPARK)
-                       DMLScript.USE_LOCAL_SPARK_CONFIG = true;
-
+               RUNTIME_PLATFORM rtold = setRuntimePlatform(rt);
+               if(shouldSkipTest())
+                       return;
+               
                if( !ofmt.equals("csv") )
                        throw new RuntimeException("Unsupported test output 
format");
                
@@ -108,7 +104,7 @@ public class TransformFrameEncodeApplySubsetTest extends 
AutomatedTestBase
                        runTest(true, false, null, -1); 
                        
                        //check output 
-                       Assert.assertEquals(Double.valueOf(148), 
+                       assertEquals(Double.valueOf(148), 
                                readDMLMatrixFromHDFS("R").get(new 
CellIndex(1,1)));
                }
                finally {
@@ -116,4 +112,4 @@ public class TransformFrameEncodeApplySubsetTest extends 
AutomatedTestBase
                        DMLScript.USE_LOCAL_SPARK_CONFIG = sparkConfigOld;
                }
        }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/systemml/blob/95bf8cfe/src/test/java/org/apache/sysml/test/integration/functions/transform/TransformFrameEncodeApplyTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/transform/TransformFrameEncodeApplyTest.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/transform/TransformFrameEncodeApplyTest.java
index 5e1350b..a0343cf 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/transform/TransformFrameEncodeApplyTest.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/transform/TransformFrameEncodeApplyTest.java
@@ -19,7 +19,6 @@
 
 package org.apache.sysml.test.integration.functions.transform;
 
-import org.junit.Assert;
 import org.junit.Test;
 import org.apache.sysml.api.DMLScript;
 import org.apache.sysml.api.DMLScript.RUNTIME_PLATFORM;
@@ -252,13 +251,10 @@ public class TransformFrameEncodeApplyTest extends 
AutomatedTestBase
        
        private void runTransformTest( RUNTIME_PLATFORM rt, String ofmt, 
TransformType type, boolean colnames )
        {
-               //set runtime platform
-               RUNTIME_PLATFORM rtold = rtplatform;
-               rtplatform = rt;
-
                boolean sparkConfigOld = DMLScript.USE_LOCAL_SPARK_CONFIG;
-               if( rtplatform == RUNTIME_PLATFORM.SPARK || rtplatform == 
RUNTIME_PLATFORM.HYBRID_SPARK)
-                       DMLScript.USE_LOCAL_SPARK_CONFIG = true;
+               RUNTIME_PLATFORM rtold = setRuntimePlatform(rt);
+               if(shouldSkipTest())
+                       return;
 
                //set transform specification
                String SPEC = null; String DATASET = null;
@@ -299,7 +295,7 @@ public class TransformFrameEncodeApplyTest extends 
AutomatedTestBase
                        TestUtils.compareMatrices(R1, R2, R1.length, 
R1[0].length, 0);          
                        
                        if( rt == RUNTIME_PLATFORM.HYBRID_SPARK ) {
-                               Assert.assertEquals("Wrong number of executed 
Spark instructions: " + 
+                               assertEquals("Wrong number of executed Spark 
instructions: " + 
                                        Statistics.getNoOfExecutedSPInst(), new 
Long(2), new Long(Statistics.getNoOfExecutedSPInst()));
                        }
                }
@@ -311,4 +307,4 @@ public class TransformFrameEncodeApplyTest extends 
AutomatedTestBase
                        DMLScript.USE_LOCAL_SPARK_CONFIG = sparkConfigOld;
                }
        }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/systemml/blob/95bf8cfe/src/test/java/org/apache/sysml/test/integration/functions/transform/TransformFrameEncodeColmapTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/transform/TransformFrameEncodeColmapTest.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/transform/TransformFrameEncodeColmapTest.java
index 45605df..bd5d350 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/transform/TransformFrameEncodeColmapTest.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/transform/TransformFrameEncodeColmapTest.java
@@ -94,13 +94,10 @@ public class TransformFrameEncodeColmapTest extends 
AutomatedTestBase
        
        private void runTransformTest( String testname, RUNTIME_PLATFORM rt, 
String ofmt, boolean colnames )
        {
-               //set runtime platform
-               RUNTIME_PLATFORM rtold = rtplatform;
-               rtplatform = rt;
-
                boolean sparkConfigOld = DMLScript.USE_LOCAL_SPARK_CONFIG;
-               if( rtplatform == RUNTIME_PLATFORM.SPARK || rtplatform == 
RUNTIME_PLATFORM.HYBRID_SPARK)
-                       DMLScript.USE_LOCAL_SPARK_CONFIG = true;
+               RUNTIME_PLATFORM rtold = setRuntimePlatform(rt);
+               if(shouldSkipTest())
+                       return;
 
                //set transform specification
                String DATASET = DATASET1;
@@ -141,4 +138,4 @@ public class TransformFrameEncodeColmapTest extends 
AutomatedTestBase
                        DMLScript.USE_LOCAL_SPARK_CONFIG = sparkConfigOld;
                }
        }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/systemml/blob/95bf8cfe/src/test/java/org/apache/sysml/test/integration/functions/transform/TransformFrameEncodeDecodeTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/transform/TransformFrameEncodeDecodeTest.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/transform/TransformFrameEncodeDecodeTest.java
index 302ac2e..8d3dc31 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/transform/TransformFrameEncodeDecodeTest.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/transform/TransformFrameEncodeDecodeTest.java
@@ -31,7 +31,6 @@ import org.apache.sysml.test.integration.AutomatedTestBase;
 import org.apache.sysml.test.integration.TestConfiguration;
 import org.apache.sysml.test.utils.TestUtils;
 import org.apache.sysml.utils.Statistics;
-import org.junit.Assert;
 import org.junit.Test;
 
 public class TransformFrameEncodeDecodeTest extends AutomatedTestBase 
@@ -130,13 +129,10 @@ public class TransformFrameEncodeDecodeTest extends 
AutomatedTestBase
         */
        private void runTransformTest( RUNTIME_PLATFORM rt, String ofmt, 
TransformType type, boolean colnames )
        {
-               //set runtime platform
-               RUNTIME_PLATFORM rtold = rtplatform;
-               rtplatform = rt;
-
                boolean sparkConfigOld = DMLScript.USE_LOCAL_SPARK_CONFIG;
-               if( rtplatform == RUNTIME_PLATFORM.SPARK || rtplatform == 
RUNTIME_PLATFORM.HYBRID_SPARK)
-                       DMLScript.USE_LOCAL_SPARK_CONFIG = true;
+               RUNTIME_PLATFORM rtold = setRuntimePlatform(rt);
+               if(shouldSkipTest())
+                       return;
 
                //set transform specification
                String SPEC = null; String DATASET = null;
@@ -181,7 +177,7 @@ public class TransformFrameEncodeDecodeTest extends 
AutomatedTestBase
                        TestUtils.compareFrames(R1, R2, R1.length, 
R1[0].length);                       
                        
                        if( rt == RUNTIME_PLATFORM.HYBRID_SPARK ) {
-                               Assert.assertEquals("Wrong number of executed 
Spark instructions: " + 
+                               assertEquals("Wrong number of executed Spark 
instructions: " + 
                                        Statistics.getNoOfExecutedSPInst(), new 
Long(2), new Long(Statistics.getNoOfExecutedSPInst()));
                        }
                }
@@ -193,4 +189,4 @@ public class TransformFrameEncodeDecodeTest extends 
AutomatedTestBase
                        DMLScript.USE_LOCAL_SPARK_CONFIG = sparkConfigOld;
                }
        }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/systemml/blob/95bf8cfe/src/test/java/org/apache/sysml/test/integration/functions/transform/TransformFrameEncodeDecodeTokenTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/transform/TransformFrameEncodeDecodeTokenTest.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/transform/TransformFrameEncodeDecodeTokenTest.java
index 8d01d60..d547f44 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/transform/TransformFrameEncodeDecodeTokenTest.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/transform/TransformFrameEncodeDecodeTokenTest.java
@@ -19,7 +19,6 @@
 
 package org.apache.sysml.test.integration.functions.transform;
 
-import org.junit.Assert;
 import org.junit.Test;
 import org.apache.sysml.api.DMLScript;
 import org.apache.sysml.api.DMLScript.RUNTIME_PLATFORM;
@@ -78,13 +77,10 @@ public class TransformFrameEncodeDecodeTokenTest extends 
AutomatedTestBase
         */
        private void runTransformTest( RUNTIME_PLATFORM rt, String ofmt )
        {
-               //set runtime platform
-               RUNTIME_PLATFORM rtold = rtplatform;
-               rtplatform = rt;
-
                boolean sparkConfigOld = DMLScript.USE_LOCAL_SPARK_CONFIG;
-               if( rtplatform == RUNTIME_PLATFORM.SPARK || rtplatform == 
RUNTIME_PLATFORM.HYBRID_SPARK)
-                       DMLScript.USE_LOCAL_SPARK_CONFIG = true;
+               RUNTIME_PLATFORM rtold = setRuntimePlatform(rt);
+               if(shouldSkipTest())
+                       return;
 
                if( !ofmt.equals("csv") )
                        throw new RuntimeException("Unsupported test output 
format");
@@ -115,7 +111,7 @@ public class TransformFrameEncodeDecodeTokenTest extends 
AutomatedTestBase
                        TestUtils.compareFrames(R1, R2, R1.length, 
R1[0].length);                       
                        
                        if( rt == RUNTIME_PLATFORM.HYBRID_SPARK ) {
-                               Assert.assertEquals("Wrong number of executed 
Spark instructions: " + 
+                               assertEquals("Wrong number of executed Spark 
instructions: " + 
                                        Statistics.getNoOfExecutedSPInst(), new 
Long(2), new Long(Statistics.getNoOfExecutedSPInst()));
                        }
                }
@@ -127,4 +123,4 @@ public class TransformFrameEncodeDecodeTokenTest extends 
AutomatedTestBase
                        DMLScript.USE_LOCAL_SPARK_CONFIG = sparkConfigOld;
                }
        }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/systemml/blob/95bf8cfe/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/ACosTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/ACosTest.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/ACosTest.java
index 3179c14..540f639 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/ACosTest.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/ACosTest.java
@@ -47,6 +47,8 @@ public class ACosTest extends AutomatedTestBase
        
        @Test
        public void testPositive() {
+               if(shouldSkipTest())
+                       return;
                int rows = 10;
                int cols = 10;
                
@@ -81,6 +83,8 @@ public class ACosTest extends AutomatedTestBase
        
        @Test
        public void testNegative() {
+               if(shouldSkipTest())
+                       return;
                int rows = 10;
                int cols = 10;
                
@@ -115,6 +119,8 @@ public class ACosTest extends AutomatedTestBase
        
        @Test
        public void testRandom() {
+               if(shouldSkipTest())
+                       return;
                int rows = 10;
                int cols = 10;
                

http://git-wip-us.apache.org/repos/asf/systemml/blob/95bf8cfe/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/ASinTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/ASinTest.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/ASinTest.java
index 6105cb1..83dab9c 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/ASinTest.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/ASinTest.java
@@ -45,6 +45,8 @@ public class ASinTest extends AutomatedTestBase
        
        @Test
        public void testPositive() {
+               if(shouldSkipTest())
+                       return;
                int rows = 10;
                int cols = 10;
                
@@ -79,6 +81,8 @@ public class ASinTest extends AutomatedTestBase
        
        @Test
        public void testNegative() {
+               if(shouldSkipTest())
+                       return;
                int rows = 10;
                int cols = 10;
                
@@ -113,6 +117,8 @@ public class ASinTest extends AutomatedTestBase
        
        @Test
        public void testRandom() {
+               if(shouldSkipTest())
+                       return;
                int rows = 10;
                int cols = 10;
                

http://git-wip-us.apache.org/repos/asf/systemml/blob/95bf8cfe/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/ATanTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/ATanTest.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/ATanTest.java
index 7ff0de2..b3207da 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/ATanTest.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/ATanTest.java
@@ -47,6 +47,8 @@ public class ATanTest extends AutomatedTestBase
        
        @Test
        public void testPositive() {
+               if(shouldSkipTest())
+                       return;
                int rows = 10;
                int cols = 10;
                
@@ -81,6 +83,8 @@ public class ATanTest extends AutomatedTestBase
        
        @Test
        public void testNegative() {
+               if(shouldSkipTest())
+                       return;
                int rows = 10;
                int cols = 10;
                
@@ -115,6 +119,8 @@ public class ATanTest extends AutomatedTestBase
        
        @Test
        public void testRandom() {
+               if(shouldSkipTest())
+                       return;
                int rows = 10;
                int cols = 10;
                

http://git-wip-us.apache.org/repos/asf/systemml/blob/95bf8cfe/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/AbsTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/AbsTest.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/AbsTest.java
index c82ea75..a3027d6 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/AbsTest.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/AbsTest.java
@@ -20,7 +20,8 @@
 package org.apache.sysml.test.integration.functions.unary.matrix;
 
 import org.junit.Test;
-
+import org.apache.sysml.api.DMLScript;
+import org.apache.sysml.api.DMLScript.RUNTIME_PLATFORM;
 import org.apache.sysml.test.integration.AutomatedTestBase;
 import org.apache.sysml.test.integration.TestConfiguration;
 
@@ -45,6 +46,8 @@ public class AbsTest extends AutomatedTestBase
        
        @Test
        public void testPositive() {
+               if(shouldSkipTest())
+                       return;
                int rows = 10;
                int cols = 10;
                
@@ -79,6 +82,8 @@ public class AbsTest extends AutomatedTestBase
        
        @Test
        public void testNegative() {
+               if(shouldSkipTest())
+                       return;
                int rows = 10;
                int cols = 10;
                
@@ -113,6 +118,8 @@ public class AbsTest extends AutomatedTestBase
        
        @Test
        public void testRandom() {
+               if(shouldSkipTest())
+                       return;
                int rows = 10;
                int cols = 10;
                

http://git-wip-us.apache.org/repos/asf/systemml/blob/95bf8cfe/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/CastAsScalarTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/CastAsScalarTest.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/CastAsScalarTest.java
index 45af219..cb8cc65 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/CastAsScalarTest.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/CastAsScalarTest.java
@@ -42,6 +42,8 @@ public class CastAsScalarTest extends AutomatedTestBase
     
     @Test
     public void testGeneral() {
+       if(shouldSkipTest())
+                       return;
        TestConfiguration config = getTestConfiguration(TEST_GENERAL);
         loadTestConfiguration(config);
         

http://git-wip-us.apache.org/repos/asf/systemml/blob/95bf8cfe/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/CholeskyTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/CholeskyTest.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/CholeskyTest.java
index 71b50d6..6ea8156 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/CholeskyTest.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/CholeskyTest.java
@@ -25,7 +25,6 @@ import org.apache.sysml.runtime.matrix.MatrixCharacteristics;
 import org.apache.sysml.runtime.matrix.data.MatrixValue.CellIndex;
 import org.apache.sysml.test.integration.AutomatedTestBase;
 import org.apache.sysml.test.integration.TestConfiguration;
-import org.junit.Assert;
 import org.junit.Test;
 
 /**
@@ -97,12 +96,10 @@ public class CholeskyTest extends AutomatedTestBase
        }
 
        private void runTestCholesky( int rows, int cols, RUNTIME_PLATFORM rt) {
-               RUNTIME_PLATFORM rtold = rtplatform;
-               rtplatform = rt;
-               
                boolean sparkConfigOld = DMLScript.USE_LOCAL_SPARK_CONFIG;
-               if( rtplatform == RUNTIME_PLATFORM.SPARK )
-                       DMLScript.USE_LOCAL_SPARK_CONFIG = true;
+               RUNTIME_PLATFORM rtold = setRuntimePlatform(rt);
+               if(shouldSkipTest())
+                       return;
                
                try {
                        getAndLoadTestConfiguration(TEST_NAME);
@@ -117,7 +114,7 @@ public class CholeskyTest extends AutomatedTestBase
                        
                        //run tests and compare results
                        runTest(true, false, null, -1);
-                       Assert.assertEquals(0, readDMLMatrixFromHDFS("D")
+                       assertEquals(0, readDMLMatrixFromHDFS("D")
                                .get(new CellIndex(1,1)), 1e-5);
                }
                finally {

http://git-wip-us.apache.org/repos/asf/systemml/blob/95bf8cfe/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/CosTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/CosTest.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/CosTest.java
index c00d265..da1f0b2 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/CosTest.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/CosTest.java
@@ -45,6 +45,8 @@ public class CosTest extends AutomatedTestBase
        
        @Test
        public void testPositive() {
+               if(shouldSkipTest())
+                       return;
                int rows = 10;
                int cols = 10;
                
@@ -79,6 +81,8 @@ public class CosTest extends AutomatedTestBase
        
        @Test
        public void testNegative() {
+               if(shouldSkipTest())
+                       return;
                int rows = 10;
                int cols = 10;
                
@@ -113,6 +117,8 @@ public class CosTest extends AutomatedTestBase
        
        @Test
        public void testRandom() {
+               if(shouldSkipTest())
+                       return;
                int rows = 10;
                int cols = 10;
                

http://git-wip-us.apache.org/repos/asf/systemml/blob/95bf8cfe/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/DiagTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/DiagTest.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/DiagTest.java
index 890278e..6c5020d 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/DiagTest.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/DiagTest.java
@@ -58,6 +58,8 @@ public class DiagTest extends AutomatedTestBase
        
        @Test
        public void testDiag() {
+               if(shouldSkipTest())
+                       return;
                int rowsCols = 10;
                
                TestConfiguration config = 
availableTestConfigurations.get("DiagTest");
@@ -91,6 +93,8 @@ public class DiagTest extends AutomatedTestBase
        
        @Test
        public void testWrongDimensions() {
+               if(shouldSkipTest())
+                       return;
                int rows = 10;
                int cols = 9;
                

http://git-wip-us.apache.org/repos/asf/systemml/blob/95bf8cfe/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/EigenFactorizeTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/EigenFactorizeTest.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/EigenFactorizeTest.java
index f64b734..8892e1b 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/EigenFactorizeTest.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/EigenFactorizeTest.java
@@ -85,12 +85,10 @@ public class EigenFactorizeTest extends AutomatedTestBase
        
        private void runTestEigenFactorize( int rows, RUNTIME_PLATFORM rt)
        {               
-               RUNTIME_PLATFORM rtold = rtplatform;
-               rtplatform = rt;
-               
                boolean sparkConfigOld = DMLScript.USE_LOCAL_SPARK_CONFIG;
-               if( rtplatform == RUNTIME_PLATFORM.SPARK )
-                       DMLScript.USE_LOCAL_SPARK_CONFIG = true;
+               RUNTIME_PLATFORM rtold = setRuntimePlatform(rt);
+               if(shouldSkipTest())
+                       return;
                
                try
                {

http://git-wip-us.apache.org/repos/asf/systemml/blob/95bf8cfe/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/ExtractTriangularTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/ExtractTriangularTest.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/ExtractTriangularTest.java
index 64c9f9f..439d9c4 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/ExtractTriangularTest.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/ExtractTriangularTest.java
@@ -212,17 +212,10 @@ public class ExtractTriangularTest extends 
AutomatedTestBase
        
        private void runExtractTriangular( String testname, boolean sparse, 
boolean diag, boolean values, ExecType et)
        {
-               //rtplatform for MR
-               RUNTIME_PLATFORM platformOld = rtplatform;
-               switch( et ){
-                       case MR: rtplatform = RUNTIME_PLATFORM.HADOOP; break;
-                       case SPARK: rtplatform = RUNTIME_PLATFORM.SPARK; break;
-                       default: rtplatform = RUNTIME_PLATFORM.HYBRID; break;
-               }
-       
                boolean sparkConfigOld = DMLScript.USE_LOCAL_SPARK_CONFIG;
-               if( rtplatform == RUNTIME_PLATFORM.SPARK )
-                       DMLScript.USE_LOCAL_SPARK_CONFIG = true;
+               RUNTIME_PLATFORM platformOld = setRuntimePlatform(et);
+               if(shouldSkipTest())
+                       return;
                
                try
                {

http://git-wip-us.apache.org/repos/asf/systemml/blob/95bf8cfe/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/FullCummaxTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/FullCummaxTest.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/FullCummaxTest.java
index 1300638..cd8f02c 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/FullCummaxTest.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/FullCummaxTest.java
@@ -22,7 +22,6 @@ package 
org.apache.sysml.test.integration.functions.unary.matrix;
 import java.util.HashMap;
 
 import org.junit.AfterClass;
-import org.junit.Assert;
 import org.junit.BeforeClass;
 import org.junit.Test;
 
@@ -242,16 +241,10 @@ public class FullCummaxTest extends AutomatedTestBase
         */
        private void runColAggregateOperationTest( InputType type, boolean 
sparse, ExecType instType, boolean rewrites)
        {
-               RUNTIME_PLATFORM platformOld = rtplatform;
-               switch( instType ){
-                       case MR: rtplatform = RUNTIME_PLATFORM.HADOOP; break;
-                       case SPARK: rtplatform = RUNTIME_PLATFORM.SPARK; break;
-                       default: rtplatform = RUNTIME_PLATFORM.HYBRID; break;
-               }
-       
                boolean sparkConfigOld = DMLScript.USE_LOCAL_SPARK_CONFIG;
-               if( rtplatform == RUNTIME_PLATFORM.SPARK )
-                       DMLScript.USE_LOCAL_SPARK_CONFIG = true;
+               RUNTIME_PLATFORM platformOld = setRuntimePlatform(instType);
+               if(shouldSkipTest())
+                       return;
                
                //rewrites
                boolean oldFlagRewrites = 
OptimizerUtils.ALLOW_ALGEBRAIC_SIMPLIFICATION;
@@ -286,7 +279,7 @@ public class FullCummaxTest extends AutomatedTestBase
        
                        runTest(true, false, null, -1); 
                        if( instType==ExecType.CP || instType==ExecType.SPARK ) 
//in CP no MR jobs should be executed
-                               Assert.assertEquals("Unexpected number of 
executed MR jobs.", 0, Statistics.getNoOfExecutedMRJobs());
+                               assertEquals("Unexpected number of executed MR 
jobs.", 0, Statistics.getNoOfExecutedMRJobs());
                        
                        runRScript(true); 
                
@@ -302,4 +295,4 @@ public class FullCummaxTest extends AutomatedTestBase
                        OptimizerUtils.ALLOW_ALGEBRAIC_SIMPLIFICATION = 
oldFlagRewrites;
                }
        }       
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/systemml/blob/95bf8cfe/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/FullCumminTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/FullCumminTest.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/FullCumminTest.java
index 89114d2..713fb32 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/FullCumminTest.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/FullCumminTest.java
@@ -22,7 +22,6 @@ package 
org.apache.sysml.test.integration.functions.unary.matrix;
 import java.util.HashMap;
 
 import org.junit.AfterClass;
-import org.junit.Assert;
 import org.junit.BeforeClass;
 import org.junit.Test;
 
@@ -242,16 +241,10 @@ public class FullCumminTest extends AutomatedTestBase
         */
        private void runColAggregateOperationTest( InputType type, boolean 
sparse, ExecType instType, boolean rewrites)
        {
-               RUNTIME_PLATFORM platformOld = rtplatform;
-               switch( instType ){
-                       case MR: rtplatform = RUNTIME_PLATFORM.HADOOP; break;
-                       case SPARK: rtplatform = RUNTIME_PLATFORM.SPARK; break;
-                       default: rtplatform = RUNTIME_PLATFORM.HYBRID; break;
-               }
-       
                boolean sparkConfigOld = DMLScript.USE_LOCAL_SPARK_CONFIG;
-               if( rtplatform == RUNTIME_PLATFORM.SPARK )
-                       DMLScript.USE_LOCAL_SPARK_CONFIG = true;
+               RUNTIME_PLATFORM platformOld = setRuntimePlatform(instType);
+               if(shouldSkipTest())
+                       return;
                
                //rewrites
                boolean oldFlagRewrites = 
OptimizerUtils.ALLOW_ALGEBRAIC_SIMPLIFICATION;
@@ -286,7 +279,7 @@ public class FullCumminTest extends AutomatedTestBase
        
                        runTest(true, false, null, -1); 
                        if( instType==ExecType.CP || instType==ExecType.SPARK ) 
//in CP no MR jobs should be executed
-                               Assert.assertEquals("Unexpected number of 
executed MR jobs.", 0, Statistics.getNoOfExecutedMRJobs());
+                               assertEquals("Unexpected number of executed MR 
jobs.", 0, Statistics.getNoOfExecutedMRJobs());
                        
                        runRScript(true); 
                
@@ -302,4 +295,4 @@ public class FullCumminTest extends AutomatedTestBase
                        OptimizerUtils.ALLOW_ALGEBRAIC_SIMPLIFICATION = 
oldFlagRewrites;
                }
        }       
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/systemml/blob/95bf8cfe/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/FullCumprodTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/FullCumprodTest.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/FullCumprodTest.java
index 30b5502..8c36aeb 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/FullCumprodTest.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/FullCumprodTest.java
@@ -22,7 +22,6 @@ package 
org.apache.sysml.test.integration.functions.unary.matrix;
 import java.util.HashMap;
 
 import org.junit.AfterClass;
-import org.junit.Assert;
 import org.junit.BeforeClass;
 import org.junit.Test;
 
@@ -242,16 +241,10 @@ public class FullCumprodTest extends AutomatedTestBase
         */
        private void runColAggregateOperationTest( InputType type, boolean 
sparse, ExecType instType, boolean rewrites)
        {
-               RUNTIME_PLATFORM platformOld = rtplatform;
-               switch( instType ){
-                       case MR: rtplatform = RUNTIME_PLATFORM.HADOOP; break;
-                       case SPARK: rtplatform = RUNTIME_PLATFORM.SPARK; break;
-                       default: rtplatform = RUNTIME_PLATFORM.HYBRID; break;
-               }
-       
                boolean sparkConfigOld = DMLScript.USE_LOCAL_SPARK_CONFIG;
-               if( rtplatform == RUNTIME_PLATFORM.SPARK )
-                       DMLScript.USE_LOCAL_SPARK_CONFIG = true;
+               RUNTIME_PLATFORM platformOld = setRuntimePlatform(instType);
+               if(shouldSkipTest())
+                       return;
        
                //rewrites
                boolean oldFlagRewrites = 
OptimizerUtils.ALLOW_ALGEBRAIC_SIMPLIFICATION;
@@ -286,7 +279,7 @@ public class FullCumprodTest extends AutomatedTestBase
        
                        runTest(true, false, null, -1); 
                        if( instType==ExecType.CP || instType==ExecType.SPARK  
) //in CP no MR jobs should be executed
-                               Assert.assertEquals("Unexpected number of 
executed MR jobs.", 0, Statistics.getNoOfExecutedMRJobs());
+                               assertEquals("Unexpected number of executed MR 
jobs.", 0, Statistics.getNoOfExecutedMRJobs());
                        
                        runRScript(true); 
                
@@ -302,4 +295,4 @@ public class FullCumprodTest extends AutomatedTestBase
                        OptimizerUtils.ALLOW_ALGEBRAIC_SIMPLIFICATION = 
oldFlagRewrites;
                }
        }       
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/systemml/blob/95bf8cfe/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/FullCumsumTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/FullCumsumTest.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/FullCumsumTest.java
index 51ae9d7..75f2072 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/FullCumsumTest.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/FullCumsumTest.java
@@ -22,7 +22,6 @@ package 
org.apache.sysml.test.integration.functions.unary.matrix;
 import java.util.HashMap;
 
 import org.junit.AfterClass;
-import org.junit.Assert;
 import org.junit.BeforeClass;
 import org.junit.Test;
 
@@ -241,16 +240,10 @@ public class FullCumsumTest extends AutomatedTestBase
         */
        private void runColAggregateOperationTest( InputType type, boolean 
sparse, ExecType instType, boolean rewrites)
        {
-               RUNTIME_PLATFORM platformOld = rtplatform;
-               switch( instType ){
-                       case MR: rtplatform = RUNTIME_PLATFORM.HADOOP; break;
-                       case SPARK: rtplatform = RUNTIME_PLATFORM.SPARK; break;
-                       default: rtplatform = RUNTIME_PLATFORM.HYBRID; break;
-               }
-       
                boolean sparkConfigOld = DMLScript.USE_LOCAL_SPARK_CONFIG;
-               if( rtplatform == RUNTIME_PLATFORM.SPARK )
-                       DMLScript.USE_LOCAL_SPARK_CONFIG = true;
+               RUNTIME_PLATFORM platformOld = setRuntimePlatform(instType);
+               if(shouldSkipTest())
+                       return;
 
                //rewrites
                boolean oldFlagRewrites = 
OptimizerUtils.ALLOW_ALGEBRAIC_SIMPLIFICATION;
@@ -285,7 +278,7 @@ public class FullCumsumTest extends AutomatedTestBase
        
                        runTest(true, false, null, -1); 
                        if( instType==ExecType.CP || instType==ExecType.SPARK ) 
//in CP no MR jobs should be executed
-                               Assert.assertEquals("Unexpected number of 
executed MR jobs.", 0, Statistics.getNoOfExecutedMRJobs());
+                               assertEquals("Unexpected number of executed MR 
jobs.", 0, Statistics.getNoOfExecutedMRJobs());
                        
                        runRScript(true); 
                
@@ -301,4 +294,4 @@ public class FullCumsumTest extends AutomatedTestBase
                        OptimizerUtils.ALLOW_ALGEBRAIC_SIMPLIFICATION = 
oldFlagRewrites;
                }
        }       
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/systemml/blob/95bf8cfe/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/FullCumsumprodTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/FullCumsumprodTest.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/FullCumsumprodTest.java
index f13e765..f854652 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/FullCumsumprodTest.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/FullCumsumprodTest.java
@@ -19,7 +19,6 @@
 
 package org.apache.sysml.test.integration.functions.unary.matrix;
 
-import org.junit.Assert;
 import org.junit.Test;
 
 import org.apache.sysml.api.DMLScript;
@@ -87,15 +86,10 @@ public class FullCumsumprodTest extends AutomatedTestBase
        
        private void runCumsumprodTest(boolean reverse, boolean sparse, 
ExecType instType)
        {
-               RUNTIME_PLATFORM platformOld = rtplatform;
-               switch( instType ){
-                       case SPARK: rtplatform = RUNTIME_PLATFORM.SPARK; break;
-                       default: rtplatform = RUNTIME_PLATFORM.HYBRID_SPARK; 
break;
-               }
-       
                boolean sparkConfigOld = DMLScript.USE_LOCAL_SPARK_CONFIG;
-               if( rtplatform == RUNTIME_PLATFORM.SPARK || rtplatform == 
RUNTIME_PLATFORM.HYBRID_SPARK )
-                       DMLScript.USE_LOCAL_SPARK_CONFIG = true;
+               RUNTIME_PLATFORM platformOld = setRuntimePlatform(instType);
+               if(shouldSkipTest())
+                       return;
                
                try
                {
@@ -117,7 +111,7 @@ public class FullCumsumprodTest extends AutomatedTestBase
                        
                        runTest(true, false, null, -1); 
                        
-                       Assert.assertEquals(new Double(rows),
+                       assertEquals(new Double(rows),
                                readDMLMatrixFromHDFS("C").get(new 
CellIndex(1,1)));
                }
                finally {

http://git-wip-us.apache.org/repos/asf/systemml/blob/95bf8cfe/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/FullSelectPosTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/FullSelectPosTest.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/FullSelectPosTest.java
index eaf714b..ee47a12 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/FullSelectPosTest.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/FullSelectPosTest.java
@@ -22,7 +22,6 @@ package 
org.apache.sysml.test.integration.functions.unary.matrix;
 import java.util.HashMap;
 
 import org.junit.AfterClass;
-import org.junit.Assert;
 import org.junit.BeforeClass;
 import org.junit.Test;
 
@@ -148,16 +147,10 @@ public class FullSelectPosTest extends AutomatedTestBase
         */
        private void runSelPosTest( boolean sparse, ExecType instType, boolean 
rewrites)
        {
-               RUNTIME_PLATFORM platformOld = rtplatform;
-               switch( instType ){
-                       case MR: rtplatform = RUNTIME_PLATFORM.HADOOP; break;
-                       case SPARK: rtplatform = RUNTIME_PLATFORM.SPARK; break;
-                       default: rtplatform = RUNTIME_PLATFORM.HYBRID; break;
-               }
-       
                boolean sparkConfigOld = DMLScript.USE_LOCAL_SPARK_CONFIG;
-               if( rtplatform == RUNTIME_PLATFORM.SPARK )
-                       DMLScript.USE_LOCAL_SPARK_CONFIG = true;
+               RUNTIME_PLATFORM platformOld = setRuntimePlatform(instType);
+               if(shouldSkipTest())
+                       return;
 
                //rewrites
                boolean oldFlagRewrites = 
OptimizerUtils.ALLOW_ALGEBRAIC_SIMPLIFICATION;
@@ -202,7 +195,7 @@ public class FullSelectPosTest extends AutomatedTestBase
                        if( rewrites ) {
                                String expected_op = (instType == 
ExecType.SPARK) ? Instruction.SP_INST_PREFIX+"max" : "max";
                                if(instType == ExecType.CP || instType == 
ExecType.SPARK)
-                                       Assert.assertTrue("Missing opcode: " + 
expected_op , Statistics.getCPHeavyHitterOpCodes().contains(expected_op)
+                                       assertTrue("Missing opcode: " + 
expected_op , Statistics.getCPHeavyHitterOpCodes().contains(expected_op)
                                                || 
Statistics.getCPHeavyHitterOpCodes().contains("gpu_max"));
                        }
                }
@@ -213,4 +206,4 @@ public class FullSelectPosTest extends AutomatedTestBase
                        OptimizerUtils.ALLOW_ALGEBRAIC_SIMPLIFICATION = 
oldFlagRewrites;
                }
        }       
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/systemml/blob/95bf8cfe/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/FullSignTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/FullSignTest.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/FullSignTest.java
index db4598f..40df81d 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/FullSignTest.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/FullSignTest.java
@@ -22,7 +22,6 @@ package 
org.apache.sysml.test.integration.functions.unary.matrix;
 import java.util.HashMap;
 
 import org.junit.AfterClass;
-import org.junit.Assert;
 import org.junit.BeforeClass;
 import org.junit.Test;
 
@@ -145,16 +144,10 @@ public class FullSignTest extends AutomatedTestBase
         */
        private void runSignTest( String testname, boolean sparse, ExecType 
instType)
        {
-               RUNTIME_PLATFORM platformOld = rtplatform;
-               switch( instType ){
-                       case MR: rtplatform = RUNTIME_PLATFORM.HADOOP; break;
-                       case SPARK: rtplatform = RUNTIME_PLATFORM.SPARK; break;
-                       default: rtplatform = RUNTIME_PLATFORM.HYBRID; break;
-               }
-       
                boolean sparkConfigOld = DMLScript.USE_LOCAL_SPARK_CONFIG;
-               if( rtplatform == RUNTIME_PLATFORM.SPARK )
-                       DMLScript.USE_LOCAL_SPARK_CONFIG = true;
+               RUNTIME_PLATFORM platformOld = setRuntimePlatform(instType);
+               if(shouldSkipTest())
+                       return;
 
                try
                {
@@ -194,9 +187,9 @@ public class FullSignTest extends AutomatedTestBase
                        
                        //check generated opcode
                        if( instType == ExecType.CP )
-                               Assert.assertTrue("Missing opcode: sign", 
Statistics.getCPHeavyHitterOpCodes().contains("sign"));
+                               assertTrue("Missing opcode: sign", 
Statistics.getCPHeavyHitterOpCodes().contains("sign"));
                        else if ( instType == ExecType.SPARK )
-                               Assert.assertTrue("Missing opcode: 
"+Instruction.SP_INST_PREFIX+"sign", 
Statistics.getCPHeavyHitterOpCodes().contains(Instruction.SP_INST_PREFIX+"sign"));
      
+                               assertTrue("Missing opcode: 
"+Instruction.SP_INST_PREFIX+"sign", 
Statistics.getCPHeavyHitterOpCodes().contains(Instruction.SP_INST_PREFIX+"sign"));
     
                }
                finally
                {
@@ -204,4 +197,4 @@ public class FullSignTest extends AutomatedTestBase
                        DMLScript.USE_LOCAL_SPARK_CONFIG = sparkConfigOld;
                }
        }       
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/systemml/blob/95bf8cfe/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/IQMTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/IQMTest.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/IQMTest.java
index 161e158..877f8aa 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/IQMTest.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/IQMTest.java
@@ -19,8 +19,6 @@
 
 package org.apache.sysml.test.integration.functions.unary.matrix;
 
-import static org.junit.Assert.assertTrue;
-
 import org.junit.Test;
 import org.apache.sysml.api.DMLScript;
 import org.apache.sysml.api.DMLScript.RUNTIME_PLATFORM;
@@ -260,12 +258,10 @@ public class IQMTest extends AutomatedTestBase
        
        
        private void runTest(RUNTIME_PLATFORM rt, int datasetIndex, boolean 
isWeighted ) {
-               RUNTIME_PLATFORM rtOld = rtplatform;
-               rtplatform = rt;
-               
                boolean sparkConfigOld = DMLScript.USE_LOCAL_SPARK_CONFIG;
-               if( rtplatform == RUNTIME_PLATFORM.SPARK )
-                       DMLScript.USE_LOCAL_SPARK_CONFIG = true;
+               RUNTIME_PLATFORM rtOld = setRuntimePlatform(rt);
+               if(shouldSkipTest())
+                       return;
                
                try
                {

http://git-wip-us.apache.org/repos/asf/systemml/blob/95bf8cfe/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/LUFactorizeTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/LUFactorizeTest.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/LUFactorizeTest.java
index 5452b23..486606a 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/LUFactorizeTest.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/LUFactorizeTest.java
@@ -84,12 +84,10 @@ public class LUFactorizeTest extends AutomatedTestBase
        
        private void runTestLUFactorize( int rows, RUNTIME_PLATFORM rt)
        {               
-               RUNTIME_PLATFORM rtold = rtplatform;
-               rtplatform = rt;
-               
                boolean sparkConfigOld = DMLScript.USE_LOCAL_SPARK_CONFIG;
-               if( rtplatform == RUNTIME_PLATFORM.SPARK )
-                       DMLScript.USE_LOCAL_SPARK_CONFIG = true;
+               RUNTIME_PLATFORM rtold = setRuntimePlatform(rt);
+               if(shouldSkipTest())
+                       return;
                
                try
                {

http://git-wip-us.apache.org/repos/asf/systemml/blob/95bf8cfe/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/MLUnaryBuiltinTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/MLUnaryBuiltinTest.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/MLUnaryBuiltinTest.java
index 17c0ffa..b0fc3e1 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/MLUnaryBuiltinTest.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/MLUnaryBuiltinTest.java
@@ -22,7 +22,6 @@ package 
org.apache.sysml.test.integration.functions.unary.matrix;
 import java.util.HashMap;
 
 import org.junit.AfterClass;
-import org.junit.Assert;
 import org.junit.BeforeClass;
 import org.junit.Test;
 
@@ -241,17 +240,10 @@ public class MLUnaryBuiltinTest extends AutomatedTestBase
         */
        private void runMLUnaryBuiltinTest( String testname, InputType type, 
boolean sparse, ExecType instType)
        {
-               //rtplatform for MR
-               RUNTIME_PLATFORM platformOld = rtplatform;
-               switch( instType ){
-                       case MR: rtplatform = RUNTIME_PLATFORM.HADOOP; break;
-                       case SPARK: rtplatform = RUNTIME_PLATFORM.SPARK; break;
-                       default: rtplatform = RUNTIME_PLATFORM.HYBRID; break;
-               }
-       
                boolean sparkConfigOld = DMLScript.USE_LOCAL_SPARK_CONFIG;
-               if( rtplatform == RUNTIME_PLATFORM.SPARK )
-                       DMLScript.USE_LOCAL_SPARK_CONFIG = true;
+               RUNTIME_PLATFORM platformOld = setRuntimePlatform(instType);
+               if(shouldSkipTest())
+                       return;
                
                try
                {
@@ -283,7 +275,7 @@ public class MLUnaryBuiltinTest extends AutomatedTestBase
        
                        runTest(true, false, null, -1); 
                        if( instType==ExecType.CP ) //in CP no MR jobs should 
be executed
-                               Assert.assertEquals("Unexpected number of 
executed MR jobs.", 0, Statistics.getNoOfExecutedMRJobs());
+                               assertEquals("Unexpected number of executed MR 
jobs.", 0, Statistics.getNoOfExecutedMRJobs());
                        
                        runRScript(true); 
                
@@ -298,4 +290,4 @@ public class MLUnaryBuiltinTest extends AutomatedTestBase
                        DMLScript.USE_LOCAL_SPARK_CONFIG = sparkConfigOld;
                }
        }       
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/systemml/blob/95bf8cfe/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/MatrixInverseTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/MatrixInverseTest.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/MatrixInverseTest.java
index a106395..aa1ee95 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/MatrixInverseTest.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/MatrixInverseTest.java
@@ -82,12 +82,10 @@ public class MatrixInverseTest extends AutomatedTestBase
        
        private void runTestMatrixInverse( RUNTIME_PLATFORM rt )
        {
-               RUNTIME_PLATFORM rtold = rtplatform;
-               rtplatform = rt;
-               
                boolean sparkConfigOld = DMLScript.USE_LOCAL_SPARK_CONFIG;
-               if( rtplatform == RUNTIME_PLATFORM.SPARK )
-                       DMLScript.USE_LOCAL_SPARK_CONFIG = true;
+               RUNTIME_PLATFORM rtold = setRuntimePlatform(rt);
+               if(shouldSkipTest())
+                       return;
                
                try {
                        boolean exceptionExpected = false;

http://git-wip-us.apache.org/repos/asf/systemml/blob/95bf8cfe/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/MinusTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/MinusTest.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/MinusTest.java
index 150d81b..f02e48a 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/MinusTest.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/MinusTest.java
@@ -101,16 +101,10 @@ public class MinusTest extends AutomatedTestBase
        
        private void runTestMinus( boolean sparse, ExecType et )
        {               
-               //handle rows and cols
-               RUNTIME_PLATFORM platformOld = rtplatform;
                boolean sparkConfigOld = DMLScript.USE_LOCAL_SPARK_CONFIG;
-               if( et == ExecType.SPARK ) {
-               rtplatform = RUNTIME_PLATFORM.SPARK;
-                       DMLScript.USE_LOCAL_SPARK_CONFIG = true;
-           }
-               else {
-               rtplatform = (et==ExecType.MR)? RUNTIME_PLATFORM.HADOOP : 
RUNTIME_PLATFORM.SINGLE_NODE;
-           }
+               RUNTIME_PLATFORM platformOld = setRuntimePlatform(et);
+               if(shouldSkipTest())
+                       return;
        
                try
                {

http://git-wip-us.apache.org/repos/asf/systemml/blob/95bf8cfe/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/NegationTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/NegationTest.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/NegationTest.java
index 59a7691..c2613c2 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/NegationTest.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/NegationTest.java
@@ -20,7 +20,8 @@
 package org.apache.sysml.test.integration.functions.unary.matrix;
 
 import org.junit.Test;
-
+import org.apache.sysml.api.DMLScript;
+import org.apache.sysml.api.DMLScript.RUNTIME_PLATFORM;
 import org.apache.sysml.test.integration.AutomatedTestBase;
 import org.apache.sysml.test.integration.TestConfiguration;
 
@@ -44,6 +45,9 @@ public class NegationTest extends AutomatedTestBase
        
        @Test
        public void testPositive() {
+               if(shouldSkipTest())
+                       return;
+               
                int rows = 10;
                int cols = 10;
                
@@ -78,6 +82,9 @@ public class NegationTest extends AutomatedTestBase
        
        @Test
        public void testNegative() {
+               if(shouldSkipTest())
+                       return;
+               
                int rows = 10;
                int cols = 10;
                
@@ -112,6 +119,9 @@ public class NegationTest extends AutomatedTestBase
        
        @Test
        public void testRandom() {
+               if(shouldSkipTest())
+                       return;
+               
                int rows = 10;
                int cols = 10;
                

http://git-wip-us.apache.org/repos/asf/systemml/blob/95bf8cfe/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/PrintTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/PrintTest.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/PrintTest.java
index 268f41d..c5041a7 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/PrintTest.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/PrintTest.java
@@ -49,6 +49,9 @@ public class PrintTest extends AutomatedTestBase
        
        private void runPrintTest()
        {       
+               if(shouldSkipTest())
+                       return;
+               
                //register test configuration
                TestConfiguration config = getTestConfiguration(TEST_NAME);
                config.addVariable("rows", rows);

http://git-wip-us.apache.org/repos/asf/systemml/blob/95bf8cfe/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/QRSolverTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/QRSolverTest.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/QRSolverTest.java
index f21db74..d4edefa 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/QRSolverTest.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/QRSolverTest.java
@@ -102,12 +102,10 @@ public class QRSolverTest extends AutomatedTestBase
        
        private void runTestQRSolve( RUNTIME_PLATFORM rt)
        {
-               RUNTIME_PLATFORM rtold = rtplatform;
-               rtplatform = rt;
-               
                boolean sparkConfigOld = DMLScript.USE_LOCAL_SPARK_CONFIG;
-               if( rtplatform == RUNTIME_PLATFORM.SPARK )
-                       DMLScript.USE_LOCAL_SPARK_CONFIG = true;
+               RUNTIME_PLATFORM rtold = setRuntimePlatform(rt);
+               if(shouldSkipTest())
+                       return;
                
                try {
                        boolean exceptionExpected = false;

http://git-wip-us.apache.org/repos/asf/systemml/blob/95bf8cfe/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/RemoveEmptySelTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/RemoveEmptySelTest.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/RemoveEmptySelTest.java
index cba0e99..cbf12c2 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/RemoveEmptySelTest.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/RemoveEmptySelTest.java
@@ -21,7 +21,6 @@ package 
org.apache.sysml.test.integration.functions.unary.matrix;
 
 import java.util.HashMap;
 
-import org.junit.Assert;
 import org.junit.Test;
 import org.apache.sysml.api.DMLScript;
 import org.apache.sysml.api.DMLScript.RUNTIME_PLATFORM;
@@ -115,18 +114,11 @@ public class RemoveEmptySelTest extends AutomatedTestBase
         * @param empty
         */
        private void runTestRemoveEmptySel( String margin, ExecType et, boolean 
empty )
-       {               
-               //rtplatform for MR
-               RUNTIME_PLATFORM platformOld = rtplatform;
-               switch( et ){
-                       case MR: rtplatform = RUNTIME_PLATFORM.HADOOP; break;
-                       case SPARK: rtplatform = RUNTIME_PLATFORM.SPARK; break;
-                       default: rtplatform = RUNTIME_PLATFORM.HYBRID; break;
-               }
-       
+       {       
                boolean sparkConfigOld = DMLScript.USE_LOCAL_SPARK_CONFIG;
-               if( rtplatform == RUNTIME_PLATFORM.SPARK )
-                       DMLScript.USE_LOCAL_SPARK_CONFIG = true;
+               RUNTIME_PLATFORM platformOld = setRuntimePlatform(et);
+               if(shouldSkipTest())
+                       return;
                
                try
                {       
@@ -148,8 +140,8 @@ public class RemoveEmptySelTest extends AutomatedTestBase
                        HashMap<CellIndex, Double> dmlfile = 
readDMLMatrixFromHDFS("R");
                        Double expectedRows = (double) (margin.equals("rows") ? 
rows/2 : rows);
                        Double expectedCols = (double) (margin.equals("cols") ? 
cols/2 : cols);
-                       Assert.assertEquals("Wrong output nrow.", expectedRows, 
dmlfile.get(new CellIndex(1,1)));
-                       Assert.assertEquals("Wrong output ncol.", expectedCols, 
dmlfile.get(new CellIndex(2,1)));                       
+                       assertEquals("Wrong output nrow.", expectedRows, 
dmlfile.get(new CellIndex(1,1)));
+                       assertEquals("Wrong output ncol.", expectedCols, 
dmlfile.get(new CellIndex(2,1)));                      
                }
                finally
                {
@@ -158,4 +150,4 @@ public class RemoveEmptySelTest extends AutomatedTestBase
                        DMLScript.USE_LOCAL_SPARK_CONFIG = sparkConfigOld;
                }
        }       
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/systemml/blob/95bf8cfe/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/RemoveEmptyTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/RemoveEmptyTest.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/RemoveEmptyTest.java
index 05604d1..05be09f 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/RemoveEmptyTest.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/RemoveEmptyTest.java
@@ -440,17 +440,10 @@ public class RemoveEmptyTest extends AutomatedTestBase
         */
        private void runTestRemoveEmpty( String testname, String margin, 
ExecType et, boolean sparse, boolean bForceDistRmEmpty, boolean bSelectIndex)
        {               
-               //rtplatform for MR
-               RUNTIME_PLATFORM platformOld = rtplatform;
-               switch( et ){
-                       case MR: rtplatform = RUNTIME_PLATFORM.HADOOP; break;
-                       case SPARK: rtplatform = RUNTIME_PLATFORM.SPARK; break;
-                       default: rtplatform = RUNTIME_PLATFORM.HYBRID; break;
-               }
-       
                boolean sparkConfigOld = DMLScript.USE_LOCAL_SPARK_CONFIG;
-               if( rtplatform == RUNTIME_PLATFORM.SPARK )
-                       DMLScript.USE_LOCAL_SPARK_CONFIG = true;
+               RUNTIME_PLATFORM platformOld = setRuntimePlatform(et);
+               if(shouldSkipTest())
+                       return;
                
                ParameterizedBuiltinOp.FORCE_DIST_RM_EMPTY = bForceDistRmEmpty;
                

http://git-wip-us.apache.org/repos/asf/systemml/blob/95bf8cfe/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/ReplaceTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/ReplaceTest.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/ReplaceTest.java
index 4dca2b0..709e943 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/ReplaceTest.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/ReplaceTest.java
@@ -22,7 +22,6 @@ package 
org.apache.sysml.test.integration.functions.unary.matrix;
 import java.util.HashMap;
 import java.util.Random;
 
-import org.junit.Assert;
 import org.junit.Test;
 
 import org.apache.sysml.api.DMLScript;
@@ -295,19 +294,13 @@ public class ReplaceTest extends AutomatedTestBase
         */
        private void runTestReplace( String test, double pattern, boolean 
sparse, ExecType etype )
        {               
-               RUNTIME_PLATFORM platformOld = rtplatform;
                boolean sparkConfigOld = DMLScript.USE_LOCAL_SPARK_CONFIG;
+               RUNTIME_PLATFORM platformOld = setRuntimePlatform(etype);
+               if(shouldSkipTest())
+                       return;
                
                try
                {
-                       if(etype == ExecType.SPARK) {
-                       rtplatform = RUNTIME_PLATFORM.SPARK;
-                   }
-                   else {
-                       rtplatform = (etype==ExecType.MR)? 
RUNTIME_PLATFORM.HADOOP : RUNTIME_PLATFORM.HYBRID;
-                   }
-                       if( rtplatform == RUNTIME_PLATFORM.SPARK )
-                               DMLScript.USE_LOCAL_SPARK_CONFIG = true;
                        
                        double sparsity = (sparse)? sparsity2 : sparsity1;
                                
@@ -335,7 +328,7 @@ public class ReplaceTest extends AutomatedTestBase
                        runRScript(true); 
                
                        int numMRExpect = 
(etype==ExecType.MR)?(test.equals(TEST_NAME1)?1:test.equals(TEST_NAME5)?3:2):0; 
-                       Assert.assertEquals("Unexpected number of executed MR 
jobs.", 
+                       assertEquals("Unexpected number of executed MR jobs.", 
                           numMRExpect, Statistics.getNoOfExecutedMRJobs()); 
//reblock in test1, reblock+GMR in test2-4
                
                        //compare matrices 
@@ -357,4 +350,4 @@ public class ReplaceTest extends AutomatedTestBase
                for( int i=0; i<len; i++ )
                        A[rand.nextInt(rows-1)][rand.nextInt(cols-1)] = 
replacement;
        }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/systemml/blob/95bf8cfe/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/RoundTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/RoundTest.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/RoundTest.java
index 249048e..fb5eec9 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/RoundTest.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/RoundTest.java
@@ -544,12 +544,10 @@ public class RoundTest extends AutomatedTestBase
        // 
-----------------------------------------------------------------------------
        
        private void runTest(RUNTIME_PLATFORM rt, TEST_TYPE test, int rows, int 
cols, double sparsity) {
-               RUNTIME_PLATFORM rtOld = rtplatform;
-               rtplatform = rt;
-               
                boolean sparkConfigOld = DMLScript.USE_LOCAL_SPARK_CONFIG;
-               if( rtplatform == RUNTIME_PLATFORM.SPARK )
-                       DMLScript.USE_LOCAL_SPARK_CONFIG = true;
+               RUNTIME_PLATFORM rtOld = setRuntimePlatform(rt);
+               if(shouldSkipTest())
+                       return;
        
                try
                {

http://git-wip-us.apache.org/repos/asf/systemml/blob/95bf8cfe/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/SVDFactorizeTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/SVDFactorizeTest.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/SVDFactorizeTest.java
index 12bd853..e38da78 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/SVDFactorizeTest.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/SVDFactorizeTest.java
@@ -86,13 +86,11 @@ public class SVDFactorizeTest extends AutomatedTestBase
        }
        
        private void runTestSVDFactorize( int rows, int cols, RUNTIME_PLATFORM 
rt)
-       {
-               RUNTIME_PLATFORM rtold = rtplatform;
-               rtplatform = rt;
-               
+       {       
                boolean sparkConfigOld = DMLScript.USE_LOCAL_SPARK_CONFIG;
-               if( rtplatform == RUNTIME_PLATFORM.SPARK )
-                       DMLScript.USE_LOCAL_SPARK_CONFIG = true;
+               RUNTIME_PLATFORM rtold = setRuntimePlatform(rt);
+               if(shouldSkipTest())
+                       return;
                
                try
                {

http://git-wip-us.apache.org/repos/asf/systemml/blob/95bf8cfe/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/SinTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/SinTest.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/SinTest.java
index 7407416..b5f7c26 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/SinTest.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/SinTest.java
@@ -20,7 +20,8 @@
 package org.apache.sysml.test.integration.functions.unary.matrix;
 
 import org.junit.Test;
-
+import org.apache.sysml.api.DMLScript;
+import org.apache.sysml.api.DMLScript.RUNTIME_PLATFORM;
 import org.apache.sysml.test.integration.AutomatedTestBase;
 import org.apache.sysml.test.integration.TestConfiguration;
 
@@ -45,6 +46,9 @@ public class SinTest extends AutomatedTestBase
        
        @Test
        public void testPositive() {
+               if(shouldSkipTest())
+                       return;
+               
                int rows = 10;
                int cols = 10;
                
@@ -79,6 +83,9 @@ public class SinTest extends AutomatedTestBase
        
        @Test
        public void testNegative() {
+               if(shouldSkipTest())
+                       return;
+               
                int rows = 10;
                int cols = 10;
                
@@ -113,6 +120,9 @@ public class SinTest extends AutomatedTestBase
        
        @Test
        public void testRandom() {
+               if(shouldSkipTest())
+                       return;
+               
                int rows = 10;
                int cols = 10;
                

http://git-wip-us.apache.org/repos/asf/systemml/blob/95bf8cfe/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/SqrtTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/SqrtTest.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/SqrtTest.java
index 26b7907..68495f3 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/SqrtTest.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/SqrtTest.java
@@ -47,6 +47,10 @@ public class SqrtTest extends AutomatedTestBase
        
        @Test
        public void testPositive() {
+               if(shouldSkipTest())
+                       return;
+               
+               
                int rows = 10;
                int cols = 10;
                
@@ -81,6 +85,10 @@ public class SqrtTest extends AutomatedTestBase
        
        @Test
        public void testNegativeVector() {
+               if(shouldSkipTest())
+                       return;
+               
+               
                int rows = 10;
                int cols = 1;
                
@@ -97,6 +105,10 @@ public class SqrtTest extends AutomatedTestBase
        
        @Test
        public void testNegativeMatrix() {
+               if(shouldSkipTest())
+                       return;
+               
+               
                int rows = 10;
                int cols = 10;
                

http://git-wip-us.apache.org/repos/asf/systemml/blob/95bf8cfe/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/TanTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/TanTest.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/TanTest.java
index 0cdbeea..497e393 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/TanTest.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/TanTest.java
@@ -20,7 +20,8 @@
 package org.apache.sysml.test.integration.functions.unary.matrix;
 
 import org.junit.Test;
-
+import org.apache.sysml.api.DMLScript;
+import org.apache.sysml.api.DMLScript.RUNTIME_PLATFORM;
 import org.apache.sysml.test.integration.AutomatedTestBase;
 import org.apache.sysml.test.integration.TestConfiguration;
 
@@ -45,6 +46,9 @@ public class TanTest extends AutomatedTestBase
        
        @Test
        public void testPositive() {
+               if(shouldSkipTest())
+                       return;
+               
                int rows = 10;
                int cols = 10;
                
@@ -79,6 +83,9 @@ public class TanTest extends AutomatedTestBase
        
        @Test
        public void testNegative() {
+               if(shouldSkipTest())
+                       return;
+               
                int rows = 10;
                int cols = 10;
                

http://git-wip-us.apache.org/repos/asf/systemml/blob/95bf8cfe/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/TransposeTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/TransposeTest.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/TransposeTest.java
index 6ee7d28..ba209d9 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/TransposeTest.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/TransposeTest.java
@@ -42,6 +42,9 @@ public class TransposeTest extends AutomatedTestBase
        
        @Test
        public void testTranspose() {
+               if(shouldSkipTest())
+                       return;
+               
                int rows = 10;
                int cols = 10;
                

http://git-wip-us.apache.org/repos/asf/systemml/blob/95bf8cfe/src/test/java/org/apache/sysml/test/integration/functions/unary/scalar/ACosTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/unary/scalar/ACosTest.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/unary/scalar/ACosTest.java
index 6ce8611..f182163 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/unary/scalar/ACosTest.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/unary/scalar/ACosTest.java
@@ -62,6 +62,9 @@ public class ACosTest extends AutomatedTestBase
        
        @Test
        public void testPositive() {
+               if(shouldSkipTest())
+                       return;
+               
                int intValue = 5;
                double doubleValue = 5.0;
                
@@ -85,6 +88,9 @@ public class ACosTest extends AutomatedTestBase
        
        @Test
        public void testNegative() {
+               if(shouldSkipTest())
+                       return;
+               
                int intValue = -5;
                double doubleValue = -5.0;
                
@@ -108,6 +114,9 @@ public class ACosTest extends AutomatedTestBase
        
        @Test
        public void testZero() {
+               if(shouldSkipTest())
+                       return;
+               
                int intValue = 0;
                double doubleValue = 0.0;
                
@@ -131,6 +140,9 @@ public class ACosTest extends AutomatedTestBase
        
        @Test
        public void testRandom() {
+               if(shouldSkipTest())
+                       return;
+               
                int intValue = TestUtils.getRandomInt();
                double doubleValue = TestUtils.getRandomDouble();
                

http://git-wip-us.apache.org/repos/asf/systemml/blob/95bf8cfe/src/test/java/org/apache/sysml/test/integration/functions/unary/scalar/ASinTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/unary/scalar/ASinTest.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/unary/scalar/ASinTest.java
index 94c12bf..f8c5318 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/unary/scalar/ASinTest.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/unary/scalar/ASinTest.java
@@ -58,6 +58,9 @@ public class ASinTest extends AutomatedTestBase
        
        @Test
        public void testPositive() {
+               if(shouldSkipTest())
+                       return;
+               
                int intValue = 5;
                double doubleValue = 5.0;
                
@@ -81,6 +84,9 @@ public class ASinTest extends AutomatedTestBase
        
        @Test
        public void testNegative() {
+               if(shouldSkipTest())
+                       return;
+               
                int intValue = -5;
                double doubleValue = -5.0;
                
@@ -104,6 +110,9 @@ public class ASinTest extends AutomatedTestBase
        
        @Test
        public void testRandom() {
+               if(shouldSkipTest())
+                       return;
+               
                int intValue = TestUtils.getRandomInt();
                double doubleValue = TestUtils.getRandomDouble();
                

http://git-wip-us.apache.org/repos/asf/systemml/blob/95bf8cfe/src/test/java/org/apache/sysml/test/integration/functions/unary/scalar/ATanTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/unary/scalar/ATanTest.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/unary/scalar/ATanTest.java
index 3908f49..0152865 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/unary/scalar/ATanTest.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/unary/scalar/ATanTest.java
@@ -59,6 +59,9 @@ public class ATanTest extends AutomatedTestBase
        
        @Test
        public void testPositive() {
+               if(shouldSkipTest())
+                       return;
+               
                int intValue = 5;
                double doubleValue = 5.0;
                
@@ -82,6 +85,9 @@ public class ATanTest extends AutomatedTestBase
        
        @Test
        public void testNegative() {
+               if(shouldSkipTest())
+                       return;
+               
                int intValue = -5;
                double doubleValue = -5.0;
                
@@ -105,6 +111,9 @@ public class ATanTest extends AutomatedTestBase
        
        @Test
        public void testRandom() {
+               if(shouldSkipTest())
+                       return;
+               
                int intValue = TestUtils.getRandomInt();
                double doubleValue = TestUtils.getRandomDouble();
                

http://git-wip-us.apache.org/repos/asf/systemml/blob/95bf8cfe/src/test/java/org/apache/sysml/test/integration/functions/unary/scalar/AbsTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/unary/scalar/AbsTest.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/unary/scalar/AbsTest.java
index dcb2fb9..b064114 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/unary/scalar/AbsTest.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/unary/scalar/AbsTest.java
@@ -61,6 +61,9 @@ public class AbsTest extends AutomatedTestBase
        
        @Test
        public void testPositive() {
+               if(shouldSkipTest())
+                       return;
+               
                int intValue = 5;
                double doubleValue = 5.0;
                
@@ -84,6 +87,9 @@ public class AbsTest extends AutomatedTestBase
        
        @Test
        public void testNegative() {
+               if(shouldSkipTest())
+                       return;
+               
                int intValue = -5;
                double doubleValue = -5.0;
                
@@ -107,6 +113,9 @@ public class AbsTest extends AutomatedTestBase
        
        @Test
        public void testZero() {
+               if(shouldSkipTest())
+                       return;
+               
                int intValue = 0;
                double doubleValue = 0.0;
                
@@ -130,6 +139,9 @@ public class AbsTest extends AutomatedTestBase
        
        @Test
        public void testRandom() {
+               if(shouldSkipTest())
+                       return;
+               
                int intValue = TestUtils.getRandomInt();
                double doubleValue = TestUtils.getRandomDouble();
                

http://git-wip-us.apache.org/repos/asf/systemml/blob/95bf8cfe/src/test/java/org/apache/sysml/test/integration/functions/unary/scalar/BooleanTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/unary/scalar/BooleanTest.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/unary/scalar/BooleanTest.java
index 826592c..f1b7a9b 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/unary/scalar/BooleanTest.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/unary/scalar/BooleanTest.java
@@ -43,6 +43,9 @@ public class BooleanTest extends AutomatedTestBase
        
        @Test
        public void testWhile() {
+               if(shouldSkipTest())
+                       return;
+               
                TestConfiguration config = getTestConfiguration("WhileTest");
                loadTestConfiguration(config);
                

http://git-wip-us.apache.org/repos/asf/systemml/blob/95bf8cfe/src/test/java/org/apache/sysml/test/integration/functions/unary/scalar/CosTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/unary/scalar/CosTest.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/unary/scalar/CosTest.java
index a5e0194..b30e40f 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/unary/scalar/CosTest.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/unary/scalar/CosTest.java
@@ -63,6 +63,9 @@ public class CosTest extends AutomatedTestBase
        
        @Test
        public void testPositive() {
+               if(shouldSkipTest())
+                       return;
+               
                int intValue = 5;
                double doubleValue = 5.0;
                
@@ -86,6 +89,9 @@ public class CosTest extends AutomatedTestBase
        
        @Test
        public void testNegative() {
+               if(shouldSkipTest())
+                       return;
+               
                int intValue = -5;
                double doubleValue = -5.0;
                
@@ -109,6 +115,9 @@ public class CosTest extends AutomatedTestBase
        
        @Test
        public void testZero() {
+               if(shouldSkipTest())
+                       return;
+               
                int intValue = 0;
                double doubleValue = 0.0;
                
@@ -132,6 +141,9 @@ public class CosTest extends AutomatedTestBase
        
        @Test
        public void testRandom() {
+               if(shouldSkipTest())
+                       return;
+               
                int intValue = TestUtils.getRandomInt();
                double doubleValue = TestUtils.getRandomDouble();
                

http://git-wip-us.apache.org/repos/asf/systemml/blob/95bf8cfe/src/test/java/org/apache/sysml/test/integration/functions/unary/scalar/ExponentTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/unary/scalar/ExponentTest.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/unary/scalar/ExponentTest.java
index 0179189..5e977fc 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/unary/scalar/ExponentTest.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/unary/scalar/ExponentTest.java
@@ -70,6 +70,9 @@ public class ExponentTest extends AutomatedTestBase
        
        @Test
        public void testConst() {
+               if(shouldSkipTest())
+                       return;
+               
                int intValue = 2;
                double doubleValue = 2.5;
                
@@ -95,6 +98,9 @@ public class ExponentTest extends AutomatedTestBase
        
        @Test
        public void testVar() {
+               if(shouldSkipTest())
+                       return;
+               
                int intValue = 2;
                double doubleValue = 2.5;
                
@@ -121,6 +127,9 @@ public class ExponentTest extends AutomatedTestBase
        
        @Test
        public void testRandomConst() {
+               if(shouldSkipTest())
+                       return;
+               
                int intValue = TestUtils.getRandomInt();
                double doubleValue = TestUtils.getRandomDouble();
                
@@ -146,6 +155,9 @@ public class ExponentTest extends AutomatedTestBase
        
        @Test
        public void testRandomVar() {
+               if(shouldSkipTest())
+                       return;
+               
                int intValue = TestUtils.getRandomInt();
                double doubleValue = TestUtils.getRandomDouble();
                
@@ -172,6 +184,9 @@ public class ExponentTest extends AutomatedTestBase
        
        @Test
        public void testNegative() {
+               if(shouldSkipTest())
+                       return;
+               
                int intValue = -2;
                double doubleValue = -2.5;
                
@@ -197,6 +212,8 @@ public class ExponentTest extends AutomatedTestBase
        
        @Test
        public void testTwoParameters() {
+               if(shouldSkipTest())
+                       return;
                TestConfiguration config = 
availableTestConfigurations.get("TwoParametersTest");
                config.addVariable("vardeclaration", "");
                config.addVariable("op1", 1);

Reply via email to