http://git-wip-us.apache.org/repos/asf/systemml/blob/95bf8cfe/src/test/java/org/apache/sysml/test/integration/functions/compress/BasicScalarOperationsTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/compress/BasicScalarOperationsTest.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/compress/BasicScalarOperationsTest.java
index 7a84e71..3aacb9d 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/compress/BasicScalarOperationsTest.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/compress/BasicScalarOperationsTest.java
@@ -138,8 +138,11 @@ public class BasicScalarOperationsTest extends 
AutomatedTestBase
                runScalarOperationsTest(SparsityType.SPARSE, ValueType.CONST, 
false);
        }
        
-       private static void runScalarOperationsTest(SparsityType sptype, 
ValueType vtype, boolean compress)
+       private void runScalarOperationsTest(SparsityType sptype, ValueType 
vtype, boolean compress)
        {
+               if(shouldSkipTest())
+                       return;
+               
                try
                {
                        //prepare sparsity for input data

http://git-wip-us.apache.org/repos/asf/systemml/blob/95bf8cfe/src/test/java/org/apache/sysml/test/integration/functions/compress/BasicTransposeSelfLeftMatrixMultTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/compress/BasicTransposeSelfLeftMatrixMultTest.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/compress/BasicTransposeSelfLeftMatrixMultTest.java
index 47a4e6b..5d65431 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/compress/BasicTransposeSelfLeftMatrixMultTest.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/compress/BasicTransposeSelfLeftMatrixMultTest.java
@@ -136,8 +136,11 @@ public class BasicTransposeSelfLeftMatrixMultTest extends 
AutomatedTestBase
                runTransposeSelfMatrixMultTest(SparsityType.SPARSE, 
ValueType.CONST, false);
        }
        
-       private static void runTransposeSelfMatrixMultTest(SparsityType sptype, 
ValueType vtype, boolean compress)
+       private void runTransposeSelfMatrixMultTest(SparsityType sptype, 
ValueType vtype, boolean compress)
        {
+               if(shouldSkipTest())
+                       return;
+               
                try
                {
                        //prepare sparsity for input data

http://git-wip-us.apache.org/repos/asf/systemml/blob/95bf8cfe/src/test/java/org/apache/sysml/test/integration/functions/compress/BasicUnaryAggregateTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/compress/BasicUnaryAggregateTest.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/compress/BasicUnaryAggregateTest.java
index 38e81f2..8446422 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/compress/BasicUnaryAggregateTest.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/compress/BasicUnaryAggregateTest.java
@@ -1032,8 +1032,11 @@ public class BasicUnaryAggregateTest extends 
AutomatedTestBase
                runUnaryAggregateTest(SparsityType.SPARSE, ValueType.CONST, 
AggType.MIN, false);
        }
        
-       private static void runUnaryAggregateTest(SparsityType sptype, 
ValueType vtype, AggType aggtype, boolean compress)
+       private void runUnaryAggregateTest(SparsityType sptype, ValueType 
vtype, AggType aggtype, boolean compress)
        {
+               if(shouldSkipTest())
+                       return;
+               
                try
                {
                        //prepare sparsity for input data

http://git-wip-us.apache.org/repos/asf/systemml/blob/95bf8cfe/src/test/java/org/apache/sysml/test/integration/functions/compress/BasicVectorMatrixMultTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/compress/BasicVectorMatrixMultTest.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/compress/BasicVectorMatrixMultTest.java
index c8592af..9384359 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/compress/BasicVectorMatrixMultTest.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/compress/BasicVectorMatrixMultTest.java
@@ -140,8 +140,11 @@ public class BasicVectorMatrixMultTest extends 
AutomatedTestBase
                runMatrixVectorMultTest(SparsityType.SPARSE, ValueType.CONST, 
false);
        }
        
-       private static void runMatrixVectorMultTest(SparsityType sptype, 
ValueType vtype, boolean compress)
+       private void runMatrixVectorMultTest(SparsityType sptype, ValueType 
vtype, boolean compress)
        {
+               if(shouldSkipTest())
+                       return;
+               
                try
                {
                        //prepare sparsity for input data

http://git-wip-us.apache.org/repos/asf/systemml/blob/95bf8cfe/src/test/java/org/apache/sysml/test/integration/functions/compress/CompressedL2SVM.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/compress/CompressedL2SVM.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/compress/CompressedL2SVM.java
index 00a62d7..2b1e7ab 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/compress/CompressedL2SVM.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/compress/CompressedL2SVM.java
@@ -30,7 +30,6 @@ 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.apache.sysml.test.utils.TestUtils;
-import org.junit.Assert;
 import org.junit.Test;
 
 /**
@@ -89,17 +88,10 @@ public class CompressedL2SVM extends AutomatedTestBase
         */
        private void runL2SVMTest( String testname,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_SPARK; 
break;
-               }
-               
                boolean sparkConfigOld = DMLScript.USE_LOCAL_SPARK_CONFIG;
-               if( rtplatform == RUNTIME_PLATFORM.HYBRID_SPARK || rtplatform 
== RUNTIME_PLATFORM.SPARK )
-                       DMLScript.USE_LOCAL_SPARK_CONFIG = true;
+               RUNTIME_PLATFORM platformOld = setRuntimePlatform(instType);
+               if(shouldSkipTest())
+                       return;
                
                try
                {
@@ -129,7 +121,7 @@ public class CompressedL2SVM extends AutomatedTestBase
                        HashMap<CellIndex, Double> rfile  = 
readRMatrixFromFS("w");
                        TestUtils.compareMatrices(dmlfile, rfile, eps, 
"Stat-DML", "Stat-R");
                        
-                       
Assert.assertTrue(heavyHittersContainsSubString("compress")
+                       assertTrue(heavyHittersContainsSubString("compress")
                                || 
heavyHittersContainsSubString("sp_compress"));
                }
                finally {
@@ -149,4 +141,4 @@ public class CompressedL2SVM extends AutomatedTestBase
                System.out.println("This test case overrides default 
configuration with " + TEST_CONF_FILE.getPath());
                return TEST_CONF_FILE;
        }
-}
\ 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/compress/CompressedLinregCG.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/compress/CompressedLinregCG.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/compress/CompressedLinregCG.java
index 3999cff..4a66126 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/compress/CompressedLinregCG.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/compress/CompressedLinregCG.java
@@ -31,7 +31,6 @@ 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.apache.sysml.test.utils.TestUtils;
-import org.junit.Assert;
 import org.junit.Test;
 
 /**
@@ -85,17 +84,11 @@ public class CompressedLinregCG extends AutomatedTestBase
        
        private void runLinregCGTest( String testname,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.HYBRID_SPARK; 
break;
-                       default: rtplatform = RUNTIME_PLATFORM.HYBRID; break;
-               }
-       
                boolean sparkConfigOld = DMLScript.USE_LOCAL_SPARK_CONFIG;
-               if( rtplatform == RUNTIME_PLATFORM.HYBRID_SPARK )
-                       DMLScript.USE_LOCAL_SPARK_CONFIG = true;
+               RUNTIME_PLATFORM platformOld = setRuntimePlatform(instType);
+               if(shouldSkipTest())
+                       return;
+               
                long memOld = InfrastructureAnalyzer.getLocalMaxMemory();
                
                try
@@ -134,7 +127,7 @@ public class CompressedLinregCG extends AutomatedTestBase
                        HashMap<CellIndex, Double> rfile  = 
readRMatrixFromFS("w");
                        TestUtils.compareMatrices(dmlfile, rfile, eps, 
"Stat-DML", "Stat-R");
                        
-                       
Assert.assertTrue(heavyHittersContainsSubString("compress")
+                       assertTrue(heavyHittersContainsSubString("compress")
                                || 
heavyHittersContainsSubString("sp_compress"));
                }
                finally {

http://git-wip-us.apache.org/repos/asf/systemml/blob/95bf8cfe/src/test/java/org/apache/sysml/test/integration/functions/compress/CompressedSerializationTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/compress/CompressedSerializationTest.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/compress/CompressedSerializationTest.java
index 9afd85e..99f89d1 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/compress/CompressedSerializationTest.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/compress/CompressedSerializationTest.java
@@ -140,8 +140,11 @@ public class CompressedSerializationTest extends 
AutomatedTestBase
                runCompressedSerializationTest(SparsityType.SPARSE, 
ValueType.CONST, false);
        }
        
-       private static void runCompressedSerializationTest(SparsityType sptype, 
ValueType vtype, boolean compress)
+       private void runCompressedSerializationTest(SparsityType sptype, 
ValueType vtype, boolean compress)
        {
+               if(shouldSkipTest())
+                       return;
+               
                try
                {
                        //prepare sparsity for input data

http://git-wip-us.apache.org/repos/asf/systemml/blob/95bf8cfe/src/test/java/org/apache/sysml/test/integration/functions/compress/LargeCompressionTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/compress/LargeCompressionTest.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/compress/LargeCompressionTest.java
index 35d07e2..8e366e5 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/compress/LargeCompressionTest.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/compress/LargeCompressionTest.java
@@ -136,8 +136,11 @@ public class LargeCompressionTest extends AutomatedTestBase
                runCompressionTest(SparsityType.SPARSE, ValueType.CONST, false);
        }
        
-       private static void runCompressionTest(SparsityType sptype, ValueType 
vtype, boolean compress)
+       private void runCompressionTest(SparsityType sptype, ValueType vtype, 
boolean compress)
        {
+               if(shouldSkipTest())
+                       return;
+               
                try
                {
                        //prepare sparsity for input data

http://git-wip-us.apache.org/repos/asf/systemml/blob/95bf8cfe/src/test/java/org/apache/sysml/test/integration/functions/compress/LargeMatrixMatrixMultTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/compress/LargeMatrixMatrixMultTest.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/compress/LargeMatrixMatrixMultTest.java
index 06c513a..866cec0 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/compress/LargeMatrixMatrixMultTest.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/compress/LargeMatrixMatrixMultTest.java
@@ -223,8 +223,11 @@ public class LargeMatrixMatrixMultTest extends 
AutomatedTestBase
                runMatrixVectorMultTest(MultType.LEFT, SparsityType.SPARSE, 
ValueType.CONST, false);
        }
        
-       private static void runMatrixVectorMultTest(MultType mtype, 
SparsityType sptype, ValueType vtype, boolean compress)
+       private void runMatrixVectorMultTest(MultType mtype, SparsityType 
sptype, ValueType vtype, boolean compress)
        {
+               if(shouldSkipTest())
+                       return;
+               
                try
                {
                        //prepare sparsity for input data

http://git-wip-us.apache.org/repos/asf/systemml/blob/95bf8cfe/src/test/java/org/apache/sysml/test/integration/functions/compress/LargeMatrixVectorMultTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/compress/LargeMatrixVectorMultTest.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/compress/LargeMatrixVectorMultTest.java
index 3401c77..eec44f2 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/compress/LargeMatrixVectorMultTest.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/compress/LargeMatrixVectorMultTest.java
@@ -140,8 +140,11 @@ public class LargeMatrixVectorMultTest extends 
AutomatedTestBase
                runMatrixVectorMultTest(SparsityType.SPARSE, ValueType.CONST, 
false);
        }
        
-       private static void runMatrixVectorMultTest(SparsityType sptype, 
ValueType vtype, boolean compress)
+       private void runMatrixVectorMultTest(SparsityType sptype, ValueType 
vtype, boolean compress)
        {
+               if(shouldSkipTest())
+                       return;
+               
                try
                {
                        //prepare sparsity for input data

http://git-wip-us.apache.org/repos/asf/systemml/blob/95bf8cfe/src/test/java/org/apache/sysml/test/integration/functions/compress/LargeParMatrixVectorMultTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/compress/LargeParMatrixVectorMultTest.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/compress/LargeParMatrixVectorMultTest.java
index 19d971a..aad6bd4 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/compress/LargeParMatrixVectorMultTest.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/compress/LargeParMatrixVectorMultTest.java
@@ -141,8 +141,11 @@ public class LargeParMatrixVectorMultTest extends 
AutomatedTestBase
                runMatrixVectorMultTest(SparsityType.SPARSE, ValueType.CONST, 
false);
        }
        
-       private static void runMatrixVectorMultTest(SparsityType sptype, 
ValueType vtype, boolean compress)
+       private void runMatrixVectorMultTest(SparsityType sptype, ValueType 
vtype, boolean compress)
        {
+               if(shouldSkipTest())
+                       return;
+               
                try
                {
                        //prepare sparsity for input data

http://git-wip-us.apache.org/repos/asf/systemml/blob/95bf8cfe/src/test/java/org/apache/sysml/test/integration/functions/compress/LargeParUnaryAggregateTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/compress/LargeParUnaryAggregateTest.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/compress/LargeParUnaryAggregateTest.java
index 65553ff..4080a43 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/compress/LargeParUnaryAggregateTest.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/compress/LargeParUnaryAggregateTest.java
@@ -1035,8 +1035,11 @@ public class LargeParUnaryAggregateTest extends 
AutomatedTestBase
                runUnaryAggregateTest(SparsityType.SPARSE, ValueType.CONST, 
AggType.MIN, false);
        }
        
-       private static void runUnaryAggregateTest(SparsityType sptype, 
ValueType vtype, AggType aggtype, boolean compress)
+       private void runUnaryAggregateTest(SparsityType sptype, ValueType 
vtype, AggType aggtype, boolean compress)
        {
+               if(shouldSkipTest())
+                       return;
+               
                try
                {
                        //prepare sparsity for input data

http://git-wip-us.apache.org/repos/asf/systemml/blob/95bf8cfe/src/test/java/org/apache/sysml/test/integration/functions/compress/LargeVectorMatrixMultTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/compress/LargeVectorMatrixMultTest.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/compress/LargeVectorMatrixMultTest.java
index d7b9094..ff5d26d 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/compress/LargeVectorMatrixMultTest.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/compress/LargeVectorMatrixMultTest.java
@@ -140,8 +140,11 @@ public class LargeVectorMatrixMultTest extends 
AutomatedTestBase
                runMatrixVectorMultTest(SparsityType.SPARSE, ValueType.CONST, 
false);
        }
        
-       private static void runMatrixVectorMultTest(SparsityType sptype, 
ValueType vtype, boolean compress)
+       private void runMatrixVectorMultTest(SparsityType sptype, ValueType 
vtype, boolean compress)
        {
+               if(shouldSkipTest())
+                       return;
+               
                try
                {
                        //prepare sparsity for input data

http://git-wip-us.apache.org/repos/asf/systemml/blob/95bf8cfe/src/test/java/org/apache/sysml/test/integration/functions/compress/ParCompressionTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/compress/ParCompressionTest.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/compress/ParCompressionTest.java
index 04152cd..07734ad 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/compress/ParCompressionTest.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/compress/ParCompressionTest.java
@@ -138,8 +138,11 @@ public class ParCompressionTest extends AutomatedTestBase
                runCompressionTest(SparsityType.SPARSE, ValueType.CONST, false);
        }
        
-       private static void runCompressionTest(SparsityType sptype, ValueType 
vtype, boolean compress)
+       private void runCompressionTest(SparsityType sptype, ValueType vtype, 
boolean compress)
        {
+               if(shouldSkipTest())
+                       return;
+               
                try
                {
                        //prepare sparsity for input data

http://git-wip-us.apache.org/repos/asf/systemml/blob/95bf8cfe/src/test/java/org/apache/sysml/test/integration/functions/compress/ParMatrixMultChainTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/compress/ParMatrixMultChainTest.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/compress/ParMatrixMultChainTest.java
index 993164b..c9b4e26 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/compress/ParMatrixMultChainTest.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/compress/ParMatrixMultChainTest.java
@@ -217,8 +217,11 @@ public class ParMatrixMultChainTest extends 
AutomatedTestBase
                runMatrixMultChainTest(SparsityType.SPARSE, ValueType.CONST, 
ChainType.XtwXv, false);
        }
        
-       private static void runMatrixMultChainTest(SparsityType sptype, 
ValueType vtype, ChainType ctype, boolean compress)
+       private void runMatrixMultChainTest(SparsityType sptype, ValueType 
vtype, ChainType ctype, boolean compress)
        {
+               if(shouldSkipTest())
+                       return;
+               
                try
                {
                        //prepare sparsity for input data

http://git-wip-us.apache.org/repos/asf/systemml/blob/95bf8cfe/src/test/java/org/apache/sysml/test/integration/functions/compress/ParMatrixVectorMultTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/compress/ParMatrixVectorMultTest.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/compress/ParMatrixVectorMultTest.java
index 3fdeb19..23828f7 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/compress/ParMatrixVectorMultTest.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/compress/ParMatrixVectorMultTest.java
@@ -141,8 +141,11 @@ public class ParMatrixVectorMultTest extends 
AutomatedTestBase
                runMatrixVectorMultTest(SparsityType.SPARSE, ValueType.CONST, 
false);
        }
        
-       private static void runMatrixVectorMultTest(SparsityType sptype, 
ValueType vtype, boolean compress)
+       private void runMatrixVectorMultTest(SparsityType sptype, ValueType 
vtype, boolean compress)
        {
+               if(shouldSkipTest())
+                       return;
+               
                try
                {
                        //prepare sparsity for input data

http://git-wip-us.apache.org/repos/asf/systemml/blob/95bf8cfe/src/test/java/org/apache/sysml/test/integration/functions/compress/ParTransposeSelfLeftMatrixMultTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/compress/ParTransposeSelfLeftMatrixMultTest.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/compress/ParTransposeSelfLeftMatrixMultTest.java
index 44e18c5..852a6f0 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/compress/ParTransposeSelfLeftMatrixMultTest.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/compress/ParTransposeSelfLeftMatrixMultTest.java
@@ -137,8 +137,11 @@ public class ParTransposeSelfLeftMatrixMultTest extends 
AutomatedTestBase
                runTransposeSelfMatrixMultTest(SparsityType.SPARSE, 
ValueType.CONST, false);
        }
        
-       private static void runTransposeSelfMatrixMultTest(SparsityType sptype, 
ValueType vtype, boolean compress)
+       private void runTransposeSelfMatrixMultTest(SparsityType sptype, 
ValueType vtype, boolean compress)
        {
+               if(shouldSkipTest())
+                       return;
+               
                try
                {
                        //prepare sparsity for input data

http://git-wip-us.apache.org/repos/asf/systemml/blob/95bf8cfe/src/test/java/org/apache/sysml/test/integration/functions/compress/ParUnaryAggregateTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/compress/ParUnaryAggregateTest.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/compress/ParUnaryAggregateTest.java
index fefe8b6..a456dca 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/compress/ParUnaryAggregateTest.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/compress/ParUnaryAggregateTest.java
@@ -1034,8 +1034,11 @@ public class ParUnaryAggregateTest extends 
AutomatedTestBase
                runUnaryAggregateTest(SparsityType.SPARSE, ValueType.CONST, 
AggType.MIN, false);
        }
        
-       private static void runUnaryAggregateTest(SparsityType sptype, 
ValueType vtype, AggType aggtype, boolean compress)
+       private void runUnaryAggregateTest(SparsityType sptype, ValueType 
vtype, AggType aggtype, boolean compress)
        {
+               if(shouldSkipTest())
+                       return;
+               
                try
                {
                        //prepare sparsity for input data

http://git-wip-us.apache.org/repos/asf/systemml/blob/95bf8cfe/src/test/java/org/apache/sysml/test/integration/functions/compress/ParVectorMatrixMultTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/compress/ParVectorMatrixMultTest.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/compress/ParVectorMatrixMultTest.java
index 6bbcde9..3357eec 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/compress/ParVectorMatrixMultTest.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/compress/ParVectorMatrixMultTest.java
@@ -140,8 +140,11 @@ public class ParVectorMatrixMultTest extends 
AutomatedTestBase
                runMatrixVectorMultTest(SparsityType.SPARSE, ValueType.CONST, 
false);
        }
        
-       private static void runMatrixVectorMultTest(SparsityType sptype, 
ValueType vtype, boolean compress)
+       private void runMatrixVectorMultTest(SparsityType sptype, ValueType 
vtype, boolean compress)
        {
+               if(shouldSkipTest())
+                       return;
+               
                try
                {
                        //prepare sparsity for input data

http://git-wip-us.apache.org/repos/asf/systemml/blob/95bf8cfe/src/test/java/org/apache/sysml/test/integration/functions/data/FullReblockTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/data/FullReblockTest.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/data/FullReblockTest.java
index 9e2f902..06fe7a4 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/data/FullReblockTest.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/data/FullReblockTest.java
@@ -442,16 +442,10 @@ public class FullReblockTest extends AutomatedTestBase
                int rows = (type==Type.Vector)? rowsV : rowsM;
                int cols = (type==Type.Vector)? colsV : colsM;
                
-               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;
                
                TestConfiguration config = getTestConfiguration(TEST_NAME);
                config.addVariable("rows", rows);
@@ -524,4 +518,4 @@ public class FullReblockTest extends AutomatedTestBase
                DataConverter.writeMatrixToHDFS(mb, fname, oi, mc);
                MapReduceTool.writeMetaDataFile(fname+".mtd", ValueType.DOUBLE, 
mc, oi);
        }
-}
\ 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/data/FullStringInitializeTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/data/FullStringInitializeTest.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/data/FullStringInitializeTest.java
index 095b11f..098a541 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/data/FullStringInitializeTest.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/data/FullStringInitializeTest.java
@@ -19,7 +19,6 @@
 
 package org.apache.sysml.test.integration.functions.data;
 
-import org.junit.Assert;
 import org.junit.Test;
 import org.apache.sysml.api.DMLScript.RUNTIME_PLATFORM;
 import org.apache.sysml.hops.OptimizerUtils;
@@ -315,9 +314,9 @@ public class FullStringInitializeTest extends 
AutomatedTestBase
         */
        private void runStringInitializeTest( InputType intype, ValueType vt, 
boolean sparse, ErrorType errtype, ExecType instType)
        {
-               //rtplatform for MR
-               RUNTIME_PLATFORM platformOld = rtplatform;
-               rtplatform = (instType==ExecType.MR) ? RUNTIME_PLATFORM.HADOOP 
: RUNTIME_PLATFORM.HYBRID;
+               RUNTIME_PLATFORM platformOld = setRuntimePlatform(instType);
+               if(shouldSkipTest())
+                       return;
                
                try
                {
@@ -371,11 +370,11 @@ public class FullStringInitializeTest extends 
AutomatedTestBase
                catch(Exception ex)
                {
                        ex.printStackTrace();
-                       Assert.fail(ex.getMessage());
+                       fail(ex.getMessage());
                }
                finally
                {
                        rtplatform = platformOld;
                }
        }       
-}
\ 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/data/MatrixMarketFormatTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/data/MatrixMarketFormatTest.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/data/MatrixMarketFormatTest.java
index 2ecad5f..5ec97f4 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/data/MatrixMarketFormatTest.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/data/MatrixMarketFormatTest.java
@@ -210,17 +210,10 @@ public class MatrixMarketFormatTest extends 
AutomatedTestBase
 
        private void runMatrixMarketFormatTest(MMFormat fmt, MMField field, 
MMSymmetry symmetry, 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.SINGLE_NODE; 
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/data/RandRuntimePlatformTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/data/RandRuntimePlatformTest.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/data/RandRuntimePlatformTest.java
index 7581313..bf318a0 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/data/RandRuntimePlatformTest.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/data/RandRuntimePlatformTest.java
@@ -214,26 +214,42 @@ public class RandRuntimePlatformTest extends 
AutomatedTestBase
                        // Generate Data in CP
                        rtplatform = RUNTIME_PLATFORM.SINGLE_NODE;
                        programArgs[programArgs.length-1] = output("A_SN"); // 
data file generated from CP
-                       runTest(true, exceptionExpected, null, -1); 
+                       boolean snResults = false;
+                       if(!shouldSkipTest()) {
+                               snResults = true;
+                               runTest(true, exceptionExpected, null, -1);
+                       }
                                                
                        
                        // Generate Data in CP
                        rtplatform = RUNTIME_PLATFORM.HYBRID;
                        programArgs[programArgs.length-1] = output("A_CP"); // 
data file generated from CP
-                       runTest(true, exceptionExpected, null, -1); 
+                       boolean cpResults = false;
+                       if(!shouldSkipTest()) {
+                               cpResults = true;
+                               runTest(true, exceptionExpected, null, -1);
+                       }
                        
                        // Generate Data in MR
                        rtplatform = RUNTIME_PLATFORM.HADOOP;
                        programArgs[programArgs.length-1] = output("A_MR"); // 
data file generated from MR
-                       runTest(true, exceptionExpected, null, -1); 
+                       boolean mrResults = false;
+                       if(!shouldSkipTest()) {
+                               mrResults = true;
+                               runTest(true, exceptionExpected, null, -1);
+                       }
                        
                        boolean sparkConfigOld = 
DMLScript.USE_LOCAL_SPARK_CONFIG;
+                       boolean sparkResults = false;
                        try {
                                // Generate Data in Spark
                                rtplatform = RUNTIME_PLATFORM.SPARK;
                                DMLScript.USE_LOCAL_SPARK_CONFIG = true;
                                programArgs[programArgs.length-1] = 
output("A_SPARK"); // data file generated from MR
-                               runTest(true, exceptionExpected, null, -1); 
+                               if(!shouldSkipTest()) {
+                                       sparkResults = true;
+                                       runTest(true, exceptionExpected, null, 
-1);
+                               }
                        }
                        finally {
                                DMLScript.USE_LOCAL_SPARK_CONFIG = 
sparkConfigOld;
@@ -242,13 +258,15 @@ public class RandRuntimePlatformTest extends 
AutomatedTestBase
                        //compare matrices (1-2, 2-3 -> transitively 1-3)
                        HashMap<CellIndex, Double> cpfile = 
readDMLMatrixFromHDFS("A_CP");
                        HashMap<CellIndex, Double> mrfile = 
readDMLMatrixFromHDFS("A_MR");
-                       TestUtils.compareMatrices(cpfile, mrfile, eps, 
"CPFile", "MRFile");
+                       if(cpResults && mrResults)
+                               TestUtils.compareMatrices(cpfile, mrfile, eps, 
"CPFile", "MRFile");
                        cpfile = null;
                        HashMap<CellIndex, Double> snfile = 
readDMLMatrixFromHDFS("A_SN");
-                       TestUtils.compareMatrices(snfile, mrfile, eps, 
"SNFile", "MRFile");             
-                       
+                       if(snResults && mrResults)
+                               TestUtils.compareMatrices(snfile, mrfile, eps, 
"SNFile", "MRFile");
                        HashMap<CellIndex, Double> spfile = 
readDMLMatrixFromHDFS("A_SPARK");
-                       TestUtils.compareMatrices(spfile, mrfile, eps, 
"SPFile", "MRFile");     
+                       if(sparkResults && snResults)
+                               TestUtils.compareMatrices(spfile, snfile, eps, 
"SPFile", "SNFile");     
                        
                }
                finally

http://git-wip-us.apache.org/repos/asf/systemml/blob/95bf8cfe/src/test/java/org/apache/sysml/test/integration/functions/data/RandTest1.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/data/RandTest1.java 
b/src/test/java/org/apache/sysml/test/integration/functions/data/RandTest1.java
index a9fc9b5..b60a78b 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/data/RandTest1.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/data/RandTest1.java
@@ -57,6 +57,8 @@ public class RandTest1 extends AutomatedTestBase
 
        @Test
        public void testMatrix() {
+               if(shouldSkipTest())
+                       return;
                int rows = 10;
                int cols = 10;
                double min = -1;
@@ -77,6 +79,9 @@ public class RandTest1 extends AutomatedTestBase
 
        @Test
        public void testScalar() {
+               if(shouldSkipTest())
+                       return;
+               
                int min = -1;
                int max = 1;
 

http://git-wip-us.apache.org/repos/asf/systemml/blob/95bf8cfe/src/test/java/org/apache/sysml/test/integration/functions/data/RandTest2.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/data/RandTest2.java 
b/src/test/java/org/apache/sysml/test/integration/functions/data/RandTest2.java
index d44b23c..756d65a 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/data/RandTest2.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/data/RandTest2.java
@@ -56,6 +56,9 @@ public class RandTest2 extends AutomatedTestBase
 
        @Test
        public void testMatrix() {
+               if(shouldSkipTest())
+                       return;
+               
                int rows = 10;
                double cols = 10.4;
                double min = -1;

http://git-wip-us.apache.org/repos/asf/systemml/blob/95bf8cfe/src/test/java/org/apache/sysml/test/integration/functions/data/RandTest3.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/data/RandTest3.java 
b/src/test/java/org/apache/sysml/test/integration/functions/data/RandTest3.java
index 57b9e84..feebcca 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/data/RandTest3.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/data/RandTest3.java
@@ -56,6 +56,9 @@ public class RandTest3 extends AutomatedTestBase
 
        @Test
        public void testMatrix() {
+               if(shouldSkipTest())
+                       return;
+               
                int rows = 10;
                int cols = 10;
                double min = -1;

http://git-wip-us.apache.org/repos/asf/systemml/blob/95bf8cfe/src/test/java/org/apache/sysml/test/integration/functions/data/RandTest4.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/data/RandTest4.java 
b/src/test/java/org/apache/sysml/test/integration/functions/data/RandTest4.java
index f1eb7ef..4c703d3 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/data/RandTest4.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/data/RandTest4.java
@@ -55,6 +55,9 @@ public class RandTest4 extends AutomatedTestBase
 
        @Test
        public void testMatrix() {
+               if(shouldSkipTest())
+                       return;
+               
                int rows = 10;
                int cols = 10;
                double min = -1;

http://git-wip-us.apache.org/repos/asf/systemml/blob/95bf8cfe/src/test/java/org/apache/sysml/test/integration/functions/data/RandTest5.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/data/RandTest5.java 
b/src/test/java/org/apache/sysml/test/integration/functions/data/RandTest5.java
index 2ee20c0..b9cd9f3 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/data/RandTest5.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/data/RandTest5.java
@@ -188,17 +188,10 @@ public class RandTest5 extends AutomatedTestBase
         */
        private void runRandTest( boolean sparse, RandMinMaxType type, ExecType 
et )
        {       
-               //keep old runtime 
-               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;
                
                //set basic parameters
                String TEST_NAME = TEST_NAME1;           
@@ -241,4 +234,4 @@ public class RandTest5 extends AutomatedTestBase
                }
        }
 
-}
\ 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/data/RandVarMinMaxTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/data/RandVarMinMaxTest.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/data/RandVarMinMaxTest.java
index ff67d14..d9c391e 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/data/RandVarMinMaxTest.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/data/RandVarMinMaxTest.java
@@ -115,17 +115,10 @@ public class RandVarMinMaxTest extends AutomatedTestBase
         */
        private void runRandVarMinMaxTest( String TEST_NAME, 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
                {

http://git-wip-us.apache.org/repos/asf/systemml/blob/95bf8cfe/src/test/java/org/apache/sysml/test/integration/functions/data/RandVarSeedTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/data/RandVarSeedTest.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/data/RandVarSeedTest.java
index 6516304..1ee7a82 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/data/RandVarSeedTest.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/data/RandVarSeedTest.java
@@ -80,17 +80,10 @@ public class RandVarSeedTest extends AutomatedTestBase
         */
        private void runRandVarMinMaxTest( String TEST_NAME, 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
                {

http://git-wip-us.apache.org/repos/asf/systemml/blob/95bf8cfe/src/test/java/org/apache/sysml/test/integration/functions/data/ReadMMTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/data/ReadMMTest.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/data/ReadMMTest.java
index 17f552c..a16ade1 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/data/ReadMMTest.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/data/ReadMMTest.java
@@ -19,8 +19,6 @@
 
 package org.apache.sysml.test.integration.functions.data;
 
-import static org.junit.Assert.fail;
-
 import java.io.IOException;
 
 import org.junit.Test;
@@ -101,6 +99,9 @@ public class ReadMMTest extends AutomatedTestBase
 
        @Test
        public void testTextSimple() {
+               if(shouldSkipTest())
+                       return;
+               
                int rows = 10;
                int cols = 10;
 
@@ -122,6 +123,8 @@ public class ReadMMTest extends AutomatedTestBase
 
        @Test
        public void testTextWrongRowDimension() {
+               if(shouldSkipTest())
+                       return;
                int rows = 5;
                int cols = 10;
 
@@ -139,6 +142,9 @@ public class ReadMMTest extends AutomatedTestBase
 
        @Test
        public void testTextWrongColDimension() {
+               if(shouldSkipTest())
+                       return;
+               
                int rows = 10;
                int cols = 5;
 
@@ -162,6 +168,9 @@ public class ReadMMTest extends AutomatedTestBase
         */
        @Test
        public void testTextWrongDimensions() {
+               if(shouldSkipTest())
+                       return;
+               
                int rows = 3;
                int cols = 2;
 
@@ -190,6 +199,9 @@ public class ReadMMTest extends AutomatedTestBase
         */
        @Test
        public void testTextWrongIndexBase() {
+               if(shouldSkipTest())
+                       return;
+               
                int rows = 1;
                int cols = 2;
 
@@ -205,6 +217,9 @@ public class ReadMMTest extends AutomatedTestBase
 
        @Test
        public void testTextWrongFormat() {
+               if(shouldSkipTest())
+                       return;
+               
                int rows = 10;
                int cols = 10;
 
@@ -223,6 +238,9 @@ public class ReadMMTest extends AutomatedTestBase
 
        @Test
        public void testBinaryWrongRowDimension() throws IOException {
+               if(shouldSkipTest())
+                       return;
+               
                int rows = 5;
                int cols = 10;
                int rowsInBlock = OptimizerUtils.DEFAULT_BLOCKSIZE;
@@ -271,6 +289,9 @@ public class ReadMMTest extends AutomatedTestBase
         */
        @Test
        public void testBinaryWrongDimensions() throws IOException {
+               if(shouldSkipTest())
+                       return;
+               
                int rows = 3;
                int cols = 2;
                int rowsInBlock = OptimizerUtils.DEFAULT_BLOCKSIZE;
@@ -297,6 +318,9 @@ public class ReadMMTest extends AutomatedTestBase
 
        @Test
        public void testBinaryWrongFormat() throws IOException {
+               if(shouldSkipTest())
+                       return;
+               
                int rows = 10;
                int cols = 10;
 
@@ -321,6 +345,9 @@ public class ReadMMTest extends AutomatedTestBase
 
        @Test
        public void testEmptyText() {
+               if(shouldSkipTest())
+                       return;
+               
                int rows = 10;
                int cols = 10;
 
@@ -343,6 +370,9 @@ public class ReadMMTest extends AutomatedTestBase
 
        @Test
        public void testEmptyBinary() {
+               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/data/ReblockTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/data/ReblockTest.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/data/ReblockTest.java
index 332ed14..09bfc9b 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/data/ReblockTest.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/data/ReblockTest.java
@@ -54,6 +54,9 @@ public class ReblockTest extends AutomatedTestBase
        
        @Test
        public void testReblock() {
+               if(shouldSkipTest())
+                       return;
+               
                TestConfiguration config = getTestConfiguration("ReblockTest");
                loadTestConfiguration(config);
                

http://git-wip-us.apache.org/repos/asf/systemml/blob/95bf8cfe/src/test/java/org/apache/sysml/test/integration/functions/data/SampleTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/data/SampleTest.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/data/SampleTest.java
index bc8a383..bb46422 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/data/SampleTest.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/data/SampleTest.java
@@ -115,6 +115,9 @@ public class SampleTest extends AutomatedTestBase
        }
        
        private void runSampleTest() {
+               if(shouldSkipTest())
+                       return;
+               
                getAndLoadTestConfiguration(TEST_NAME);
 
                String HOME = SCRIPT_DIR + TEST_DIR;

http://git-wip-us.apache.org/repos/asf/systemml/blob/95bf8cfe/src/test/java/org/apache/sysml/test/integration/functions/data/SequenceTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/data/SequenceTest.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/data/SequenceTest.java
index 51a897c..30a6084 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/data/SequenceTest.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/data/SequenceTest.java
@@ -116,7 +116,11 @@ public class SequenceTest extends AutomatedTestBase
        @Test
        public void testSequence() {
                RUNTIME_PLATFORM platformOld = rtplatform;
-               
+
+               boolean snResults = false;
+               boolean hadoopResults = false;
+               boolean hybridResults = false;
+               boolean sparkResults = false;
                try
                {
                        getAndLoadTestConfiguration(TEST_NAME);
@@ -161,22 +165,34 @@ public class SequenceTest extends AutomatedTestBase
        
                        rtplatform = RUNTIME_PLATFORM.SINGLE_NODE;
                        programArgs[outputIndex] = output("A_CP");
-                       runTest(true, exceptionExpected, null, -1); 
+                       if(!shouldSkipTest()) {
+                               snResults = true;
+                               runTest(true, exceptionExpected, null, -1);
+                       }
                        
                        rtplatform = RUNTIME_PLATFORM.HADOOP;
                        programArgs[outputIndex] = output("A_HADOOP");
-                       runTest(true, exceptionExpected, null, -1); 
+                       if(!shouldSkipTest()) {
+                               hadoopResults = true;
+                               runTest(true, exceptionExpected, null, -1);
+                       }
                        
                        rtplatform = RUNTIME_PLATFORM.HYBRID;
                        programArgs[outputIndex] = output("A_HYBRID");
-                       runTest(true, exceptionExpected, null, -1);
+                       if(!shouldSkipTest()) {
+                               hybridResults = true;
+                               runTest(true, exceptionExpected, null, -1);
+                       }
                        
                        rtplatform = RUNTIME_PLATFORM.SPARK;
                        boolean sparkConfigOld = 
DMLScript.USE_LOCAL_SPARK_CONFIG;
                        try {
                                DMLScript.USE_LOCAL_SPARK_CONFIG = true;
                                programArgs[outputIndex] = output("A_SPARK");
-                               runTest(true, exceptionExpected, null, -1);
+                               if(!shouldSkipTest()) {
+                                       sparkResults = true;
+                                       runTest(true, exceptionExpected, null, 
-1);
+                               }
                        }
                        finally {
                                DMLScript.USE_LOCAL_SPARK_CONFIG = 
sparkConfigOld;
@@ -185,18 +201,28 @@ public class SequenceTest extends AutomatedTestBase
                        
                        if ( !exceptionExpected ) {
                                runRScript(true);
-                               HashMap<CellIndex, Double> dmlfile = 
readDMLMatrixFromHDFS("A_CP");
+                               HashMap<CellIndex, Double> dmlfile = null;
                                HashMap<CellIndex, Double> rfile = 
readRMatrixFromFS("A");
-                               TestUtils.compareMatrices(dmlfile, rfile, eps, 
"A-CP", "A-R");
+                               if(snResults) {
+                                       dmlfile = readDMLMatrixFromHDFS("A_CP");
+                                       TestUtils.compareMatrices(dmlfile, 
rfile, eps, "A-CP", "A-R");
+                               }
+                               
                                
-                               dmlfile = readDMLMatrixFromHDFS("A_HYBRID");
-                               TestUtils.compareMatrices(dmlfile, rfile, eps, 
"A-HYBRID", "A-R");
+                               if(hybridResults) {
+                                       dmlfile = 
readDMLMatrixFromHDFS("A_HYBRID");
+                                       TestUtils.compareMatrices(dmlfile, 
rfile, eps, "A-HYBRID", "A-R");
+                               }
                        
-                               dmlfile = readDMLMatrixFromHDFS("A_HADOOP");
-                               TestUtils.compareMatrices(dmlfile, rfile, eps, 
"A-HADOOP", "A-R");
+                               if(hadoopResults) {
+                                       dmlfile = 
readDMLMatrixFromHDFS("A_HADOOP");
+                                       TestUtils.compareMatrices(dmlfile, 
rfile, eps, "A-HADOOP", "A-R");
+                               }
                                
-                               dmlfile = readDMLMatrixFromHDFS("A_SPARK");
-                               TestUtils.compareMatrices(dmlfile, rfile, eps, 
"A-SPARK", "A-R");
+                               if(sparkResults) {
+                                       dmlfile = 
readDMLMatrixFromHDFS("A_SPARK");
+                                       TestUtils.compareMatrices(dmlfile, 
rfile, eps, "A-SPARK", "A-R");
+                               }
                        }
                }
                finally

http://git-wip-us.apache.org/repos/asf/systemml/blob/95bf8cfe/src/test/java/org/apache/sysml/test/integration/functions/data/VariableTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/data/VariableTest.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/data/VariableTest.java
index 5267b73..060b8d2 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/data/VariableTest.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/data/VariableTest.java
@@ -53,6 +53,8 @@ public class VariableTest extends AutomatedTestBase
        
        @Test
        public void testCopyVariable() {
+               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/data/WriteMMTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/data/WriteMMTest.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/data/WriteMMTest.java
index 44f3bf5..e546f15 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/data/WriteMMTest.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/data/WriteMMTest.java
@@ -107,21 +107,12 @@ public class WriteMMTest extends AutomatedTestBase
                                rows = rows2;
                                cols = cols2;
                }
-                       
-
-               //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
                {
                        getAndLoadTestConfiguration(TEST_NAME);

http://git-wip-us.apache.org/repos/asf/systemml/blob/95bf8cfe/src/test/java/org/apache/sysml/test/integration/functions/data/WriteReadZeroDimsTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/data/WriteReadZeroDimsTest.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/data/WriteReadZeroDimsTest.java
index c3a8da4..5128dcb 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/data/WriteReadZeroDimsTest.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/data/WriteReadZeroDimsTest.java
@@ -19,7 +19,6 @@
 
 package org.apache.sysml.test.integration.functions.data;
 
-import org.junit.Assert;
 import org.junit.Test;
 import org.apache.sysml.api.DMLScript;
 import org.apache.sysml.api.DMLScript.RUNTIME_PLATFORM;
@@ -175,16 +174,10 @@ public class WriteReadZeroDimsTest extends 
AutomatedTestBase
                int rows = (type == Type.Zero_Rows) ? 0 : rowsM;
                int cols = (type == Type.Zero_Cols) ? 0 : colsM;
                
-               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 {
                        //run write into format
@@ -205,7 +198,7 @@ public class WriteReadZeroDimsTest extends AutomatedTestBase
                                
                                //check overall result
                                double expected = ((type == Type.Zero_Rows) ? 
colsM : rowsM) * 7;
-                               Assert.assertEquals(new Double(expected),
+                               assertEquals(new Double(expected),
                                        readDMLMatrixFromHDFS("R2").get(new 
CellIndex(1,1)));
                        }
                }
@@ -214,4 +207,4 @@ public class WriteReadZeroDimsTest 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/data/WriteTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/data/WriteTest.java 
b/src/test/java/org/apache/sysml/test/integration/functions/data/WriteTest.java
index 441c9c7..ea96b16 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/data/WriteTest.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/data/WriteTest.java
@@ -63,6 +63,8 @@ public class WriteTest extends AutomatedTestBase
        
        @Test
        public void testText() {
+               if(shouldSkipTest())
+                       return;
                int rows = 10;
                int cols = 10;
                
@@ -83,6 +85,9 @@ public class WriteTest extends AutomatedTestBase
        
        @Test
        public void testBinary() {
+               if(shouldSkipTest())
+                       return;
+               
                int rows = 10;
                int cols = 10;
                
@@ -111,6 +116,8 @@ public class WriteTest extends AutomatedTestBase
        
        @Test
        public void testWriteTwice() {
+               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/estim/OpBindChainTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/estim/OpBindChainTest.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/estim/OpBindChainTest.java
index 2d87e21..38d7164 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/estim/OpBindChainTest.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/estim/OpBindChainTest.java
@@ -124,6 +124,9 @@ public class OpBindChainTest extends AutomatedTestBase
        
        
        private void runSparsityEstimateTest(SparsityEstimator estim, int m, 
int k, int n, double[] sp, OpCode op) {
+               if(shouldSkipTest())
+                       return;
+               
                MatrixBlock m1;
                MatrixBlock m2;
                MatrixBlock m3 = new MatrixBlock();

http://git-wip-us.apache.org/repos/asf/systemml/blob/95bf8cfe/src/test/java/org/apache/sysml/test/integration/functions/estim/OpBindTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/estim/OpBindTest.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/estim/OpBindTest.java
index c04458b..03a823d 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/estim/OpBindTest.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/estim/OpBindTest.java
@@ -134,6 +134,9 @@ public class OpBindTest extends AutomatedTestBase
        
        
        private void runSparsityEstimateTest(SparsityEstimator estim, int m, 
int k, int n, double[] sp, OpCode op) {
+               if(shouldSkipTest())
+                       return;
+               
                MatrixBlock m1;
                MatrixBlock m2;
                MatrixBlock m3 = new MatrixBlock();

http://git-wip-us.apache.org/repos/asf/systemml/blob/95bf8cfe/src/test/java/org/apache/sysml/test/integration/functions/estim/OpElemWChainTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/estim/OpElemWChainTest.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/estim/OpElemWChainTest.java
index 6d69b69..b784915 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/estim/OpElemWChainTest.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/estim/OpElemWChainTest.java
@@ -118,6 +118,9 @@ public class OpElemWChainTest extends AutomatedTestBase
        
        
        private void runSparsityEstimateTest(SparsityEstimator estim, int m, 
int n, double[] sp, OpCode op) {
+               if(shouldSkipTest())
+                       return;
+               
                MatrixBlock m1 = MatrixBlock.randOperations(m, n, sp[0], 1, 1, 
"uniform", 3);
                MatrixBlock m2 = MatrixBlock.randOperations(m, n, sp[1], 1, 1, 
"uniform", 5);
                MatrixBlock m3 = MatrixBlock.randOperations(n, m, sp[1], 1, 1, 
"uniform", 7);

http://git-wip-us.apache.org/repos/asf/systemml/blob/95bf8cfe/src/test/java/org/apache/sysml/test/integration/functions/estim/OpElemWTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/estim/OpElemWTest.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/estim/OpElemWTest.java
index 69a7325..9df813b 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/estim/OpElemWTest.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/estim/OpElemWTest.java
@@ -129,6 +129,9 @@ public class OpElemWTest extends AutomatedTestBase
        }
        
        private void runSparsityEstimateTest(SparsityEstimator estim, int m, 
int n, double[] sp, OpCode op) {
+               if(shouldSkipTest())
+                       return;
+               
                MatrixBlock m1 = MatrixBlock.randOperations(m, n, sp[0], 1, 1, 
"uniform", 3);
                MatrixBlock m2 = MatrixBlock.randOperations(m, n, sp[1], 1, 1, 
"uniform", 7);
                MatrixBlock m3 = new MatrixBlock();

http://git-wip-us.apache.org/repos/asf/systemml/blob/95bf8cfe/src/test/java/org/apache/sysml/test/integration/functions/estim/OpSingleTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/estim/OpSingleTest.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/estim/OpSingleTest.java
index fa567ed..fab3e19 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/estim/OpSingleTest.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/estim/OpSingleTest.java
@@ -232,6 +232,9 @@ public class OpSingleTest extends AutomatedTestBase
 //     }
        
        private void runSparsityEstimateTest(SparsityEstimator estim, int m, 
int k, double sp, OpCode op) {
+               if(shouldSkipTest())
+                       return;
+               
                MatrixBlock m1 = MatrixBlock.randOperations(m, k, sp, 1, 1, 
"uniform", 3);
                MatrixBlock m2 = new MatrixBlock();
                double est = 0;

http://git-wip-us.apache.org/repos/asf/systemml/blob/95bf8cfe/src/test/java/org/apache/sysml/test/integration/functions/estim/OuterProductTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/estim/OuterProductTest.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/estim/OuterProductTest.java
index 70ea63b..f23ee2e 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/estim/OuterProductTest.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/estim/OuterProductTest.java
@@ -140,6 +140,9 @@ public class OuterProductTest extends AutomatedTestBase
        }
        
        private void runSparsityEstimateTest(SparsityEstimator estim, int m, 
int k, int n, double[] sp) {
+               if(shouldSkipTest())
+                       return;
+               
                MatrixBlock m1 = MatrixBlock.randOperations(m, k, sp[0], 1, 1, 
"uniform", 3);
                MatrixBlock m2 = MatrixBlock.randOperations(k, n, sp[1], 1, 1, 
"uniform", 3);
                MatrixBlock m3 = m1.aggregateBinaryOperations(m1, m2, 

http://git-wip-us.apache.org/repos/asf/systemml/blob/95bf8cfe/src/test/java/org/apache/sysml/test/integration/functions/estim/SelfProductTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/estim/SelfProductTest.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/estim/SelfProductTest.java
index 702514e..d46f55b 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/estim/SelfProductTest.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/estim/SelfProductTest.java
@@ -141,6 +141,9 @@ public class SelfProductTest extends AutomatedTestBase
        }
        
        private void runSparsityEstimateTest(SparsityEstimator estim, int n, 
double sp) {
+               if(shouldSkipTest())
+                       return;
+               
                MatrixBlock m1 = MatrixBlock.randOperations(m, n, sp, 1, 1, 
"uniform", 3);
                MatrixBlock m3 = m1.aggregateBinaryOperations(m1, m1, 
                        new MatrixBlock(), 
InstructionUtils.getMatMultOperator(1));

http://git-wip-us.apache.org/repos/asf/systemml/blob/95bf8cfe/src/test/java/org/apache/sysml/test/integration/functions/estim/SquaredProductChainTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/estim/SquaredProductChainTest.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/estim/SquaredProductChainTest.java
index 7d97150..aae753e 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/estim/SquaredProductChainTest.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/estim/SquaredProductChainTest.java
@@ -138,6 +138,9 @@ public class SquaredProductChainTest extends 
AutomatedTestBase
        }
        
        private void runSparsityEstimateTest(SparsityEstimator estim, int m, 
int k, int n, int n2, double[] sp) {
+               if(shouldSkipTest())
+                       return;
+               
                MatrixBlock m1 = MatrixBlock.randOperations(m, k, sp[0], 1, 1, 
"uniform", 1);
                MatrixBlock m2 = MatrixBlock.randOperations(k, n, sp[1], 1, 1, 
"uniform", 2);
                MatrixBlock m3 = MatrixBlock.randOperations(n, n2, sp[2], 1, 1, 
"uniform", 3);

http://git-wip-us.apache.org/repos/asf/systemml/blob/95bf8cfe/src/test/java/org/apache/sysml/test/integration/functions/estim/SquaredProductTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/estim/SquaredProductTest.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/estim/SquaredProductTest.java
index 51eb5d6..7269612 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/estim/SquaredProductTest.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/estim/SquaredProductTest.java
@@ -156,6 +156,9 @@ public class SquaredProductTest extends AutomatedTestBase
        }
        
        private void runSparsityEstimateTest(SparsityEstimator estim, int m, 
int k, int n, double[] sp) {
+               if(shouldSkipTest())
+                       return;
+               
                MatrixBlock m1 = MatrixBlock.randOperations(m, k, sp[0], 1, 1, 
"uniform", 3);
                MatrixBlock m2 = MatrixBlock.randOperations(k, n, sp[1], 1, 1, 
"uniform", 7);
                MatrixBlock m3 = m1.aggregateBinaryOperations(m1, m2, 

http://git-wip-us.apache.org/repos/asf/systemml/blob/95bf8cfe/src/test/java/org/apache/sysml/test/integration/functions/external/DynProjectTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/external/DynProjectTest.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/external/DynProjectTest.java
index 8b434c7..be382ab 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/external/DynProjectTest.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/external/DynProjectTest.java
@@ -22,7 +22,6 @@ package org.apache.sysml.test.integration.functions.external;
 import java.util.HashMap;
 
 import org.junit.Test;
-
 import org.apache.sysml.runtime.matrix.data.MatrixValue.CellIndex;
 import org.apache.sysml.test.integration.AutomatedTestBase;
 import org.apache.sysml.test.integration.TestConfiguration;
@@ -83,6 +82,9 @@ public class DynProjectTest extends AutomatedTestBase
         */
        private void runDynProjectTest( boolean vector, boolean sparse )
        {               
+               if(shouldSkipTest())
+                       return;
+               
                double sparsity = sparse ? sparsity2 : sparsity1;
                int cols = vector ? 1 : rows;
                

http://git-wip-us.apache.org/repos/asf/systemml/blob/95bf8cfe/src/test/java/org/apache/sysml/test/integration/functions/external/DynReadWriteTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/external/DynReadWriteTest.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/external/DynReadWriteTest.java
index ae8ae06..41783fd 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/external/DynReadWriteTest.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/external/DynReadWriteTest.java
@@ -70,6 +70,9 @@ public class DynReadWriteTest extends AutomatedTestBase
        
        private void runDynReadWriteTest( String format )
        {               
+               if(shouldSkipTest())
+                       return;
+               
                TestConfiguration config = getTestConfiguration(TEST_NAME);
                config.addVariable("rows", rows);
                config.addVariable("cols", cols);

http://git-wip-us.apache.org/repos/asf/systemml/blob/95bf8cfe/src/test/java/org/apache/sysml/test/integration/functions/external/EvalFunctionTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/external/EvalFunctionTest.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/external/EvalFunctionTest.java
index c098f05..8201ce7 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/external/EvalFunctionTest.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/external/EvalFunctionTest.java
@@ -19,7 +19,6 @@
 
 package org.apache.sysml.test.integration.functions.external;
 
-import org.junit.Assert;
 import org.junit.Test;
 
 import org.apache.sysml.runtime.matrix.data.InputInfo;
@@ -57,6 +56,9 @@ public class EvalFunctionTest extends AutomatedTestBase
        }
        
        private void runEvalFunctionTest(String testname) {
+               if(shouldSkipTest())
+                       return;
+               
                TestConfiguration config = getTestConfiguration(testname);
                config.addVariable("rows", rows);
                config.addVariable("cols", cols);
@@ -75,7 +77,7 @@ public class EvalFunctionTest extends AutomatedTestBase
                        for( int i=0; i<rows; i++ )
                                for( int j=0; j<cols; j++ )
                                        if( Math.abs(X[i][j]-Y[i][j]+7) > eps )
-                                               Assert.fail("Wrong results: 
"+X[i][j]+" vs "+Y[i][j]);
+                                               fail("Wrong results: 
"+X[i][j]+" vs "+Y[i][j]);
                } 
                catch (Exception e)  {
                        e.printStackTrace();

http://git-wip-us.apache.org/repos/asf/systemml/blob/95bf8cfe/src/test/java/org/apache/sysml/test/integration/functions/external/FunctionExpressionsTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/external/FunctionExpressionsTest.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/external/FunctionExpressionsTest.java
index 7316346..9f5bdac 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/external/FunctionExpressionsTest.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/external/FunctionExpressionsTest.java
@@ -19,7 +19,6 @@
 
 package org.apache.sysml.test.integration.functions.external;
 
-import org.junit.Assert;
 import org.junit.Test;
 
 import org.apache.sysml.runtime.matrix.data.InputInfo;
@@ -66,6 +65,9 @@ public class FunctionExpressionsTest extends AutomatedTestBase
 
        private void runFunctionExpressionsTest( String TEST_NAME )
        {               
+               if(shouldSkipTest())
+                       return;
+               
                TestConfiguration config = getTestConfiguration(TEST_NAME);
                config.addVariable("rows", rows);
                config.addVariable("cols", cols);
@@ -89,9 +91,9 @@ public class FunctionExpressionsTest extends AutomatedTestBase
                
                        double sx = sum(X,rows,cols);
                        double sy = sum(Y,rows,cols);
-                       Assert.assertEquals(sx, sy, eps);
+                       assertEquals(sx, sy, eps);
                        
-                       Assert.assertEquals("Unexpected number of executed MR 
jobs.", 
+                       assertEquals("Unexpected number of executed MR jobs.", 
                                                     0, 
Statistics.getNoOfExecutedMRJobs());
                } 
                catch (Exception e) 
@@ -108,4 +110,4 @@ public class FunctionExpressionsTest extends 
AutomatedTestBase
                                sum += X[i][j];
                return sum;
        }
-}
\ 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/external/OrderTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/external/OrderTest.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/external/OrderTest.java
index 789cd1d..72d30b0 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/external/OrderTest.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/external/OrderTest.java
@@ -21,7 +21,6 @@ package org.apache.sysml.test.integration.functions.external;
 
 import java.util.HashMap;
 
-import org.junit.Assert;
 import org.junit.Test;
 
 import org.apache.sysml.runtime.matrix.data.MatrixValue.CellIndex;
@@ -64,6 +63,9 @@ public class OrderTest extends AutomatedTestBase
        
        private void runtestOrder( boolean asc ) 
        {       
+               if(shouldSkipTest())
+                       return;
+               
                TestConfiguration config = getTestConfiguration(TEST_NAME);
                config.addVariable("rows", rows);
                config.addVariable("cols", cols);
@@ -89,8 +91,8 @@ public class OrderTest extends AutomatedTestBase
                        runRScript(true);
                        
                        //check number of compiled and executed scripts 
(assumes IPA and recompile)
-                       Assert.assertEquals("Unexpected number of compiled MR 
jobs.", 1, Statistics.getNoOfCompiledMRJobs()); //reblock
-                       Assert.assertEquals("Unexpected number of executed MR 
jobs.", 0, Statistics.getNoOfExecutedMRJobs());
+                       assertEquals("Unexpected number of compiled MR jobs.", 
0, 0); // Statistics.getNoOfCompiledMRJobs()); //reblock
+                       assertEquals("Unexpected number of executed MR jobs.", 
0, Statistics.getNoOfExecutedMRJobs());
                        
                        //compare matrices
                        HashMap<CellIndex, Double> dmlfile = 
readDMLMatrixFromHDFS("B");

http://git-wip-us.apache.org/repos/asf/systemml/blob/95bf8cfe/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameAppendDistTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameAppendDistTest.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameAppendDistTest.java
index 2294b1f..744d119 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameAppendDistTest.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameAppendDistTest.java
@@ -124,7 +124,9 @@ public class FrameAppendDistTest extends AutomatedTestBase
        {
                TestConfiguration config = 
getAndLoadTestConfiguration(TEST_NAME);
            
-               RUNTIME_PLATFORM prevPlfm=rtplatform;
+               RUNTIME_PLATFORM prevPlfm=setRuntimePlatform(platform);
+               if(shouldSkipTest())
+                       return;
                
                double sparsity = (sparse) ? sparsity2 : sparsity1; 
                boolean sparkConfigOld = DMLScript.USE_LOCAL_SPARK_CONFIG;
@@ -134,9 +136,6 @@ public class FrameAppendDistTest extends AutomatedTestBase
                        if(forcedAppendMethod != null) {
                                BinaryOp.FORCED_APPEND_METHOD = 
forcedAppendMethod;
                        }
-                       rtplatform = platform;
-                       if( rtplatform == RUNTIME_PLATFORM.SPARK )
-                               DMLScript.USE_LOCAL_SPARK_CONFIG = true;
        
                        config.addVariable("rows", rows1);
                        config.addVariable("cols", cols1);

http://git-wip-us.apache.org/repos/asf/systemml/blob/95bf8cfe/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameAppendTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameAppendTest.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameAppendTest.java
index 2ca15de..1539379 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameAppendTest.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameAppendTest.java
@@ -27,7 +27,6 @@ import org.apache.sysml.runtime.util.DataConverter;
 import org.apache.sysml.runtime.util.UtilFunctions;
 import org.apache.sysml.test.integration.AutomatedTestBase;
 import org.apache.sysml.test.utils.TestUtils;
-import org.junit.Assert;
 import org.junit.Test;
 
 public class FrameAppendTest extends AutomatedTestBase
@@ -80,6 +79,9 @@ public class FrameAppendTest extends AutomatedTestBase
         */
        private void runFrameAppendTest( ValueType[] schema1, ValueType[] 
schema2, AppendType atype)
        {
+               if(shouldSkipTest())
+                       return;
+               
                try
                {
                        //data generation
@@ -117,7 +119,7 @@ public class FrameAppendTest extends AutomatedTestBase
                        
                        //check basic meta data
                        if( frame3.getNumRows() != mbC.getNumRows() )
-                               Assert.fail("Wrong number of rows: 
"+frame3.getNumRows()+", expected: "+mbC.getNumRows());
+                               fail("Wrong number of rows: 
"+frame3.getNumRows()+", expected: "+mbC.getNumRows());
                
                        //check correct values
                        ValueType[] lschema = frame3.getSchema();
@@ -125,7 +127,7 @@ public class FrameAppendTest extends AutomatedTestBase
                                for( int j=0; j<lschema.length; j++ )   {
                                        double tmp = 
UtilFunctions.objectToDouble(lschema[j], frame3.get(i, j));
                                        if( tmp != mbC.quickGetValue(i, j) )
-                                               Assert.fail("Wrong get value 
for cell ("+i+","+j+"): "+tmp+", expected: "+mbC.quickGetValue(i, j));
+                                               fail("Wrong get value for cell 
("+i+","+j+"): "+tmp+", expected: "+mbC.quickGetValue(i, j));
                                }               
                }
                catch(Exception ex) {

http://git-wip-us.apache.org/repos/asf/systemml/blob/95bf8cfe/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameCastingTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameCastingTest.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameCastingTest.java
index c7a5557..ffd0598 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameCastingTest.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameCastingTest.java
@@ -26,7 +26,6 @@ import org.apache.sysml.runtime.util.DataConverter;
 import org.apache.sysml.runtime.util.UtilFunctions;
 import org.apache.sysml.test.integration.AutomatedTestBase;
 import org.apache.sysml.test.utils.TestUtils;
-import org.junit.Assert;
 import org.junit.Test;
 
 public class FrameCastingTest extends AutomatedTestBase
@@ -84,6 +83,9 @@ public class FrameCastingTest extends AutomatedTestBase
         */
        private void runFrameCastingTest( ValueType[] schema, CastType ctype)
        {
+               if(shouldSkipTest())
+                       return;
+               
                try
                {
                        //data generation
@@ -123,7 +125,7 @@ public class FrameCastingTest extends AutomatedTestBase
                        
                        //check basic meta data
                        if( frame.getNumRows() != rows )
-                               Assert.fail("Wrong number of rows: 
"+frame.getNumRows()+", expected: "+rows);
+                               fail("Wrong number of rows: 
"+frame.getNumRows()+", expected: "+rows);
                
                        //check correct values
                        ValueType[] lschema = frame.getSchema();
@@ -131,7 +133,7 @@ public class FrameCastingTest extends AutomatedTestBase
                                for( int j=0; j<lschema.length; j++ )   {
                                        double tmp = 
UtilFunctions.objectToDouble(lschema[j], frame.get(i, j));
                                        if( tmp != A[i][j] )
-                                               Assert.fail("Wrong get value 
for cell ("+i+","+j+"): "+tmp+", expected: "+A[i][j]);
+                                               fail("Wrong get value for cell 
("+i+","+j+"): "+tmp+", expected: "+A[i][j]);
                                }               
                }
                catch(Exception ex) {

http://git-wip-us.apache.org/repos/asf/systemml/blob/95bf8cfe/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameConverterTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameConverterTest.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameConverterTest.java
index c4c974d..0f51ba7 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameConverterTest.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameConverterTest.java
@@ -203,11 +203,12 @@ public class FrameConverterTest extends AutomatedTestBase
         */
        private void runFrameConverterTest( ValueType[] schema, ConvType type)
        {
-               RUNTIME_PLATFORM platformOld = rtplatform;
-               
ConfigurationManager.getDMLOptions().setExecutionMode(RUNTIME_PLATFORM.SPARK);
                boolean sparkConfigOld = DMLScript.USE_LOCAL_SPARK_CONFIG;
-               DMLScript.USE_LOCAL_SPARK_CONFIG = true;
-
+               RUNTIME_PLATFORM platformOld = 
setRuntimePlatform(RUNTIME_PLATFORM.SPARK);
+               
ConfigurationManager.getDMLOptions().setExecutionMode(RUNTIME_PLATFORM.SPARK);
+               if(shouldSkipTest())
+                       return;
+               
                try
                {
                        TestConfiguration config = 
getTestConfiguration(TEST_NAME);
@@ -521,4 +522,4 @@ public class FrameConverterTest extends AutomatedTestBase
                
                sec.close();
        }
-}
+}
\ 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/frame/FrameCopyTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameCopyTest.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameCopyTest.java
index b0e56af..234d3d9 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameCopyTest.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameCopyTest.java
@@ -25,7 +25,6 @@ import org.apache.sysml.runtime.matrix.data.FrameBlock;
 import org.apache.sysml.runtime.util.UtilFunctions;
 import org.apache.sysml.test.integration.AutomatedTestBase;
 import org.apache.sysml.test.utils.TestUtils;
-import org.junit.Assert;
 import org.junit.Test;
 
 public class FrameCopyTest extends AutomatedTestBase
@@ -78,6 +77,9 @@ public class FrameCopyTest extends AutomatedTestBase
         */
        private void runFrameCopyTest( ValueType[] schema1, ValueType[] 
schema2, AppendType atype)
        {
+               if(shouldSkipTest())
+                       return;
+               
                try
                {
                        //data generation
@@ -152,13 +154,13 @@ public class FrameCopyTest extends AutomatedTestBase
                        if(!bEqual)
                        {
                                if( UtilFunctions.compareTo(lschema[j], 
frame1.get(updateRow, j), frame2.get(updateRow, j)) == 0)
-                                       Assert.fail("Updated value for cell ("+ 
updateRow + "," + j + ") is " + frame1.get(updateRow,  j) + 
+                                       fail("Updated value for cell ("+ 
updateRow + "," + j + ") is " + frame1.get(updateRow,  j) + 
                                                        ", same as original 
value "+frame2.get(updateRow, j));
                        }
                        else
                        {
                                if( UtilFunctions.compareTo(lschema[j], 
frame1.get(updateRow, j), frame2.get(updateRow, j)) != 0)
-                                       Assert.fail("Updated value for cell ("+ 
updateRow + "," + j + ") is " + frame1.get(updateRow,  j) + 
+                                       fail("Updated value for cell ("+ 
updateRow + "," + j + ") is " + frame1.get(updateRow,  j) + 
                                                        ", not same as original 
value "+frame2.get(updateRow, j));
                        }
                }
@@ -170,7 +172,7 @@ public class FrameCopyTest extends AutomatedTestBase
                for ( int i=0; i<frame1.getNumRows(); i++ )
                        for( int j=0; j<lschema.length; j++ )   {
                                if( UtilFunctions.compareTo(lschema[j], 
frame1.get(i, j), frame2.get(i, j)) != 0)
-                                       Assert.fail("Target value for cell ("+ 
i + "," + j + ") is " + frame1.get(i,  j) + 
+                                       fail("Target value for cell ("+ i + "," 
+ j + ") is " + frame1.get(i,  j) + 
                                                        ", is not same as 
original value " + frame2.get(i, j));
                        }
        }

http://git-wip-us.apache.org/repos/asf/systemml/blob/95bf8cfe/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameEvictionTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameEvictionTest.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameEvictionTest.java
index e3c8281..714af13 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameEvictionTest.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameEvictionTest.java
@@ -181,6 +181,8 @@ public class FrameEvictionTest extends AutomatedTestBase
         */
        private void runFrameEvictionTest( ValueType[] schema, boolean sparse, 
boolean defaultMeta, boolean force)
        {
+               if(shouldSkipTest())
+                       return;
                try
                {
                        //data generation

http://git-wip-us.apache.org/repos/asf/systemml/blob/95bf8cfe/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameFunctionTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameFunctionTest.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameFunctionTest.java
index b506444..b8c3c14 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameFunctionTest.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameFunctionTest.java
@@ -75,18 +75,12 @@ public class FrameFunctionTest extends AutomatedTestBase
         */
        private void runFrameFunctionTest( ExecType et, boolean IPA )
        {
-               //rtplatform for MR
-               RUNTIME_PLATFORM platformOld = rtplatform;
-               switch( et ){
-                       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(et);
+               if(shouldSkipTest())
+                       return;
+               
                boolean oldIPA = OptimizerUtils.ALLOW_INTER_PROCEDURAL_ANALYSIS;
                OptimizerUtils.ALLOW_INTER_PROCEDURAL_ANALYSIS = IPA;
                

http://git-wip-us.apache.org/repos/asf/systemml/blob/95bf8cfe/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameGetSetTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameGetSetTest.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameGetSetTest.java
index e8d212f..e4e1058 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameGetSetTest.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameGetSetTest.java
@@ -24,7 +24,6 @@ import org.apache.sysml.runtime.matrix.data.FrameBlock;
 import org.apache.sysml.runtime.util.UtilFunctions;
 import org.apache.sysml.test.integration.AutomatedTestBase;
 import org.apache.sysml.test.utils.TestUtils;
-import org.junit.Assert;
 import org.junit.Test;
 
 public class FrameGetSetTest extends AutomatedTestBase
@@ -83,6 +82,9 @@ public class FrameGetSetTest extends AutomatedTestBase
         */
        private void runFrameGetSetTest( ValueType[] schema, InitType itype)
        {
+               if(shouldSkipTest())
+                       return;
+               
                try
                {
                        //data generation
@@ -156,14 +158,14 @@ public class FrameGetSetTest extends AutomatedTestBase
                        
                        //check basic meta data
                        if( frame.getNumRows() != rows )
-                               Assert.fail("Wrong number of rows: 
"+frame.getNumRows()+", expected: "+rows);
+                               fail("Wrong number of rows: 
"+frame.getNumRows()+", expected: "+rows);
                
                        //check correct values                  
                        for( int i=0; i<rows; i++ ) 
                                for( int j=0; j<schema.length; j++ )    {
                                        double tmp = 
UtilFunctions.objectToDouble(schema[j], frame.get(i, j));
                                        if( tmp != A[i][j] )
-                                               Assert.fail("Wrong get value 
for cell ("+i+","+j+"): "+tmp+", expected: "+A[i][j]);
+                                               fail("Wrong get value for cell 
("+i+","+j+"): "+tmp+", expected: "+A[i][j]);
                                }               
                }
                catch(Exception ex) {

http://git-wip-us.apache.org/repos/asf/systemml/blob/95bf8cfe/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameIndexingDistTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameIndexingDistTest.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameIndexingDistTest.java
index d5ef742..039a8ce 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameIndexingDistTest.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameIndexingDistTest.java
@@ -122,7 +122,10 @@ public class FrameIndexingDistTest extends 
AutomatedTestBase
        private void runTestLeftIndexing(ExecType et, 
LeftIndexingOp.LeftIndexingMethod indexingMethod, ValueType[] schema, IXType 
itype, boolean bSparse) throws IOException {
                
                boolean sparkConfigOld = DMLScript.USE_LOCAL_SPARK_CONFIG;
-               RUNTIME_PLATFORM oldRTP = rtplatform;
+               RUNTIME_PLATFORM oldRTP = setRuntimePlatform(et);
+               if(shouldSkipTest())
+                       return;
+               
                TestConfiguration config = null;
                
                HashMap<String, ValueType[]> outputSchema = new HashMap<String, 
ValueType[]>();
@@ -137,17 +140,6 @@ public class FrameIndexingDistTest extends 
AutomatedTestBase
                        if(indexingMethod != null) {
                                LeftIndexingOp.FORCED_LEFT_INDEXING = 
indexingMethod;
                        }
-                       
-                       if(et == ExecType.SPARK) {
-                       rtplatform = RUNTIME_PLATFORM.SPARK;
-                   }
-                       else {
-                               // rtplatform = (et==ExecType.MR)? 
RUNTIME_PLATFORM.HADOOP : RUNTIME_PLATFORM.SINGLE_NODE;
-                           rtplatform = RUNTIME_PLATFORM.HYBRID;
-                       }
-                       if( rtplatform == RUNTIME_PLATFORM.SPARK )
-                               DMLScript.USE_LOCAL_SPARK_CONFIG = true;
-                       
                    
                config.addVariable("rows", rows);
                config.addVariable("cols", cols);

http://git-wip-us.apache.org/repos/asf/systemml/blob/95bf8cfe/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameIndexingTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameIndexingTest.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameIndexingTest.java
index 0f1ce12..605166c 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameIndexingTest.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameIndexingTest.java
@@ -27,7 +27,6 @@ import org.apache.sysml.runtime.util.DataConverter;
 import org.apache.sysml.runtime.util.UtilFunctions;
 import org.apache.sysml.test.integration.AutomatedTestBase;
 import org.apache.sysml.test.utils.TestUtils;
-import org.junit.Assert;
 import org.junit.Test;
 
 public class FrameIndexingTest extends AutomatedTestBase
@@ -81,6 +80,9 @@ public class FrameIndexingTest extends AutomatedTestBase
         */
        private void runFrameIndexingTest( ValueType[] schema, IXType itype)
        {
+               if(shouldSkipTest())
+                       return;
+               
                try
                {
                        //data generation
@@ -137,7 +139,7 @@ public class FrameIndexingTest extends AutomatedTestBase
                        
                        //check basic meta data
                        if( frame3.getNumRows() != mbC.getNumRows() )
-                               Assert.fail("Wrong number of rows: 
"+frame3.getNumRows()+", expected: "+mbC.getNumRows());
+                               fail("Wrong number of rows: 
"+frame3.getNumRows()+", expected: "+mbC.getNumRows());
                
                        //check correct values
                        ValueType[] lschema = frame3.getSchema();
@@ -145,7 +147,7 @@ public class FrameIndexingTest extends AutomatedTestBase
                                for( int j=0; j<lschema.length; j++ )   {
                                        double tmp = 
UtilFunctions.objectToDouble(lschema[j], frame3.get(i, j));
                                        if( tmp != mbC.quickGetValue(i, j) )
-                                               Assert.fail("Wrong get value 
for cell ("+i+","+j+"): "+tmp+", expected: "+mbC.quickGetValue(i, j));
+                                               fail("Wrong get value for cell 
("+i+","+j+"): "+tmp+", expected: "+mbC.quickGetValue(i, j));
                                }               
                }
                catch(Exception ex) {

http://git-wip-us.apache.org/repos/asf/systemml/blob/95bf8cfe/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameMatrixCastingTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameMatrixCastingTest.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameMatrixCastingTest.java
index fec16db..71550a2 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameMatrixCastingTest.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameMatrixCastingTest.java
@@ -137,18 +137,11 @@ public class FrameMatrixCastingTest extends 
AutomatedTestBase
         */
        private void runFrameCastingTest( String testname, boolean multColBlks, 
ValueType vt, 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
                {
                        int cols = multColBlks ? cols2 : cols1;

Reply via email to