You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@systemml.apache.org by lr...@apache.org on 2015/11/19 21:47:28 UTC
[46/50] [abbrv] incubator-systemml git commit: [SYSML-312] Refactor
unit tests
[SYSML-312] Refactor unit tests
This PR continues the pattern of previous PRs to refactor additional
packages under functions including: data, indexing, parfor, quaternary,
recompile, ternary, transform. Also updated matrix_full_other and
matrix_full_cellwise to incorporate previous feedback (e.g., used base class
methods for input, output, expected directories). The matrix_full_other
changes also include removing cached files to reduce disk space.
Also updated 2 package suites to include additional unit tests.
Project: http://git-wip-us.apache.org/repos/asf/incubator-systemml/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-systemml/commit/44a718e3
Tree: http://git-wip-us.apache.org/repos/asf/incubator-systemml/tree/44a718e3
Diff: http://git-wip-us.apache.org/repos/asf/incubator-systemml/diff/44a718e3
Branch: refs/heads/master
Commit: 44a718e35d6b217893f65120697c56c170eb07b7
Parents: 58cf0f4
Author: Glenn Weidner <gw...@us.ibm.com>
Authored: Fri Nov 13 09:12:10 2015 -0200
Committer: Luciano Resende <lr...@apache.org>
Committed: Fri Nov 13 09:12:10 2015 -0200
----------------------------------------------------------------------
pom.xml | 26 +++-
.../dml/test/integration/AutomatedTestBase.java | 7 +-
.../functions/append/RBindCBindMatrixTest.java | 18 ++-
.../FullMatrixMatrixCellwiseOperationTest.java | 134 +++++++++----------
...ullMatrixVectorColCellwiseOperationTest.java | 73 +++++-----
...ullMatrixVectorRowCellwiseOperationTest.java | 73 +++++-----
.../FullMinus1MultTest.java | 16 +--
...ectorVectorCellwiseCompareOperationTest.java | 10 +-
.../FullVectorVectorCellwiseOperationTest.java | 18 +--
...FullDistributedMatrixMultiplicationTest.java | 30 +++--
.../FullIntegerDivisionTest.java | 25 ++--
.../FullMatrixMultiplicationTest.java | 49 +++----
...llMatrixMultiplicationTransposeSelfTest.java | 46 +++----
...FullMatrixMultiplicationUltraSparseTest.java | 29 ++--
.../FullMinMaxComparisonTest.java | 30 +++--
.../matrix_full_other/FullPPredMatrixTest.java | 25 ++--
.../FullPPredScalarLeftTest.java | 27 ++--
.../FullPPredScalarRightTest.java | 26 ++--
.../binary/matrix_full_other/FullPowerTest.java | 25 ++--
.../functions/data/FullReblockTest.java | 35 ++---
.../data/FullStringInitializeTest.java | 16 +--
.../functions/data/RandRuntimePlatformTest.java | 36 +++--
.../integration/functions/data/RandTest1.java | 6 +-
.../integration/functions/data/RandTest2.java | 3 +-
.../integration/functions/data/RandTest3.java | 4 +-
.../integration/functions/data/RandTest4.java | 4 +-
.../integration/functions/data/RandTest5.java | 15 +--
.../functions/data/RandVarMinMaxTest.java | 21 +--
.../functions/data/RandVarSeedTest.java | 15 +--
.../integration/functions/data/ReadMMTest.java | 59 ++++----
.../integration/functions/data/ReblockTest.java | 6 +-
.../integration/functions/data/SampleTest.java | 18 +--
.../functions/data/SequenceTest.java | 35 ++---
.../functions/data/VariableTest.java | 6 +-
.../integration/functions/data/WriteMMTest.java | 23 ++--
.../integration/functions/data/WriteTest.java | 10 +-
.../indexing/Jdk7IssueRightIndexingTest.java | 15 +--
.../indexing/LeftIndexingScalarTest.java | 18 +--
.../indexing/LeftIndexingSparseDenseTest.java | 23 ++--
.../indexing/LeftIndexingSparseSparseTest.java | 23 ++--
.../functions/indexing/LeftIndexingTest.java | 32 +++--
.../indexing/RightIndexingMatrixTest.java | 22 +--
.../indexing/RightIndexingVectorTest.java | 23 ++--
.../functions/parfor/ForLoopPredicateTest.java | 29 ++--
.../parfor/ParForAdversarialLiteralsTest.java | 57 +++-----
.../ParForColwiseDataPartitioningTest.java | 21 ++-
.../ParForDataPartitionLeftIndexingTest.java | 20 +--
.../parfor/ParForDependencyAnalysisTest.java | 13 +-
.../parfor/ParForFunctionSerializationTest.java | 27 ++--
.../ParForMultipleDataPartitioningTest.java | 21 ++-
.../parfor/ParForNaNResultMergeTest.java | 15 +--
.../ParForParallelRemoteResultMergeTest.java | 27 ++--
.../parfor/ParForRepeatedOptimizationTest.java | 22 +--
.../ParForReplaceThreadIDRecompileTest.java | 16 +--
.../ParForRowwiseDataPartitioningTest.java | 21 ++-
.../parfor/ParForRulebasedOptimizerTest.java | 78 +++++------
.../ParForSerialRemoteResultMergeTest.java | 34 ++---
.../quaternary/RewritesWeightedSigmoidTest.java | 17 +--
.../quaternary/WeightedCrossEntropyTest.java | 18 +--
.../quaternary/WeightedDivMatrixMultTest.java | 30 ++---
.../quaternary/WeightedSigmoidTest.java | 25 ++--
.../quaternary/WeightedSquaredLossTest.java | 31 ++---
.../functions/recompile/BranchRemovalTest.java | 25 ++--
.../recompile/CSVReadUnknownSizeTest.java | 21 ++-
.../recompile/FunctionRecompileTest.java | 21 ++-
.../IPAAssignConstantPropagationTest.java | 15 ++-
.../recompile/IPAComplexAppendTest.java | 19 +--
.../recompile/IPAConstantPropagationTest.java | 17 ++-
...IPAPropagationSizeMultipleFunctionsTest.java | 25 ++--
.../LiteralReplaceCastScalarReadTest.java | 4 +-
.../recompile/MultipleReadsIPATest.java | 28 ++--
.../recompile/PredicateRecompileTest.java | 39 +++---
.../recompile/RandJobRecompileTest.java | 18 +--
.../functions/recompile/RandRecompileTest.java | 21 ++-
.../recompile/RandSizeExpressionEvalTest.java | 16 +--
.../recompile/ReblockRecompileTest.java | 35 ++---
.../recompile/RemoveEmptyPotpourriTest.java | 18 +--
.../recompile/RemoveEmptyRecompileTest.java | 14 +-
.../RewriteComplexMapMultChainTest.java | 21 ++-
.../SparsityFunctionRecompileTest.java | 41 +++---
.../recompile/SparsityRecompileTest.java | 42 +++---
.../ternary/CTableMatrixIgnoreZerosTest.java | 15 +--
.../functions/ternary/CTableSequenceTest.java | 23 ++--
.../ternary/CentralMomentWeightsTest.java | 15 +--
.../ternary/CovarianceWeightsTest.java | 16 +--
.../functions/ternary/QuantileWeightsTest.java | 18 ++-
.../functions/ternary/TableOutputTest.java | 19 +--
.../functions/transform/RunTest.java | 32 ++---
.../functions/transform/ScalingTest.java | 23 ++--
.../functions/transform/TransformTest.java | 43 +++---
.../functions/append/ZPackageSuite.java | 2 +-
.../functions/quaternary/ZPackageSuite.java | 3 +
92 files changed, 1056 insertions(+), 1270 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/44a718e3/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index c6c2715..bb60a09 100644
--- a/pom.xml
+++ b/pom.xml
@@ -353,14 +353,36 @@
<includes>
<include>**/integration/**/*Suite.java</include>
- <include>**/integration/functions/binary/matrix_full_other/*Test.java</include>
+ <!-- <include>**/integration/functions/aggregate/*Test.java</include> -->
+ <include>**/integration/functions/append/*Test.java</include>
+ <include>**/integration/functions/binary/matrix/*Test.java</include>
<include>**/integration/functions/binary/matrix_full_cellwise/*Test.java</include>
+ <include>**/integration/functions/binary/matrix_full_other/*Test.java</include>
+ <include>**/integration/functions/data/*Test*.java</include>
+ <include>**/integration/functions/indexing/*Test.java</include>
+ <include>**/integration/functions/parfor/*Test.java</include>
+ <include>**/integration/functions/quaternary/*Test.java</include>
+ <include>**/integration/functions/recompile/*Test.java</include>
+ <include>**/integration/functions/reorg/*Test.java</include>
+ <include>**/integration/functions/ternary/*Test.java</include>
+ <include>**/integration/functions/transform/*Test.java</include>
<include>**/integration/functions/unary/matrix/*Test.java</include>
</includes>
<excludes>
- <exclude>**/integration/functions/binary/matrix_full_other/*Suite.java</exclude>
+ <!-- <exclude>**/integration/functions/aggregate/*Suite.java</exclude> -->
+ <exclude>**/integration/functions/append/*Suite.java</exclude>
+ <exclude>**/integration/functions/binary/matrix/*Suite.java</exclude>
<exclude>**/integration/functions/binary/matrix_full_cellwise/*Suite.java</exclude>
+ <exclude>**/integration/functions/binary/matrix_full_other/*Suite.java</exclude>
+ <exclude>**/integration/functions/data/*Suite.java</exclude>
+ <exclude>**/integration/functions/indexing/*Suite.java</exclude>
+ <exclude>**/integration/functions/parfor/*Suite.java</exclude>
+ <exclude>**/integration/functions/quaternary/*Suite.java</exclude>
+ <exclude>**/integration/functions/recompile/*Suite.java</exclude>
+ <exclude>**/integration/functions/reorg/*Suite.java</exclude>
+ <exclude>**/integration/functions/ternary/*Suite.java</exclude>
+ <exclude>**/integration/functions/transform/*Suite.java</exclude>
<exclude>**/integration/functions/unary/matrix/*Suite.java</exclude>
<exclude>**/slowtest/**</exclude>
</excludes>
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/44a718e3/src/test/java/com/ibm/bi/dml/test/integration/AutomatedTestBase.java
----------------------------------------------------------------------
diff --git a/src/test/java/com/ibm/bi/dml/test/integration/AutomatedTestBase.java b/src/test/java/com/ibm/bi/dml/test/integration/AutomatedTestBase.java
index 1a60b0b..198a325 100644
--- a/src/test/java/com/ibm/bi/dml/test/integration/AutomatedTestBase.java
+++ b/src/test/java/com/ibm/bi/dml/test/integration/AutomatedTestBase.java
@@ -628,6 +628,9 @@ public abstract class AutomatedTestBase
* two dimensional matrix
*/
protected void writeExpectedMatrixMarket(String name, double[][] matrix) {
+ File path = new File(baseDirectory, EXPECTED_DIR + cacheDir);
+ path.mkdirs();
+
TestUtils.writeTestMatrix(baseDirectory + EXPECTED_DIR + cacheDir + name, matrix, true);
expectedFiles.add(baseDirectory + EXPECTED_DIR + cacheDir + name);
}
@@ -1570,11 +1573,11 @@ public abstract class AutomatedTestBase
}
protected String expected(String expected) {
- return baseDirectory + EXPECTED_DIR + expected;
+ return baseDirectory + EXPECTED_DIR + cacheDir + expected;
}
protected String expectedDir() {
- return baseDirectory + EXPECTED_DIR;
+ return baseDirectory + EXPECTED_DIR + cacheDir;
}
protected String getScript() {
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/44a718e3/src/test/java/com/ibm/bi/dml/test/integration/functions/append/RBindCBindMatrixTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/com/ibm/bi/dml/test/integration/functions/append/RBindCBindMatrixTest.java b/src/test/java/com/ibm/bi/dml/test/integration/functions/append/RBindCBindMatrixTest.java
index 0b59048..1464bcf 100644
--- a/src/test/java/com/ibm/bi/dml/test/integration/functions/append/RBindCBindMatrixTest.java
+++ b/src/test/java/com/ibm/bi/dml/test/integration/functions/append/RBindCBindMatrixTest.java
@@ -38,7 +38,8 @@ public class RBindCBindMatrixTest extends AutomatedTestBase
private final static String TEST_NAME1 = "RBindMatrixTest"; //basic rbind test
private final static String TEST_NAME2 = "RBindCBindMatrixTest"; //cbind rewritten to rbind
private final static String TEST_DIR = "functions/append/";
-
+ private final static String TEST_CLASS_DIR = TEST_DIR + RBindCBindMatrixTest.class.getSimpleName() + "/";
+
private final static double epsilon=0.0000000001;
private final static int min=1;
private final static int max=100;
@@ -53,8 +54,8 @@ public class RBindCBindMatrixTest extends AutomatedTestBase
@Override
public void setUp() {
TestUtils.clearAssertionInformation();
- addTestConfiguration(TEST_NAME1, new TestConfiguration(TEST_DIR, TEST_NAME1, new String[] {"C"}));
- addTestConfiguration(TEST_NAME2, new TestConfiguration(TEST_DIR, TEST_NAME2, new String[] {"C"}));
+ addTestConfiguration(TEST_NAME1, new TestConfiguration(TEST_CLASS_DIR, TEST_NAME1, new String[] {"C"}));
+ addTestConfiguration(TEST_NAME2, new TestConfiguration(TEST_CLASS_DIR, TEST_NAME2, new String[] {"C"}));
}
@Test
@@ -143,6 +144,7 @@ public class RBindCBindMatrixTest extends AutomatedTestBase
String TEST_NAME = testname;
TestConfiguration config = getTestConfiguration(TEST_NAME);
+ loadTestConfiguration(config);
double sparsity = (sparse) ? sparsity2 : sparsity1;
try
@@ -150,14 +152,10 @@ public class RBindCBindMatrixTest extends AutomatedTestBase
String RI_HOME = SCRIPT_DIR + TEST_DIR;
fullDMLScriptName = RI_HOME + TEST_NAME + ".dml";
//stats required for opcode checks
- programArgs = new String[]{"-stats","-args", RI_HOME + INPUT_DIR + "A" ,
- RI_HOME + INPUT_DIR + "B" ,
- RI_HOME + OUTPUT_DIR + "C" };
+ programArgs = new String[]{"-stats","-args", input("A"), input("B"), output("C") };
+
fullRScriptName = RI_HOME + TEST_NAME + ".R";
- rCmd = "Rscript" + " " + fullRScriptName + " " +
- RI_HOME + INPUT_DIR + " "+ RI_HOME + EXPECTED_DIR;
-
- loadTestConfiguration(config);
+ rCmd = "Rscript" + " " + fullRScriptName + " " + inputDir() + " "+ expectedDir();
double[][] A = getRandomMatrix(rows1, cols, min, max, sparsity, 823);
writeInputMatrixWithMTD("A", A, true);
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/44a718e3/src/test/java/com/ibm/bi/dml/test/integration/functions/binary/matrix_full_cellwise/FullMatrixMatrixCellwiseOperationTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/com/ibm/bi/dml/test/integration/functions/binary/matrix_full_cellwise/FullMatrixMatrixCellwiseOperationTest.java b/src/test/java/com/ibm/bi/dml/test/integration/functions/binary/matrix_full_cellwise/FullMatrixMatrixCellwiseOperationTest.java
index b093630..3a8b172 100644
--- a/src/test/java/com/ibm/bi/dml/test/integration/functions/binary/matrix_full_cellwise/FullMatrixMatrixCellwiseOperationTest.java
+++ b/src/test/java/com/ibm/bi/dml/test/integration/functions/binary/matrix_full_cellwise/FullMatrixMatrixCellwiseOperationTest.java
@@ -48,7 +48,7 @@ public class FullMatrixMatrixCellwiseOperationTest extends AutomatedTestBase
private enum OpType{
ADDITION,
- SUBSTRACTION,
+ SUBTRACTION,
MULTIPLICATION,
DIVISION
}
@@ -125,57 +125,57 @@ public class FullMatrixMatrixCellwiseOperationTest extends AutomatedTestBase
}
@Test
- public void testSubstractionDenseDenseSP()
+ public void testSubtractionDenseDenseSP()
{
- runMatrixCellwiseOperationTest(OpType.SUBSTRACTION, SparsityType.DENSE, SparsityType.DENSE, ExecType.SPARK);
+ runMatrixCellwiseOperationTest(OpType.SUBTRACTION, SparsityType.DENSE, SparsityType.DENSE, ExecType.SPARK);
}
@Test
- public void testSubstractionDenseSparseSP()
+ public void testSubtractionDenseSparseSP()
{
- runMatrixCellwiseOperationTest(OpType.SUBSTRACTION, SparsityType.DENSE, SparsityType.SPARSE, ExecType.SPARK);
+ runMatrixCellwiseOperationTest(OpType.SUBTRACTION, SparsityType.DENSE, SparsityType.SPARSE, ExecType.SPARK);
}
@Test
- public void testSubstractionDenseEmptySP()
+ public void testSubtractionDenseEmptySP()
{
- runMatrixCellwiseOperationTest(OpType.SUBSTRACTION, SparsityType.DENSE, SparsityType.EMPTY, ExecType.SPARK);
+ runMatrixCellwiseOperationTest(OpType.SUBTRACTION, SparsityType.DENSE, SparsityType.EMPTY, ExecType.SPARK);
}
@Test
- public void testSubstractionSparseDenseSP()
+ public void testSubtractionSparseDenseSP()
{
- runMatrixCellwiseOperationTest(OpType.SUBSTRACTION, SparsityType.SPARSE, SparsityType.DENSE, ExecType.SPARK);
+ runMatrixCellwiseOperationTest(OpType.SUBTRACTION, SparsityType.SPARSE, SparsityType.DENSE, ExecType.SPARK);
}
@Test
- public void testSubstractionSparseSparseSP()
+ public void testSubtractionSparseSparseSP()
{
- runMatrixCellwiseOperationTest(OpType.SUBSTRACTION, SparsityType.SPARSE, SparsityType.SPARSE, ExecType.SPARK);
+ runMatrixCellwiseOperationTest(OpType.SUBTRACTION, SparsityType.SPARSE, SparsityType.SPARSE, ExecType.SPARK);
}
@Test
- public void testSubstractionSparseEmptySP()
+ public void testSubtractionSparseEmptySP()
{
- runMatrixCellwiseOperationTest(OpType.SUBSTRACTION, SparsityType.SPARSE, SparsityType.EMPTY, ExecType.SPARK);
+ runMatrixCellwiseOperationTest(OpType.SUBTRACTION, SparsityType.SPARSE, SparsityType.EMPTY, ExecType.SPARK);
}
@Test
- public void testSubstractionEmptyDenseSP()
+ public void testSubtractionEmptyDenseSP()
{
- runMatrixCellwiseOperationTest(OpType.SUBSTRACTION, SparsityType.EMPTY, SparsityType.DENSE, ExecType.SPARK);
+ runMatrixCellwiseOperationTest(OpType.SUBTRACTION, SparsityType.EMPTY, SparsityType.DENSE, ExecType.SPARK);
}
@Test
- public void testSubstractionEmptySparseSP()
+ public void testSubtractionEmptySparseSP()
{
- runMatrixCellwiseOperationTest(OpType.SUBSTRACTION, SparsityType.EMPTY, SparsityType.SPARSE, ExecType.SPARK);
+ runMatrixCellwiseOperationTest(OpType.SUBTRACTION, SparsityType.EMPTY, SparsityType.SPARSE, ExecType.SPARK);
}
@Test
- public void testSubstractionEmptyEmptySP()
+ public void testSubtractionEmptyEmptySP()
{
- runMatrixCellwiseOperationTest(OpType.SUBSTRACTION, SparsityType.EMPTY, SparsityType.EMPTY, ExecType.SPARK);
+ runMatrixCellwiseOperationTest(OpType.SUBTRACTION, SparsityType.EMPTY, SparsityType.EMPTY, ExecType.SPARK);
}
@Test
@@ -397,111 +397,111 @@ public class FullMatrixMatrixCellwiseOperationTest extends AutomatedTestBase
}
@Test
- public void testSubstractionDenseDenseCP()
+ public void testSubtractionDenseDenseCP()
{
- runMatrixCellwiseOperationTest(OpType.SUBSTRACTION, SparsityType.DENSE, SparsityType.DENSE, ExecType.CP);
+ runMatrixCellwiseOperationTest(OpType.SUBTRACTION, SparsityType.DENSE, SparsityType.DENSE, ExecType.CP);
}
@Test
- public void testSubstractionDenseSparseCP()
+ public void testSubtractionDenseSparseCP()
{
- runMatrixCellwiseOperationTest(OpType.SUBSTRACTION, SparsityType.DENSE, SparsityType.SPARSE, ExecType.CP);
+ runMatrixCellwiseOperationTest(OpType.SUBTRACTION, SparsityType.DENSE, SparsityType.SPARSE, ExecType.CP);
}
@Test
- public void testSubstractionDenseEmptyCP()
+ public void testSubtractionDenseEmptyCP()
{
- runMatrixCellwiseOperationTest(OpType.SUBSTRACTION, SparsityType.DENSE, SparsityType.EMPTY, ExecType.CP);
+ runMatrixCellwiseOperationTest(OpType.SUBTRACTION, SparsityType.DENSE, SparsityType.EMPTY, ExecType.CP);
}
@Test
- public void testSubstractionSparseDenseCP()
+ public void testSubtractionSparseDenseCP()
{
- runMatrixCellwiseOperationTest(OpType.SUBSTRACTION, SparsityType.SPARSE, SparsityType.DENSE, ExecType.CP);
+ runMatrixCellwiseOperationTest(OpType.SUBTRACTION, SparsityType.SPARSE, SparsityType.DENSE, ExecType.CP);
}
@Test
- public void testSubstractionSparseSparseCP()
+ public void testSubtractionSparseSparseCP()
{
- runMatrixCellwiseOperationTest(OpType.SUBSTRACTION, SparsityType.SPARSE, SparsityType.SPARSE, ExecType.CP);
+ runMatrixCellwiseOperationTest(OpType.SUBTRACTION, SparsityType.SPARSE, SparsityType.SPARSE, ExecType.CP);
}
@Test
- public void testSubstractionSparseEmptyCP()
+ public void testSubtractionSparseEmptyCP()
{
- runMatrixCellwiseOperationTest(OpType.SUBSTRACTION, SparsityType.SPARSE, SparsityType.EMPTY, ExecType.CP);
+ runMatrixCellwiseOperationTest(OpType.SUBTRACTION, SparsityType.SPARSE, SparsityType.EMPTY, ExecType.CP);
}
@Test
- public void testSubstractionEmptyDenseCP()
+ public void testSubtractionEmptyDenseCP()
{
- runMatrixCellwiseOperationTest(OpType.SUBSTRACTION, SparsityType.EMPTY, SparsityType.DENSE, ExecType.CP);
+ runMatrixCellwiseOperationTest(OpType.SUBTRACTION, SparsityType.EMPTY, SparsityType.DENSE, ExecType.CP);
}
@Test
- public void testSubstractionEmptySparseCP()
+ public void testSubtractionEmptySparseCP()
{
- runMatrixCellwiseOperationTest(OpType.SUBSTRACTION, SparsityType.EMPTY, SparsityType.SPARSE, ExecType.CP);
+ runMatrixCellwiseOperationTest(OpType.SUBTRACTION, SparsityType.EMPTY, SparsityType.SPARSE, ExecType.CP);
}
@Test
- public void testSubstractionEmptyEmptyCP()
+ public void testSubtractionEmptyEmptyCP()
{
- runMatrixCellwiseOperationTest(OpType.SUBSTRACTION, SparsityType.EMPTY, SparsityType.EMPTY, ExecType.CP);
+ runMatrixCellwiseOperationTest(OpType.SUBTRACTION, SparsityType.EMPTY, SparsityType.EMPTY, ExecType.CP);
}
@Test
- public void testSubstractionDenseDenseMR()
+ public void testSubtractionDenseDenseMR()
{
- runMatrixCellwiseOperationTest(OpType.SUBSTRACTION, SparsityType.DENSE, SparsityType.DENSE, ExecType.MR);
+ runMatrixCellwiseOperationTest(OpType.SUBTRACTION, SparsityType.DENSE, SparsityType.DENSE, ExecType.MR);
}
@Test
- public void testSubstractionDenseSparseMR()
+ public void testSubtractionDenseSparseMR()
{
- runMatrixCellwiseOperationTest(OpType.SUBSTRACTION, SparsityType.DENSE, SparsityType.SPARSE, ExecType.MR);
+ runMatrixCellwiseOperationTest(OpType.SUBTRACTION, SparsityType.DENSE, SparsityType.SPARSE, ExecType.MR);
}
@Test
- public void testSubstractionDenseEmptyMR()
+ public void testSubtractionDenseEmptyMR()
{
- runMatrixCellwiseOperationTest(OpType.SUBSTRACTION, SparsityType.DENSE, SparsityType.EMPTY, ExecType.MR);
+ runMatrixCellwiseOperationTest(OpType.SUBTRACTION, SparsityType.DENSE, SparsityType.EMPTY, ExecType.MR);
}
@Test
- public void testSubstractionSparseDenseMR()
+ public void testSubtractionSparseDenseMR()
{
- runMatrixCellwiseOperationTest(OpType.SUBSTRACTION, SparsityType.SPARSE, SparsityType.DENSE, ExecType.MR);
+ runMatrixCellwiseOperationTest(OpType.SUBTRACTION, SparsityType.SPARSE, SparsityType.DENSE, ExecType.MR);
}
@Test
- public void testSubstractionSparseSparseMR()
+ public void testSubtractionSparseSparseMR()
{
- runMatrixCellwiseOperationTest(OpType.SUBSTRACTION, SparsityType.SPARSE, SparsityType.SPARSE, ExecType.MR);
+ runMatrixCellwiseOperationTest(OpType.SUBTRACTION, SparsityType.SPARSE, SparsityType.SPARSE, ExecType.MR);
}
@Test
- public void testSubstractionSparseEmptyMR()
+ public void testSubtractionSparseEmptyMR()
{
- runMatrixCellwiseOperationTest(OpType.SUBSTRACTION, SparsityType.SPARSE, SparsityType.EMPTY, ExecType.MR);
+ runMatrixCellwiseOperationTest(OpType.SUBTRACTION, SparsityType.SPARSE, SparsityType.EMPTY, ExecType.MR);
}
@Test
- public void testSubstractionEmptyDenseMR()
+ public void testSubtractionEmptyDenseMR()
{
- runMatrixCellwiseOperationTest(OpType.SUBSTRACTION, SparsityType.EMPTY, SparsityType.DENSE, ExecType.MR);
+ runMatrixCellwiseOperationTest(OpType.SUBTRACTION, SparsityType.EMPTY, SparsityType.DENSE, ExecType.MR);
}
@Test
- public void testSubstractionEmptySparseMR()
+ public void testSubtractionEmptySparseMR()
{
- runMatrixCellwiseOperationTest(OpType.SUBSTRACTION, SparsityType.EMPTY, SparsityType.SPARSE, ExecType.MR);
+ runMatrixCellwiseOperationTest(OpType.SUBTRACTION, SparsityType.EMPTY, SparsityType.SPARSE, ExecType.MR);
}
@Test
- public void testSubstractionEmptyEmptyMR()
+ public void testSubtractionEmptyEmptyMR()
{
- runMatrixCellwiseOperationTest(OpType.SUBSTRACTION, SparsityType.EMPTY, SparsityType.EMPTY, ExecType.MR);
+ runMatrixCellwiseOperationTest(OpType.SUBTRACTION, SparsityType.EMPTY, SparsityType.EMPTY, ExecType.MR);
}
@Test
@@ -746,31 +746,24 @@ public class FullMatrixMatrixCellwiseOperationTest extends AutomatedTestBase
switch( type )
{
case ADDITION: TEST_NAME = TEST_NAME1; break;
- case SUBSTRACTION: TEST_NAME = TEST_NAME2; break;
+ case SUBTRACTION: TEST_NAME = TEST_NAME2; break;
case MULTIPLICATION: TEST_NAME = TEST_NAME3; break;
case DIVISION: TEST_NAME = TEST_NAME4; break;
}
TestConfiguration config = getTestConfiguration(TEST_NAME);
+ loadTestConfiguration(config);
/* This is for running the junit test the new way, i.e., construct the arguments directly */
String HOME = SCRIPT_DIR + TEST_DIR;
- String TARGET_IN = TEST_DATA_DIR + TEST_CLASS_DIR + INPUT_DIR;
- String TARGET_OUT = TEST_DATA_DIR + TEST_CLASS_DIR + OUTPUT_DIR;
- String TARGET_EXPECTED = TEST_DATA_DIR + TEST_CLASS_DIR + EXPECTED_DIR;
fullDMLScriptName = HOME + TEST_NAME + ".dml";
- programArgs = new String[]{"-explain", "-args", TARGET_IN + "A",
- Integer.toString(rows),
- Integer.toString(cols),
- TARGET_IN + "B",
- Integer.toString(rows),
- Integer.toString(cols),
- TARGET_OUT + "C" };
- fullRScriptName = HOME + TEST_NAME + ".R";
- rCmd = "Rscript" + " " + fullRScriptName + " " +
- TARGET_IN + " " + TARGET_EXPECTED;
+ programArgs = new String[]{"-explain", "-args",
+ input("A"), Integer.toString(rows), Integer.toString(cols),
+ input("B"), Integer.toString(rows), Integer.toString(cols),
+ output("C") };
- loadTestConfiguration(config);
+ fullRScriptName = HOME + TEST_NAME + ".R";
+ rCmd = "Rscript" + " " + fullRScriptName + " " + inputDir() + " " + expectedDir();
//get sparsity
double lsparsity1 = 1.0, lsparsity2 = 1.0;
@@ -825,5 +818,4 @@ public class FullMatrixMatrixCellwiseOperationTest extends AutomatedTestBase
}
}
-
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/44a718e3/src/test/java/com/ibm/bi/dml/test/integration/functions/binary/matrix_full_cellwise/FullMatrixVectorColCellwiseOperationTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/com/ibm/bi/dml/test/integration/functions/binary/matrix_full_cellwise/FullMatrixVectorColCellwiseOperationTest.java b/src/test/java/com/ibm/bi/dml/test/integration/functions/binary/matrix_full_cellwise/FullMatrixVectorColCellwiseOperationTest.java
index d2819c9..a693a0f 100644
--- a/src/test/java/com/ibm/bi/dml/test/integration/functions/binary/matrix_full_cellwise/FullMatrixVectorColCellwiseOperationTest.java
+++ b/src/test/java/com/ibm/bi/dml/test/integration/functions/binary/matrix_full_cellwise/FullMatrixVectorColCellwiseOperationTest.java
@@ -48,7 +48,7 @@ public class FullMatrixVectorColCellwiseOperationTest extends AutomatedTestBase
private enum OpType{
ADDITION,
- SUBSTRACTION,
+ SUBTRACTION,
MULTIPLICATION,
DIVISION
}
@@ -127,55 +127,55 @@ public class FullMatrixVectorColCellwiseOperationTest extends AutomatedTestBase
@Test
public void testSubstractionDenseDenseSP()
{
- runMatrixVectorCellwiseOperationTest(OpType.SUBSTRACTION, SparsityType.DENSE, SparsityType.DENSE, ExecType.SPARK);
+ runMatrixVectorCellwiseOperationTest(OpType.SUBTRACTION, SparsityType.DENSE, SparsityType.DENSE, ExecType.SPARK);
}
@Test
public void testSubstractionDenseSparseSP()
{
- runMatrixVectorCellwiseOperationTest(OpType.SUBSTRACTION, SparsityType.DENSE, SparsityType.SPARSE, ExecType.SPARK);
+ runMatrixVectorCellwiseOperationTest(OpType.SUBTRACTION, SparsityType.DENSE, SparsityType.SPARSE, ExecType.SPARK);
}
@Test
public void testSubstractionDenseEmptySP()
{
- runMatrixVectorCellwiseOperationTest(OpType.SUBSTRACTION, SparsityType.DENSE, SparsityType.EMPTY, ExecType.SPARK);
+ runMatrixVectorCellwiseOperationTest(OpType.SUBTRACTION, SparsityType.DENSE, SparsityType.EMPTY, ExecType.SPARK);
}
@Test
public void testSubstractionSparseDenseSP()
{
- runMatrixVectorCellwiseOperationTest(OpType.SUBSTRACTION, SparsityType.SPARSE, SparsityType.DENSE, ExecType.SPARK);
+ runMatrixVectorCellwiseOperationTest(OpType.SUBTRACTION, SparsityType.SPARSE, SparsityType.DENSE, ExecType.SPARK);
}
@Test
public void testSubstractionSparseSparseSP()
{
- runMatrixVectorCellwiseOperationTest(OpType.SUBSTRACTION, SparsityType.SPARSE, SparsityType.SPARSE, ExecType.SPARK);
+ runMatrixVectorCellwiseOperationTest(OpType.SUBTRACTION, SparsityType.SPARSE, SparsityType.SPARSE, ExecType.SPARK);
}
@Test
public void testSubstractionSparseEmptySP()
{
- runMatrixVectorCellwiseOperationTest(OpType.SUBSTRACTION, SparsityType.SPARSE, SparsityType.EMPTY, ExecType.SPARK);
+ runMatrixVectorCellwiseOperationTest(OpType.SUBTRACTION, SparsityType.SPARSE, SparsityType.EMPTY, ExecType.SPARK);
}
@Test
public void testSubstractionEmptyDenseSP()
{
- runMatrixVectorCellwiseOperationTest(OpType.SUBSTRACTION, SparsityType.EMPTY, SparsityType.DENSE, ExecType.SPARK);
+ runMatrixVectorCellwiseOperationTest(OpType.SUBTRACTION, SparsityType.EMPTY, SparsityType.DENSE, ExecType.SPARK);
}
@Test
public void testSubstractionEmptySparseSP()
{
- runMatrixVectorCellwiseOperationTest(OpType.SUBSTRACTION, SparsityType.EMPTY, SparsityType.SPARSE, ExecType.SPARK);
+ runMatrixVectorCellwiseOperationTest(OpType.SUBTRACTION, SparsityType.EMPTY, SparsityType.SPARSE, ExecType.SPARK);
}
@Test
public void testSubstractionEmptyEmptySP()
{
- runMatrixVectorCellwiseOperationTest(OpType.SUBSTRACTION, SparsityType.EMPTY, SparsityType.EMPTY, ExecType.SPARK);
+ runMatrixVectorCellwiseOperationTest(OpType.SUBTRACTION, SparsityType.EMPTY, SparsityType.EMPTY, ExecType.SPARK);
}
@Test
@@ -399,109 +399,109 @@ public class FullMatrixVectorColCellwiseOperationTest extends AutomatedTestBase
@Test
public void testSubstractionDenseDenseCP()
{
- runMatrixVectorCellwiseOperationTest(OpType.SUBSTRACTION, SparsityType.DENSE, SparsityType.DENSE, ExecType.CP);
+ runMatrixVectorCellwiseOperationTest(OpType.SUBTRACTION, SparsityType.DENSE, SparsityType.DENSE, ExecType.CP);
}
@Test
public void testSubstractionDenseSparseCP()
{
- runMatrixVectorCellwiseOperationTest(OpType.SUBSTRACTION, SparsityType.DENSE, SparsityType.SPARSE, ExecType.CP);
+ runMatrixVectorCellwiseOperationTest(OpType.SUBTRACTION, SparsityType.DENSE, SparsityType.SPARSE, ExecType.CP);
}
@Test
public void testSubstractionDenseEmptyCP()
{
- runMatrixVectorCellwiseOperationTest(OpType.SUBSTRACTION, SparsityType.DENSE, SparsityType.EMPTY, ExecType.CP);
+ runMatrixVectorCellwiseOperationTest(OpType.SUBTRACTION, SparsityType.DENSE, SparsityType.EMPTY, ExecType.CP);
}
@Test
public void testSubstractionSparseDenseCP()
{
- runMatrixVectorCellwiseOperationTest(OpType.SUBSTRACTION, SparsityType.SPARSE, SparsityType.DENSE, ExecType.CP);
+ runMatrixVectorCellwiseOperationTest(OpType.SUBTRACTION, SparsityType.SPARSE, SparsityType.DENSE, ExecType.CP);
}
@Test
public void testSubstractionSparseSparseCP()
{
- runMatrixVectorCellwiseOperationTest(OpType.SUBSTRACTION, SparsityType.SPARSE, SparsityType.SPARSE, ExecType.CP);
+ runMatrixVectorCellwiseOperationTest(OpType.SUBTRACTION, SparsityType.SPARSE, SparsityType.SPARSE, ExecType.CP);
}
@Test
public void testSubstractionSparseEmptyCP()
{
- runMatrixVectorCellwiseOperationTest(OpType.SUBSTRACTION, SparsityType.SPARSE, SparsityType.EMPTY, ExecType.CP);
+ runMatrixVectorCellwiseOperationTest(OpType.SUBTRACTION, SparsityType.SPARSE, SparsityType.EMPTY, ExecType.CP);
}
@Test
public void testSubstractionEmptyDenseCP()
{
- runMatrixVectorCellwiseOperationTest(OpType.SUBSTRACTION, SparsityType.EMPTY, SparsityType.DENSE, ExecType.CP);
+ runMatrixVectorCellwiseOperationTest(OpType.SUBTRACTION, SparsityType.EMPTY, SparsityType.DENSE, ExecType.CP);
}
@Test
public void testSubstractionEmptySparseCP()
{
- runMatrixVectorCellwiseOperationTest(OpType.SUBSTRACTION, SparsityType.EMPTY, SparsityType.SPARSE, ExecType.CP);
+ runMatrixVectorCellwiseOperationTest(OpType.SUBTRACTION, SparsityType.EMPTY, SparsityType.SPARSE, ExecType.CP);
}
@Test
public void testSubstractionEmptyEmptyCP()
{
- runMatrixVectorCellwiseOperationTest(OpType.SUBSTRACTION, SparsityType.EMPTY, SparsityType.EMPTY, ExecType.CP);
+ runMatrixVectorCellwiseOperationTest(OpType.SUBTRACTION, SparsityType.EMPTY, SparsityType.EMPTY, ExecType.CP);
}
@Test
public void testSubstractionDenseDenseMR()
{
- runMatrixVectorCellwiseOperationTest(OpType.SUBSTRACTION, SparsityType.DENSE, SparsityType.DENSE, ExecType.MR);
+ runMatrixVectorCellwiseOperationTest(OpType.SUBTRACTION, SparsityType.DENSE, SparsityType.DENSE, ExecType.MR);
}
@Test
public void testSubstractionDenseSparseMR()
{
- runMatrixVectorCellwiseOperationTest(OpType.SUBSTRACTION, SparsityType.DENSE, SparsityType.SPARSE, ExecType.MR);
+ runMatrixVectorCellwiseOperationTest(OpType.SUBTRACTION, SparsityType.DENSE, SparsityType.SPARSE, ExecType.MR);
}
@Test
public void testSubstractionDenseEmptyMR()
{
- runMatrixVectorCellwiseOperationTest(OpType.SUBSTRACTION, SparsityType.DENSE, SparsityType.EMPTY, ExecType.MR);
+ runMatrixVectorCellwiseOperationTest(OpType.SUBTRACTION, SparsityType.DENSE, SparsityType.EMPTY, ExecType.MR);
}
@Test
public void testSubstractionSparseDenseMR()
{
- runMatrixVectorCellwiseOperationTest(OpType.SUBSTRACTION, SparsityType.SPARSE, SparsityType.DENSE, ExecType.MR);
+ runMatrixVectorCellwiseOperationTest(OpType.SUBTRACTION, SparsityType.SPARSE, SparsityType.DENSE, ExecType.MR);
}
@Test
public void testSubstractionSparseSparseMR()
{
- runMatrixVectorCellwiseOperationTest(OpType.SUBSTRACTION, SparsityType.SPARSE, SparsityType.SPARSE, ExecType.MR);
+ runMatrixVectorCellwiseOperationTest(OpType.SUBTRACTION, SparsityType.SPARSE, SparsityType.SPARSE, ExecType.MR);
}
@Test
public void testSubstractionSparseEmptyMR()
{
- runMatrixVectorCellwiseOperationTest(OpType.SUBSTRACTION, SparsityType.SPARSE, SparsityType.EMPTY, ExecType.MR);
+ runMatrixVectorCellwiseOperationTest(OpType.SUBTRACTION, SparsityType.SPARSE, SparsityType.EMPTY, ExecType.MR);
}
@Test
public void testSubstractionEmptyDenseMR()
{
- runMatrixVectorCellwiseOperationTest(OpType.SUBSTRACTION, SparsityType.EMPTY, SparsityType.DENSE, ExecType.MR);
+ runMatrixVectorCellwiseOperationTest(OpType.SUBTRACTION, SparsityType.EMPTY, SparsityType.DENSE, ExecType.MR);
}
@Test
public void testSubstractionEmptySparseMR()
{
- runMatrixVectorCellwiseOperationTest(OpType.SUBSTRACTION, SparsityType.EMPTY, SparsityType.SPARSE, ExecType.MR);
+ runMatrixVectorCellwiseOperationTest(OpType.SUBTRACTION, SparsityType.EMPTY, SparsityType.SPARSE, ExecType.MR);
}
@Test
public void testSubstractionEmptyEmptyMR()
{
- runMatrixVectorCellwiseOperationTest(OpType.SUBSTRACTION, SparsityType.EMPTY, SparsityType.EMPTY, ExecType.MR);
+ runMatrixVectorCellwiseOperationTest(OpType.SUBTRACTION, SparsityType.EMPTY, SparsityType.EMPTY, ExecType.MR);
}
@Test
@@ -746,28 +746,23 @@ public class FullMatrixVectorColCellwiseOperationTest extends AutomatedTestBase
switch( type )
{
case ADDITION: TEST_NAME = TEST_NAME1; break;
- case SUBSTRACTION: TEST_NAME = TEST_NAME2; break;
+ case SUBTRACTION: TEST_NAME = TEST_NAME2; break;
case MULTIPLICATION: TEST_NAME = TEST_NAME3; break;
case DIVISION: TEST_NAME = TEST_NAME4; break;
}
TestConfiguration config = getTestConfiguration(TEST_NAME);
+ loadTestConfiguration(config);
/* This is for running the junit test the new way, i.e., construct the arguments directly */
String HOME = SCRIPT_DIR + TEST_DIR;
- String TARGET_IN = TEST_DATA_DIR + TEST_CLASS_DIR + INPUT_DIR;
- String TARGET_OUT = TEST_DATA_DIR + TEST_CLASS_DIR + OUTPUT_DIR;
- String TARGET_EXPECTED = TEST_DATA_DIR + TEST_CLASS_DIR + EXPECTED_DIR;
fullDMLScriptName = HOME + TEST_NAME + ".dml";
- programArgs = new String[]{"-explain","recompile_runtime","-args", TARGET_IN + "A",
- TARGET_IN + "B",
- TARGET_OUT + "C" };
+ programArgs = new String[]{"-explain","recompile_runtime","-args",
+ input("A"), input("B"), output("C") };
+
fullRScriptName = HOME + TEST_NAME + ".R";
- rCmd = "Rscript" + " " + fullRScriptName + " " +
- TARGET_IN + " " + TARGET_EXPECTED;
+ rCmd = "Rscript" + " " + fullRScriptName + " " + inputDir() + " " + expectedDir();
- loadTestConfiguration(config);
-
//get sparsity
double lsparsity1 = 1.0, lsparsity2 = 1.0;
switch( sparseM1 ){
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/44a718e3/src/test/java/com/ibm/bi/dml/test/integration/functions/binary/matrix_full_cellwise/FullMatrixVectorRowCellwiseOperationTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/com/ibm/bi/dml/test/integration/functions/binary/matrix_full_cellwise/FullMatrixVectorRowCellwiseOperationTest.java b/src/test/java/com/ibm/bi/dml/test/integration/functions/binary/matrix_full_cellwise/FullMatrixVectorRowCellwiseOperationTest.java
index 88fcdf4..bca24e2 100644
--- a/src/test/java/com/ibm/bi/dml/test/integration/functions/binary/matrix_full_cellwise/FullMatrixVectorRowCellwiseOperationTest.java
+++ b/src/test/java/com/ibm/bi/dml/test/integration/functions/binary/matrix_full_cellwise/FullMatrixVectorRowCellwiseOperationTest.java
@@ -48,7 +48,7 @@ public class FullMatrixVectorRowCellwiseOperationTest extends AutomatedTestBase
private enum OpType{
ADDITION,
- SUBSTRACTION,
+ SUBTRACTION,
MULTIPLICATION,
DIVISION
}
@@ -127,55 +127,55 @@ public class FullMatrixVectorRowCellwiseOperationTest extends AutomatedTestBase
@Test
public void testSubstractionDenseDenseSP()
{
- runMatrixVectorCellwiseOperationTest(OpType.SUBSTRACTION, SparsityType.DENSE, SparsityType.DENSE, ExecType.SPARK);
+ runMatrixVectorCellwiseOperationTest(OpType.SUBTRACTION, SparsityType.DENSE, SparsityType.DENSE, ExecType.SPARK);
}
@Test
public void testSubstractionDenseSparseSP()
{
- runMatrixVectorCellwiseOperationTest(OpType.SUBSTRACTION, SparsityType.DENSE, SparsityType.SPARSE, ExecType.SPARK);
+ runMatrixVectorCellwiseOperationTest(OpType.SUBTRACTION, SparsityType.DENSE, SparsityType.SPARSE, ExecType.SPARK);
}
@Test
public void testSubstractionDenseEmptySP()
{
- runMatrixVectorCellwiseOperationTest(OpType.SUBSTRACTION, SparsityType.DENSE, SparsityType.EMPTY, ExecType.SPARK);
+ runMatrixVectorCellwiseOperationTest(OpType.SUBTRACTION, SparsityType.DENSE, SparsityType.EMPTY, ExecType.SPARK);
}
@Test
public void testSubstractionSparseDenseSP()
{
- runMatrixVectorCellwiseOperationTest(OpType.SUBSTRACTION, SparsityType.SPARSE, SparsityType.DENSE, ExecType.SPARK);
+ runMatrixVectorCellwiseOperationTest(OpType.SUBTRACTION, SparsityType.SPARSE, SparsityType.DENSE, ExecType.SPARK);
}
@Test
public void testSubstractionSparseSparseSP()
{
- runMatrixVectorCellwiseOperationTest(OpType.SUBSTRACTION, SparsityType.SPARSE, SparsityType.SPARSE, ExecType.SPARK);
+ runMatrixVectorCellwiseOperationTest(OpType.SUBTRACTION, SparsityType.SPARSE, SparsityType.SPARSE, ExecType.SPARK);
}
@Test
public void testSubstractionSparseEmptySP()
{
- runMatrixVectorCellwiseOperationTest(OpType.SUBSTRACTION, SparsityType.SPARSE, SparsityType.EMPTY, ExecType.SPARK);
+ runMatrixVectorCellwiseOperationTest(OpType.SUBTRACTION, SparsityType.SPARSE, SparsityType.EMPTY, ExecType.SPARK);
}
@Test
public void testSubstractionEmptyDenseSP()
{
- runMatrixVectorCellwiseOperationTest(OpType.SUBSTRACTION, SparsityType.EMPTY, SparsityType.DENSE, ExecType.SPARK);
+ runMatrixVectorCellwiseOperationTest(OpType.SUBTRACTION, SparsityType.EMPTY, SparsityType.DENSE, ExecType.SPARK);
}
@Test
public void testSubstractionEmptySparseSP()
{
- runMatrixVectorCellwiseOperationTest(OpType.SUBSTRACTION, SparsityType.EMPTY, SparsityType.SPARSE, ExecType.SPARK);
+ runMatrixVectorCellwiseOperationTest(OpType.SUBTRACTION, SparsityType.EMPTY, SparsityType.SPARSE, ExecType.SPARK);
}
@Test
public void testSubstractionEmptyEmptySP()
{
- runMatrixVectorCellwiseOperationTest(OpType.SUBSTRACTION, SparsityType.EMPTY, SparsityType.EMPTY, ExecType.SPARK);
+ runMatrixVectorCellwiseOperationTest(OpType.SUBTRACTION, SparsityType.EMPTY, SparsityType.EMPTY, ExecType.SPARK);
}
@Test
@@ -399,109 +399,109 @@ public class FullMatrixVectorRowCellwiseOperationTest extends AutomatedTestBase
@Test
public void testSubstractionDenseDenseCP()
{
- runMatrixVectorCellwiseOperationTest(OpType.SUBSTRACTION, SparsityType.DENSE, SparsityType.DENSE, ExecType.CP);
+ runMatrixVectorCellwiseOperationTest(OpType.SUBTRACTION, SparsityType.DENSE, SparsityType.DENSE, ExecType.CP);
}
@Test
public void testSubstractionDenseSparseCP()
{
- runMatrixVectorCellwiseOperationTest(OpType.SUBSTRACTION, SparsityType.DENSE, SparsityType.SPARSE, ExecType.CP);
+ runMatrixVectorCellwiseOperationTest(OpType.SUBTRACTION, SparsityType.DENSE, SparsityType.SPARSE, ExecType.CP);
}
@Test
public void testSubstractionDenseEmptyCP()
{
- runMatrixVectorCellwiseOperationTest(OpType.SUBSTRACTION, SparsityType.DENSE, SparsityType.EMPTY, ExecType.CP);
+ runMatrixVectorCellwiseOperationTest(OpType.SUBTRACTION, SparsityType.DENSE, SparsityType.EMPTY, ExecType.CP);
}
@Test
public void testSubstractionSparseDenseCP()
{
- runMatrixVectorCellwiseOperationTest(OpType.SUBSTRACTION, SparsityType.SPARSE, SparsityType.DENSE, ExecType.CP);
+ runMatrixVectorCellwiseOperationTest(OpType.SUBTRACTION, SparsityType.SPARSE, SparsityType.DENSE, ExecType.CP);
}
@Test
public void testSubstractionSparseSparseCP()
{
- runMatrixVectorCellwiseOperationTest(OpType.SUBSTRACTION, SparsityType.SPARSE, SparsityType.SPARSE, ExecType.CP);
+ runMatrixVectorCellwiseOperationTest(OpType.SUBTRACTION, SparsityType.SPARSE, SparsityType.SPARSE, ExecType.CP);
}
@Test
public void testSubstractionSparseEmptyCP()
{
- runMatrixVectorCellwiseOperationTest(OpType.SUBSTRACTION, SparsityType.SPARSE, SparsityType.EMPTY, ExecType.CP);
+ runMatrixVectorCellwiseOperationTest(OpType.SUBTRACTION, SparsityType.SPARSE, SparsityType.EMPTY, ExecType.CP);
}
@Test
public void testSubstractionEmptyDenseCP()
{
- runMatrixVectorCellwiseOperationTest(OpType.SUBSTRACTION, SparsityType.EMPTY, SparsityType.DENSE, ExecType.CP);
+ runMatrixVectorCellwiseOperationTest(OpType.SUBTRACTION, SparsityType.EMPTY, SparsityType.DENSE, ExecType.CP);
}
@Test
public void testSubstractionEmptySparseCP()
{
- runMatrixVectorCellwiseOperationTest(OpType.SUBSTRACTION, SparsityType.EMPTY, SparsityType.SPARSE, ExecType.CP);
+ runMatrixVectorCellwiseOperationTest(OpType.SUBTRACTION, SparsityType.EMPTY, SparsityType.SPARSE, ExecType.CP);
}
@Test
public void testSubstractionEmptyEmptyCP()
{
- runMatrixVectorCellwiseOperationTest(OpType.SUBSTRACTION, SparsityType.EMPTY, SparsityType.EMPTY, ExecType.CP);
+ runMatrixVectorCellwiseOperationTest(OpType.SUBTRACTION, SparsityType.EMPTY, SparsityType.EMPTY, ExecType.CP);
}
@Test
public void testSubstractionDenseDenseMR()
{
- runMatrixVectorCellwiseOperationTest(OpType.SUBSTRACTION, SparsityType.DENSE, SparsityType.DENSE, ExecType.MR);
+ runMatrixVectorCellwiseOperationTest(OpType.SUBTRACTION, SparsityType.DENSE, SparsityType.DENSE, ExecType.MR);
}
@Test
public void testSubstractionDenseSparseMR()
{
- runMatrixVectorCellwiseOperationTest(OpType.SUBSTRACTION, SparsityType.DENSE, SparsityType.SPARSE, ExecType.MR);
+ runMatrixVectorCellwiseOperationTest(OpType.SUBTRACTION, SparsityType.DENSE, SparsityType.SPARSE, ExecType.MR);
}
@Test
public void testSubstractionDenseEmptyMR()
{
- runMatrixVectorCellwiseOperationTest(OpType.SUBSTRACTION, SparsityType.DENSE, SparsityType.EMPTY, ExecType.MR);
+ runMatrixVectorCellwiseOperationTest(OpType.SUBTRACTION, SparsityType.DENSE, SparsityType.EMPTY, ExecType.MR);
}
@Test
public void testSubstractionSparseDenseMR()
{
- runMatrixVectorCellwiseOperationTest(OpType.SUBSTRACTION, SparsityType.SPARSE, SparsityType.DENSE, ExecType.MR);
+ runMatrixVectorCellwiseOperationTest(OpType.SUBTRACTION, SparsityType.SPARSE, SparsityType.DENSE, ExecType.MR);
}
@Test
public void testSubstractionSparseSparseMR()
{
- runMatrixVectorCellwiseOperationTest(OpType.SUBSTRACTION, SparsityType.SPARSE, SparsityType.SPARSE, ExecType.MR);
+ runMatrixVectorCellwiseOperationTest(OpType.SUBTRACTION, SparsityType.SPARSE, SparsityType.SPARSE, ExecType.MR);
}
@Test
public void testSubstractionSparseEmptyMR()
{
- runMatrixVectorCellwiseOperationTest(OpType.SUBSTRACTION, SparsityType.SPARSE, SparsityType.EMPTY, ExecType.MR);
+ runMatrixVectorCellwiseOperationTest(OpType.SUBTRACTION, SparsityType.SPARSE, SparsityType.EMPTY, ExecType.MR);
}
@Test
public void testSubstractionEmptyDenseMR()
{
- runMatrixVectorCellwiseOperationTest(OpType.SUBSTRACTION, SparsityType.EMPTY, SparsityType.DENSE, ExecType.MR);
+ runMatrixVectorCellwiseOperationTest(OpType.SUBTRACTION, SparsityType.EMPTY, SparsityType.DENSE, ExecType.MR);
}
@Test
public void testSubstractionEmptySparseMR()
{
- runMatrixVectorCellwiseOperationTest(OpType.SUBSTRACTION, SparsityType.EMPTY, SparsityType.SPARSE, ExecType.MR);
+ runMatrixVectorCellwiseOperationTest(OpType.SUBTRACTION, SparsityType.EMPTY, SparsityType.SPARSE, ExecType.MR);
}
@Test
public void testSubstractionEmptyEmptyMR()
{
- runMatrixVectorCellwiseOperationTest(OpType.SUBSTRACTION, SparsityType.EMPTY, SparsityType.EMPTY, ExecType.MR);
+ runMatrixVectorCellwiseOperationTest(OpType.SUBTRACTION, SparsityType.EMPTY, SparsityType.EMPTY, ExecType.MR);
}
@Test
@@ -746,27 +746,22 @@ public class FullMatrixVectorRowCellwiseOperationTest extends AutomatedTestBase
switch( type )
{
case ADDITION: TEST_NAME = TEST_NAME1; break;
- case SUBSTRACTION: TEST_NAME = TEST_NAME2; break;
+ case SUBTRACTION: TEST_NAME = TEST_NAME2; break;
case MULTIPLICATION: TEST_NAME = TEST_NAME3; break;
case DIVISION: TEST_NAME = TEST_NAME4; break;
}
TestConfiguration config = getTestConfiguration(TEST_NAME);
+ loadTestConfiguration(config);
/* This is for running the junit test the new way, i.e., construct the arguments directly */
String HOME = SCRIPT_DIR + TEST_DIR;
- String TARGET_IN = TEST_DATA_DIR + TEST_CLASS_DIR + INPUT_DIR;
- String TARGET_OUT = TEST_DATA_DIR + TEST_CLASS_DIR + OUTPUT_DIR;
- String TARGET_EXPECTED = TEST_DATA_DIR + TEST_CLASS_DIR + EXPECTED_DIR;
fullDMLScriptName = HOME + TEST_NAME + ".dml";
- programArgs = new String[]{"-explain","recompile_runtime","-args", TARGET_IN + "A",
- TARGET_IN + "B",
- TARGET_OUT + "C" };
- fullRScriptName = HOME + TEST_NAME + ".R";
- rCmd = "Rscript" + " " + fullRScriptName + " " +
- TARGET_IN + " " + TARGET_EXPECTED;
+ programArgs = new String[]{"-explain","recompile_runtime","-args",
+ input("A"), input("B"), output("C") };
- loadTestConfiguration(config);
+ fullRScriptName = HOME + TEST_NAME + ".R";
+ rCmd = "Rscript" + " " + fullRScriptName + " " + inputDir() + " " + expectedDir();
//get sparsity
double lsparsity1 = 1.0, lsparsity2 = 1.0;
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/44a718e3/src/test/java/com/ibm/bi/dml/test/integration/functions/binary/matrix_full_cellwise/FullMinus1MultTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/com/ibm/bi/dml/test/integration/functions/binary/matrix_full_cellwise/FullMinus1MultTest.java b/src/test/java/com/ibm/bi/dml/test/integration/functions/binary/matrix_full_cellwise/FullMinus1MultTest.java
index 2b9e547..c27ba69 100644
--- a/src/test/java/com/ibm/bi/dml/test/integration/functions/binary/matrix_full_cellwise/FullMinus1MultTest.java
+++ b/src/test/java/com/ibm/bi/dml/test/integration/functions/binary/matrix_full_cellwise/FullMinus1MultTest.java
@@ -51,7 +51,7 @@ public class FullMinus1MultTest extends AutomatedTestBase
@Override
public void setUp()
{
- addTestConfiguration(TEST_NAME, new TestConfiguration(TEST_CLASS_DIR, TEST_NAME,new String[]{"C"}));
+ addTestConfiguration(TEST_NAME, new TestConfiguration(TEST_CLASS_DIR, TEST_NAME, new String[]{"C"}));
}
@Test
@@ -126,22 +126,16 @@ public class FullMinus1MultTest extends AutomatedTestBase
try
{
TestConfiguration config = getTestConfiguration(TEST_NAME);
+ loadTestConfiguration(config);
// This is for running the junit test the new way, i.e., construct the arguments directly
String HOME = SCRIPT_DIR + TEST_DIR;
- String TARGET_IN = TEST_DATA_DIR + TEST_CLASS_DIR + INPUT_DIR;
- String TARGET_OUT = TEST_DATA_DIR + TEST_CLASS_DIR + OUTPUT_DIR;
- String TARGET_EXPECTED = TEST_DATA_DIR + TEST_CLASS_DIR + EXPECTED_DIR;
fullDMLScriptName = HOME + TEST_NAME + ".dml";
programArgs = new String[]{"-stats", "-args", //stats required for opcode check
- TARGET_IN + "A",
- TARGET_IN + "B",
- TARGET_OUT + "C" };
- fullRScriptName = HOME + TEST_NAME + ".R";
- rCmd = "Rscript" + " " + fullRScriptName + " " +
- TARGET_IN + " " + TARGET_EXPECTED;
+ input("A"), input("B"), output("C") };
- loadTestConfiguration(config);
+ fullRScriptName = HOME + TEST_NAME + ".R";
+ rCmd = "Rscript" + " " + fullRScriptName + " " + inputDir() + " " + expectedDir();
//generate input datasets
double[][] A = getRandomMatrix((posScalar!=1)?rows:1, 1, -1, 1, (posScalar!=1)?sparsity1:1, 101);
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/44a718e3/src/test/java/com/ibm/bi/dml/test/integration/functions/binary/matrix_full_cellwise/FullVectorVectorCellwiseCompareOperationTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/com/ibm/bi/dml/test/integration/functions/binary/matrix_full_cellwise/FullVectorVectorCellwiseCompareOperationTest.java b/src/test/java/com/ibm/bi/dml/test/integration/functions/binary/matrix_full_cellwise/FullVectorVectorCellwiseCompareOperationTest.java
index f6b52b7..a693d5d 100644
--- a/src/test/java/com/ibm/bi/dml/test/integration/functions/binary/matrix_full_cellwise/FullVectorVectorCellwiseCompareOperationTest.java
+++ b/src/test/java/com/ibm/bi/dml/test/integration/functions/binary/matrix_full_cellwise/FullVectorVectorCellwiseCompareOperationTest.java
@@ -66,7 +66,7 @@ public class FullVectorVectorCellwiseCompareOperationTest extends AutomatedTestB
@Override
public void setUp()
{
- addTestConfiguration(TEST_NAME,new TestConfiguration(TEST_CLASS_DIR, TEST_NAME,new String[]{"C"}));
+ addTestConfiguration(TEST_NAME, new TestConfiguration(TEST_CLASS_DIR, TEST_NAME, new String[]{"C"}));
}
@@ -196,13 +196,11 @@ public class FullVectorVectorCellwiseCompareOperationTest extends AutomatedTestB
String HOME = SCRIPT_DIR + TEST_DIR;
fullDMLScriptName = HOME + TEST_NAME + ".dml";
programArgs = new String[]{"-stats", "-explain","recompile_runtime","-args",
- input("A"),
- input("B"),
- opcode,
- output("C") };
+ input("A"), input("B"), opcode, output("C") };
+
fullRScriptName = HOME + TEST_NAME + ".R";
rCmd = "Rscript" + " " + fullRScriptName + " " +
- inputDir() + " " + opcoder + " " + expectedDir();
+ inputDir() + " " + opcoder + " " + expectedDir();
//get sparsity
double lsparsity1 = 1.0, lsparsity2 = 1.0;
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/44a718e3/src/test/java/com/ibm/bi/dml/test/integration/functions/binary/matrix_full_cellwise/FullVectorVectorCellwiseOperationTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/com/ibm/bi/dml/test/integration/functions/binary/matrix_full_cellwise/FullVectorVectorCellwiseOperationTest.java b/src/test/java/com/ibm/bi/dml/test/integration/functions/binary/matrix_full_cellwise/FullVectorVectorCellwiseOperationTest.java
index c3b1206..3fdf5be 100644
--- a/src/test/java/com/ibm/bi/dml/test/integration/functions/binary/matrix_full_cellwise/FullVectorVectorCellwiseOperationTest.java
+++ b/src/test/java/com/ibm/bi/dml/test/integration/functions/binary/matrix_full_cellwise/FullVectorVectorCellwiseOperationTest.java
@@ -63,7 +63,7 @@ public class FullVectorVectorCellwiseOperationTest extends AutomatedTestBase
@Override
public void setUp()
{
- addTestConfiguration(TEST_NAME,new TestConfiguration(TEST_CLASS_DIR, TEST_NAME,new String[]{"C"}));
+ addTestConfiguration(TEST_NAME, new TestConfiguration(TEST_CLASS_DIR, TEST_NAME, new String[]{"C"}));
}
@Test
@@ -749,23 +749,17 @@ public class FullVectorVectorCellwiseOperationTest extends AutomatedTestBase
}
TestConfiguration config = getTestConfiguration(TEST_NAME);
+ loadTestConfiguration(config);
String HOME = SCRIPT_DIR + TEST_DIR;
- String TARGET_IN = TEST_DATA_DIR + TEST_CLASS_DIR + INPUT_DIR;
- String TARGET_OUT = TEST_DATA_DIR + TEST_CLASS_DIR + OUTPUT_DIR;
- String TARGET_EXPECTED = TEST_DATA_DIR + TEST_CLASS_DIR + EXPECTED_DIR;
fullDMLScriptName = HOME + TEST_NAME + ".dml";
- programArgs = new String[]{"-explain","recompile_runtime","-args",
- TARGET_IN + "A",
- TARGET_IN + "B",
- opcode,
- TARGET_OUT + "C" };
+ programArgs = new String[]{"-explain","recompile_runtime","-args",
+ input("A"), input("B"), opcode, output("C") };
+
fullRScriptName = HOME + TEST_NAME + ".R";
rCmd = "Rscript" + " " + fullRScriptName + " " +
- TARGET_IN + " " + opcoder + " " + TARGET_EXPECTED;
+ inputDir() + " " + opcoder + " " + expectedDir();
- loadTestConfiguration(config);
-
//get sparsity
double lsparsity1 = 1.0, lsparsity2 = 1.0;
switch( sparseM1 ){
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/44a718e3/src/test/java/com/ibm/bi/dml/test/integration/functions/binary/matrix_full_other/FullDistributedMatrixMultiplicationTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/com/ibm/bi/dml/test/integration/functions/binary/matrix_full_other/FullDistributedMatrixMultiplicationTest.java b/src/test/java/com/ibm/bi/dml/test/integration/functions/binary/matrix_full_other/FullDistributedMatrixMultiplicationTest.java
index 1528489..5198b9e 100644
--- a/src/test/java/com/ibm/bi/dml/test/integration/functions/binary/matrix_full_other/FullDistributedMatrixMultiplicationTest.java
+++ b/src/test/java/com/ibm/bi/dml/test/integration/functions/binary/matrix_full_other/FullDistributedMatrixMultiplicationTest.java
@@ -19,6 +19,7 @@ package com.ibm.bi.dml.test.integration.functions.binary.matrix_full_other;
import java.util.HashMap;
+import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
@@ -53,10 +54,8 @@ public class FullDistributedMatrixMultiplicationTest extends AutomatedTestBase
public void setUp()
{
TestUtils.clearAssertionInformation();
- addTestConfiguration(
- TEST_NAME,
- new TestConfiguration(TEST_CLASS_DIR, TEST_NAME,
- new String[] { "C" }) );
+ addTestConfiguration(TEST_NAME,
+ new TestConfiguration(TEST_CLASS_DIR, TEST_NAME, new String[] { "C" }) );
if (TEST_CACHE_ENABLED) {
setOutAndExpectedDeletionDisabled(true);
}
@@ -67,6 +66,14 @@ public class FullDistributedMatrixMultiplicationTest extends AutomatedTestBase
{
TestUtils.clearDirectory(TEST_DATA_DIR + TEST_CLASS_DIR);
}
+
+ @AfterClass
+ public static void cleanUp()
+ {
+ if (TEST_CACHE_ENABLED) {
+ TestUtils.clearDirectory(TEST_DATA_DIR + TEST_CLASS_DIR);
+ }
+ }
@Test
public void testDenseDenseMapmmMR()
@@ -248,20 +255,15 @@ public class FullDistributedMatrixMultiplicationTest extends AutomatedTestBase
TEST_CACHE_DIR = String.valueOf(sparsityA) + "_" + String.valueOf(sparsityB) + "/";
}
+ loadTestConfiguration(config, TEST_CACHE_DIR);
+
/* This is for running the junit test the new way, i.e., construct the arguments directly */
String HOME = SCRIPT_DIR + TEST_DIR;
- String TARGET_IN = TEST_DATA_DIR + TEST_CLASS_DIR + INPUT_DIR;
- String TARGET_OUT = TEST_DATA_DIR + TEST_CLASS_DIR + OUTPUT_DIR;
- String TARGET_EXPECTED = TEST_DATA_DIR + TEST_CLASS_DIR + EXPECTED_DIR + TEST_CACHE_DIR;
fullDMLScriptName = HOME + TEST_NAME + ".dml";
- programArgs = new String[]{"-args", TARGET_IN + "A",
- TARGET_IN + "B",
- TARGET_OUT + "C" };
- fullRScriptName = HOME + TEST_NAME + ".R";
- rCmd = "Rscript" + " " + fullRScriptName + " " +
- TARGET_IN + " " + TARGET_EXPECTED;
+ programArgs = new String[]{"-args", input("A"), input("B"), output("C") };
- loadTestConfiguration(config, TEST_CACHE_DIR);
+ fullRScriptName = HOME + TEST_NAME + ".R";
+ rCmd = "Rscript" + " " + fullRScriptName + " " + inputDir() + " " + expectedDir();
//generate actual dataset
double[][] A = getRandomMatrix(rowsA, colsA, 0, 1, sparsityA, 12357);
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/44a718e3/src/test/java/com/ibm/bi/dml/test/integration/functions/binary/matrix_full_other/FullIntegerDivisionTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/com/ibm/bi/dml/test/integration/functions/binary/matrix_full_other/FullIntegerDivisionTest.java b/src/test/java/com/ibm/bi/dml/test/integration/functions/binary/matrix_full_other/FullIntegerDivisionTest.java
index 57d015e..42f7cee 100644
--- a/src/test/java/com/ibm/bi/dml/test/integration/functions/binary/matrix_full_other/FullIntegerDivisionTest.java
+++ b/src/test/java/com/ibm/bi/dml/test/integration/functions/binary/matrix_full_other/FullIntegerDivisionTest.java
@@ -20,6 +20,7 @@ package com.ibm.bi.dml.test.integration.functions.binary.matrix_full_other;
import java.io.IOException;
import java.util.HashMap;
+import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
@@ -76,6 +77,14 @@ public class FullIntegerDivisionTest extends AutomatedTestBase
TestUtils.clearDirectory(TEST_DATA_DIR + TEST_CLASS_DIR);
}
+ @AfterClass
+ public static void cleanUp()
+ {
+ if (TEST_CACHE_ENABLED) {
+ TestUtils.clearDirectory(TEST_DATA_DIR + TEST_CLASS_DIR);
+ }
+ }
+
//MOD
@Test
@@ -318,27 +327,21 @@ public class FullIntegerDivisionTest extends AutomatedTestBase
}
TestConfiguration config = getTestConfiguration(TEST_NAME);
+ loadTestConfiguration(config, TEST_CACHE_DIR);
/* This is for running the junit test the new way, i.e., construct the arguments directly */
String HOME = SCRIPT_DIR + TEST_DIR;
- String TARGET_IN = TEST_DATA_DIR + TEST_CLASS_DIR + INPUT_DIR;
- String TARGET_OUT = TEST_DATA_DIR + TEST_CLASS_DIR + OUTPUT_DIR;
- String TARGET_EXPECTED = TEST_DATA_DIR + TEST_CLASS_DIR + EXPECTED_DIR + TEST_CACHE_DIR;
fullDMLScriptName = HOME + TEST_NAME + ".dml";
- programArgs = new String[]{"-args", TARGET_IN + "A",
- TARGET_IN + "B",
- TARGET_OUT + "C" };
- fullRScriptName = HOME + TEST_NAME + ".R";
- rCmd = "Rscript" + " " + fullRScriptName + " " +
- TARGET_IN + " " + TARGET_EXPECTED;
+ programArgs = new String[]{"-args", input("A"), input("B"), output("C") };
- loadTestConfiguration(config, TEST_CACHE_DIR);
+ fullRScriptName = HOME + TEST_NAME + ".R";
+ rCmd = "Rscript" + " " + fullRScriptName + " " + inputDir() + " " + expectedDir();
if( dt1 == DataType.SCALAR && dt2 == DataType.SCALAR ) {
// Clear OUT folder to prevent access denied errors running DML script
// for tests testModSSDense, testDivSSDense, testModSSSparse, testDivSSSparse
// due to setOutAndExpectedDeletionDisabled(true).
- TestUtils.clearDirectory(TARGET_OUT);
+ TestUtils.clearDirectory(outputDir());
}
//generate dataset A
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/44a718e3/src/test/java/com/ibm/bi/dml/test/integration/functions/binary/matrix_full_other/FullMatrixMultiplicationTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/com/ibm/bi/dml/test/integration/functions/binary/matrix_full_other/FullMatrixMultiplicationTest.java b/src/test/java/com/ibm/bi/dml/test/integration/functions/binary/matrix_full_other/FullMatrixMultiplicationTest.java
index 607fef8..67182af 100644
--- a/src/test/java/com/ibm/bi/dml/test/integration/functions/binary/matrix_full_other/FullMatrixMultiplicationTest.java
+++ b/src/test/java/com/ibm/bi/dml/test/integration/functions/binary/matrix_full_other/FullMatrixMultiplicationTest.java
@@ -19,6 +19,7 @@ package com.ibm.bi.dml.test.integration.functions.binary.matrix_full_other;
import java.util.HashMap;
+import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
@@ -63,6 +64,14 @@ public class FullMatrixMultiplicationTest extends AutomatedTestBase
{
TestUtils.clearDirectory(TEST_DATA_DIR + TEST_CLASS_DIR);
}
+
+ @AfterClass
+ public static void cleanUp()
+ {
+ if (TEST_CACHE_ENABLED) {
+ TestUtils.clearDirectory(TEST_DATA_DIR + TEST_CLASS_DIR);
+ }
+ }
@Test
public void testMMDenseDenseCP()
@@ -386,24 +395,16 @@ public class FullMatrixMultiplicationTest extends AutomatedTestBase
TEST_CACHE_DIR = "vm" + String.valueOf(sparsityA) + "_" + String.valueOf(sparsityB) + "/";
}
+ loadTestConfiguration(config, TEST_CACHE_DIR);
+
/* This is for running the junit test the new way, i.e., construct the arguments directly */
String HOME = SCRIPT_DIR + TEST_DIR;
- String TARGET_IN = TEST_DATA_DIR + TEST_CLASS_DIR + INPUT_DIR;
- String TARGET_OUT = TEST_DATA_DIR + TEST_CLASS_DIR + OUTPUT_DIR;
- String TARGET_EXPECTED = TEST_DATA_DIR + TEST_CLASS_DIR + EXPECTED_DIR + TEST_CACHE_DIR;
fullDMLScriptName = HOME + TEST_NAME + ".dml";
- programArgs = new String[]{"-args", TARGET_IN + "A",
- Integer.toString(1),
- Integer.toString(colsA),
- TARGET_IN + "B",
- Integer.toString(rowsB),
- Integer.toString(colsB),
- TARGET_OUT + "C" };
- fullRScriptName = HOME + TEST_NAME + ".R";
- rCmd = "Rscript" + " " + fullRScriptName + " " +
- TARGET_IN + " " + TARGET_EXPECTED;
+ programArgs = new String[]{"-args", input("A"), Integer.toString(1), Integer.toString(colsA),
+ input("B"), Integer.toString(rowsB), Integer.toString(colsB), output("C") };
- loadTestConfiguration(config, TEST_CACHE_DIR);
+ fullRScriptName = HOME + TEST_NAME + ".R";
+ rCmd = "Rscript" + " " + fullRScriptName + " " + inputDir() + " " + expectedDir();
//generate actual dataset
double[][] A = getRandomMatrix(1, colsA, 0, 1, sparsityA, 7);
@@ -455,25 +456,17 @@ public class FullMatrixMultiplicationTest extends AutomatedTestBase
if (TEST_CACHE_ENABLED) {
TEST_CACHE_DIR = "vv" + rows1 + "_" + cols1 + "_" + rows2 + "_" + cols2 + "_" + String.valueOf(sparsityA) + "/";
}
+
+ loadTestConfiguration(config, TEST_CACHE_DIR);
/* This is for running the junit test the new way, i.e., construct the arguments directly */
String HOME = SCRIPT_DIR + TEST_DIR;
- String TARGET_IN = TEST_DATA_DIR + TEST_CLASS_DIR + INPUT_DIR;
- String TARGET_OUT = TEST_DATA_DIR + TEST_CLASS_DIR + OUTPUT_DIR;
- String TARGET_EXPECTED = TEST_DATA_DIR + TEST_CLASS_DIR + EXPECTED_DIR + TEST_CACHE_DIR;
fullDMLScriptName = HOME + TEST_NAME + ".dml";
- programArgs = new String[]{"-args", TARGET_IN + "A",
- Integer.toString(rows1),
- Integer.toString(cols1),
- TARGET_IN + "B",
- Integer.toString(rows2),
- Integer.toString(cols2),
- TARGET_OUT + "C" };
- fullRScriptName = HOME + TEST_NAME + ".R";
- rCmd = "Rscript" + " " + fullRScriptName + " " +
- TARGET_IN + " " + TARGET_EXPECTED;
+ programArgs = new String[]{"-args", input("A"), Integer.toString(rows1), Integer.toString(cols1),
+ input("B"), Integer.toString(rows2), Integer.toString(cols2), output("C") };
- loadTestConfiguration(config, TEST_CACHE_DIR);
+ fullRScriptName = HOME + TEST_NAME + ".R";
+ rCmd = "Rscript" + " " + fullRScriptName + " " + inputDir() + " " + expectedDir();
//generate actual dataset
double[][] A = getRandomMatrix(rows1, cols1, 0, 1, sparsityA, 7);
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/44a718e3/src/test/java/com/ibm/bi/dml/test/integration/functions/binary/matrix_full_other/FullMatrixMultiplicationTransposeSelfTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/com/ibm/bi/dml/test/integration/functions/binary/matrix_full_other/FullMatrixMultiplicationTransposeSelfTest.java b/src/test/java/com/ibm/bi/dml/test/integration/functions/binary/matrix_full_other/FullMatrixMultiplicationTransposeSelfTest.java
index 31f5699..b3c1496 100644
--- a/src/test/java/com/ibm/bi/dml/test/integration/functions/binary/matrix_full_other/FullMatrixMultiplicationTransposeSelfTest.java
+++ b/src/test/java/com/ibm/bi/dml/test/integration/functions/binary/matrix_full_other/FullMatrixMultiplicationTransposeSelfTest.java
@@ -19,6 +19,7 @@ package com.ibm.bi.dml.test.integration.functions.binary.matrix_full_other;
import java.util.HashMap;
+import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
@@ -33,7 +34,6 @@ import com.ibm.bi.dml.test.utils.TestUtils;
public class FullMatrixMultiplicationTransposeSelfTest extends AutomatedTestBase
{
-
private final static String TEST_NAME1 = "TransposeSelfMatrixMultiplication1";
private final static String TEST_NAME2 = "TransposeSelfMatrixMultiplication2";
private final static String TEST_DIR = "functions/binary/matrix_full_other/";
@@ -51,8 +51,6 @@ public class FullMatrixMultiplicationTransposeSelfTest extends AutomatedTestBase
private final static double sparsity2 = 0.1;
-
-
@Override
public void setUp()
{
@@ -75,6 +73,14 @@ public class FullMatrixMultiplicationTransposeSelfTest extends AutomatedTestBase
TestUtils.clearDirectory(TEST_DATA_DIR + TEST_CLASS_DIR);
}
+ @AfterClass
+ public static void cleanUp()
+ {
+ if (TEST_CACHE_ENABLED) {
+ TestUtils.clearDirectory(TEST_DATA_DIR + TEST_CLASS_DIR);
+ }
+ }
+
@Test
public void testMMLeftDenseCP()
{
@@ -219,27 +225,20 @@ public class FullMatrixMultiplicationTransposeSelfTest extends AutomatedTestBase
try
{
TestConfiguration config = getTestConfiguration(TEST_NAME);
+ loadTestConfiguration(config, TEST_CACHE_DIR);
/* This is for running the junit test the new way, i.e., construct the arguments directly */
String HOME = SCRIPT_DIR + TEST_DIR;
- String TARGET_IN = TEST_DATA_DIR + TEST_CLASS_DIR + INPUT_DIR;
- String TARGET_OUT = TEST_DATA_DIR + TEST_CLASS_DIR + OUTPUT_DIR;
- String TARGET_EXPECTED = TEST_DATA_DIR + TEST_CLASS_DIR + EXPECTED_DIR + TEST_CACHE_DIR;
fullDMLScriptName = HOME + TEST_NAME + ".dml";
- programArgs = new String[]{"-args", TARGET_IN + "A" ,
- Integer.toString(rows),
- Integer.toString(cols),
- TARGET_OUT + "B" };
- fullRScriptName = HOME + TEST_NAME + ".R";
- rCmd = "Rscript" + " " + fullRScriptName + " " +
- TARGET_IN + " " + TARGET_EXPECTED;
+ programArgs = new String[]{"-args", input("A"),
+ Integer.toString(rows), Integer.toString(cols), output("B") };
- loadTestConfiguration(config, TEST_CACHE_DIR);
+ fullRScriptName = HOME + TEST_NAME + ".R";
+ rCmd = "Rscript" + " " + fullRScriptName + " " + inputDir() + " " + expectedDir();
//generate actual dataset
double[][] A = getRandomMatrix(rows, cols, 0, 1, sparsity, 7);
writeInputMatrix("A", A, true);
-
boolean exceptionExpected = false;
runTest(true, exceptionExpected, null, -1);
@@ -304,27 +303,20 @@ public class FullMatrixMultiplicationTransposeSelfTest extends AutomatedTestBase
try
{
TestConfiguration config = getTestConfiguration(TEST_NAME);
+ loadTestConfiguration(config, TEST_CACHE_DIR);
/* This is for running the junit test the new way, i.e., construct the arguments directly */
String HOME = SCRIPT_DIR + TEST_DIR;
- String TARGET_IN = TEST_DATA_DIR + TEST_CLASS_DIR + INPUT_DIR;
- String TARGET_OUT = TEST_DATA_DIR + TEST_CLASS_DIR + OUTPUT_DIR;
- String TARGET_EXPECTED = TEST_DATA_DIR + TEST_CLASS_DIR + EXPECTED_DIR + TEST_CACHE_DIR;
fullDMLScriptName = HOME + TEST_NAME + ".dml";
- programArgs = new String[]{"-args", TARGET_IN + "A" ,
- Integer.toString(rows),
- Integer.toString(cols),
- TARGET_OUT + "B" };
- fullRScriptName = HOME + TEST_NAME + ".R";
- rCmd = "Rscript" + " " + fullRScriptName + " " +
- TARGET_IN + " " + TARGET_EXPECTED;
+ programArgs = new String[]{"-args", input("A"),
+ Integer.toString(rows), Integer.toString(cols), output("B") };
- loadTestConfiguration(config, TEST_CACHE_DIR);
+ fullRScriptName = HOME + TEST_NAME + ".R";
+ rCmd = "Rscript" + " " + fullRScriptName + " " + inputDir() + " " + expectedDir();
//generate actual dataset
double[][] A = getRandomMatrix(rows, cols, 0, 1, sparsity, 7);
writeInputMatrix("A", A, true);
-
boolean exceptionExpected = false;
runTest(true, exceptionExpected, null, -1);
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/44a718e3/src/test/java/com/ibm/bi/dml/test/integration/functions/binary/matrix_full_other/FullMatrixMultiplicationUltraSparseTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/com/ibm/bi/dml/test/integration/functions/binary/matrix_full_other/FullMatrixMultiplicationUltraSparseTest.java b/src/test/java/com/ibm/bi/dml/test/integration/functions/binary/matrix_full_other/FullMatrixMultiplicationUltraSparseTest.java
index 50620cd..30f4534 100644
--- a/src/test/java/com/ibm/bi/dml/test/integration/functions/binary/matrix_full_other/FullMatrixMultiplicationUltraSparseTest.java
+++ b/src/test/java/com/ibm/bi/dml/test/integration/functions/binary/matrix_full_other/FullMatrixMultiplicationUltraSparseTest.java
@@ -19,6 +19,7 @@ package com.ibm.bi.dml.test.integration.functions.binary.matrix_full_other;
import java.util.HashMap;
+import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
@@ -71,6 +72,14 @@ public class FullMatrixMultiplicationUltraSparseTest extends AutomatedTestBase
TestUtils.clearDirectory(TEST_DATA_DIR + TEST_CLASS_DIR);
}
+ @AfterClass
+ public static void cleanUp()
+ {
+ if (TEST_CACHE_ENABLED) {
+ TestUtils.clearDirectory(TEST_DATA_DIR + TEST_CLASS_DIR);
+ }
+ }
+
@Test
public void testMMDenseUltraSparseCP()
{
@@ -157,24 +166,16 @@ public class FullMatrixMultiplicationUltraSparseTest extends AutomatedTestBase
TEST_CACHE_DIR = String.valueOf(sparsityLeft) + "_" + String.valueOf(sparsityRight) + "/";
}
+ loadTestConfiguration(config, TEST_CACHE_DIR);
+
/* This is for running the junit test the new way, i.e., construct the arguments directly */
String HOME = SCRIPT_DIR + TEST_DIR;
- String TARGET_IN = TEST_DATA_DIR + TEST_CLASS_DIR + INPUT_DIR;
- String TARGET_OUT = TEST_DATA_DIR + TEST_CLASS_DIR + OUTPUT_DIR;
- String TARGET_EXPECTED = TEST_DATA_DIR + TEST_CLASS_DIR + EXPECTED_DIR + TEST_CACHE_DIR;
fullDMLScriptName = HOME + TEST_NAME + ".dml";
- programArgs = new String[]{"-args", TARGET_IN + "A",
- Integer.toString(rowsA),
- Integer.toString(colsA),
- TARGET_IN + "B",
- Integer.toString(rowsB),
- Integer.toString(colsB),
- TARGET_OUT + "C" };
- fullRScriptName = HOME + TEST_NAME + ".R";
- rCmd = "Rscript" + " " + fullRScriptName + " " +
- TARGET_IN + " " + TARGET_EXPECTED;
+ programArgs = new String[]{"-args", input("A"), Integer.toString(rowsA), Integer.toString(colsA),
+ input("B"), Integer.toString(rowsB), Integer.toString(colsB), output("C") };
- loadTestConfiguration(config, TEST_CACHE_DIR);
+ fullRScriptName = HOME + TEST_NAME + ".R";
+ rCmd = "Rscript" + " " + fullRScriptName + " " + inputDir() + " " + expectedDir();
//generate actual dataset
double[][] A = getRandomMatrix(rowsA, colsA, 0, 1, sparsityLeft, 7);
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/44a718e3/src/test/java/com/ibm/bi/dml/test/integration/functions/binary/matrix_full_other/FullMinMaxComparisonTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/com/ibm/bi/dml/test/integration/functions/binary/matrix_full_other/FullMinMaxComparisonTest.java b/src/test/java/com/ibm/bi/dml/test/integration/functions/binary/matrix_full_other/FullMinMaxComparisonTest.java
index 79a530a..408fba7 100644
--- a/src/test/java/com/ibm/bi/dml/test/integration/functions/binary/matrix_full_other/FullMinMaxComparisonTest.java
+++ b/src/test/java/com/ibm/bi/dml/test/integration/functions/binary/matrix_full_other/FullMinMaxComparisonTest.java
@@ -20,6 +20,7 @@ package com.ibm.bi.dml.test.integration.functions.binary.matrix_full_other;
import java.io.IOException;
import java.util.HashMap;
+import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
@@ -77,6 +78,14 @@ public class FullMinMaxComparisonTest extends AutomatedTestBase
TestUtils.clearDirectory(TEST_DATA_DIR + TEST_CLASS_DIR);
}
+ @AfterClass
+ public static void cleanUp()
+ {
+ if (TEST_CACHE_ENABLED) {
+ TestUtils.clearDirectory(TEST_DATA_DIR + TEST_CLASS_DIR);
+ }
+ }
+
@Test
public void testMinMatrixDenseMatrixDenseCP()
{
@@ -335,24 +344,17 @@ public class FullMinMaxComparisonTest extends AutomatedTestBase
try
{
-
TestConfiguration config = getTestConfiguration(TEST_NAME);
+ loadTestConfiguration(config, TEST_CACHE_DIR);
// This is for running the junit test the new way, i.e., construct the arguments directly
String HOME = SCRIPT_DIR + TEST_DIR;
- String TARGET_IN = TEST_DATA_DIR + TEST_CLASS_DIR + INPUT_DIR;
- String TARGET_OUT = TEST_DATA_DIR + TEST_CLASS_DIR + OUTPUT_DIR;
- String TARGET_EXPECTED = TEST_DATA_DIR + TEST_CLASS_DIR + EXPECTED_DIR + TEST_CACHE_DIR;
fullDMLScriptName = HOME + TEST_NAME + ".dml";
- programArgs = new String[]{"-explain","-args", TARGET_IN + "A",
- TARGET_IN + "B",
- Integer.toString(minFlag),
- TARGET_OUT + "C" };
- fullRScriptName = HOME + TEST_NAME_R + ".R";
- rCmd = "Rscript" + " " + fullRScriptName + " " +
- TARGET_IN + " " + minFlag + " " + TARGET_EXPECTED;
+ programArgs = new String[]{"-explain","-args", input("A"), input("B"),
+ Integer.toString(minFlag), output("C") };
- loadTestConfiguration(config, TEST_CACHE_DIR);
+ fullRScriptName = HOME + TEST_NAME_R + ".R";
+ rCmd = "Rscript" + " " + fullRScriptName + " " + inputDir() + " " + minFlag + " " + expectedDir();
//generate actual dataset
int mrows1 = (dtM1==DataType.MATRIX)? rows:1;
@@ -362,12 +364,12 @@ public class FullMinMaxComparisonTest extends AutomatedTestBase
double[][] A = getRandomMatrix(mrows1, mcols1, -1, 1, sparseM1?sparsity2:sparsity1, 7);
writeInputMatrix("A", A, true);
MatrixCharacteristics mc1 = new MatrixCharacteristics(mrows1,mcols1,1000,1000);
- MapReduceTool.writeMetaDataFile(TARGET_IN + "A.mtd", ValueType.DOUBLE, mc1, OutputInfo.TextCellOutputInfo);
+ MapReduceTool.writeMetaDataFile(input("A.mtd"), ValueType.DOUBLE, mc1, OutputInfo.TextCellOutputInfo);
double[][] B = getRandomMatrix(mrows2, mcols2, -1, 1, sparseM2?sparsity2:sparsity1, 3);
writeInputMatrix("B", B, true);
MatrixCharacteristics mc2 = new MatrixCharacteristics(mrows2,mcols2,1000,1000);
- MapReduceTool.writeMetaDataFile(TARGET_IN + "B.mtd", ValueType.DOUBLE, mc2, OutputInfo.TextCellOutputInfo);
+ MapReduceTool.writeMetaDataFile(input("B.mtd"), ValueType.DOUBLE, mc2, OutputInfo.TextCellOutputInfo);
//run test
runTest(true, false, null, -1);
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/44a718e3/src/test/java/com/ibm/bi/dml/test/integration/functions/binary/matrix_full_other/FullPPredMatrixTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/com/ibm/bi/dml/test/integration/functions/binary/matrix_full_other/FullPPredMatrixTest.java b/src/test/java/com/ibm/bi/dml/test/integration/functions/binary/matrix_full_other/FullPPredMatrixTest.java
index 1f649ff..c9166cd 100644
--- a/src/test/java/com/ibm/bi/dml/test/integration/functions/binary/matrix_full_other/FullPPredMatrixTest.java
+++ b/src/test/java/com/ibm/bi/dml/test/integration/functions/binary/matrix_full_other/FullPPredMatrixTest.java
@@ -19,6 +19,7 @@ package com.ibm.bi.dml.test.integration.functions.binary.matrix_full_other;
import java.util.HashMap;
+import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
@@ -73,6 +74,14 @@ public class FullPPredMatrixTest extends AutomatedTestBase
{
TestUtils.clearDirectory(TEST_DATA_DIR + TEST_CLASS_DIR);
}
+
+ @AfterClass
+ public static void cleanUp()
+ {
+ if (TEST_CACHE_ENABLED) {
+ TestUtils.clearDirectory(TEST_DATA_DIR + TEST_CLASS_DIR);
+ }
+ }
@Test
public void testPPredGreaterDenseDenseCP()
@@ -544,22 +553,16 @@ public class FullPPredMatrixTest extends AutomatedTestBase
try
{
TestConfiguration config = getTestConfiguration(TEST_NAME);
+ loadTestConfiguration(config, TEST_CACHE_DIR);
/* This is for running the junit test the new way, i.e., construct the arguments directly */
String HOME = SCRIPT_DIR + TEST_DIR;
- String TARGET_IN = TEST_DATA_DIR + TEST_CLASS_DIR + INPUT_DIR;
- String TARGET_OUT = TEST_DATA_DIR + TEST_CLASS_DIR + OUTPUT_DIR;
- String TARGET_EXPECTED = TEST_DATA_DIR + TEST_CLASS_DIR + EXPECTED_DIR + TEST_CACHE_DIR;
fullDMLScriptName = HOME + TEST_NAME + ".dml";
- programArgs = new String[]{"-args", TARGET_IN + "A",
- TARGET_IN + "B",
- Integer.toString(type.ordinal()),
- TARGET_OUT + "C" };
- fullRScriptName = HOME + TEST_NAME + ".R";
- rCmd = "Rscript" + " " + fullRScriptName + " " +
- TARGET_IN + " " + type.ordinal() + " " + TARGET_EXPECTED;
+ programArgs = new String[]{"-args", input("A"), input("B"),
+ Integer.toString(type.ordinal()), output("C") };
- loadTestConfiguration(config, TEST_CACHE_DIR);
+ fullRScriptName = HOME + TEST_NAME + ".R";
+ rCmd = "Rscript" + " " + fullRScriptName + " " + inputDir() + " " + type.ordinal() + " " + expectedDir();
//generate actual dataset
double[][] A = getRandomMatrix(rows, cols, -10, 10, sparsityLeft, 7);
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/44a718e3/src/test/java/com/ibm/bi/dml/test/integration/functions/binary/matrix_full_other/FullPPredScalarLeftTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/com/ibm/bi/dml/test/integration/functions/binary/matrix_full_other/FullPPredScalarLeftTest.java b/src/test/java/com/ibm/bi/dml/test/integration/functions/binary/matrix_full_other/FullPPredScalarLeftTest.java
index efce476..28b91d4 100644
--- a/src/test/java/com/ibm/bi/dml/test/integration/functions/binary/matrix_full_other/FullPPredScalarLeftTest.java
+++ b/src/test/java/com/ibm/bi/dml/test/integration/functions/binary/matrix_full_other/FullPPredScalarLeftTest.java
@@ -19,6 +19,7 @@ package com.ibm.bi.dml.test.integration.functions.binary.matrix_full_other;
import java.util.HashMap;
+import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
@@ -67,6 +68,14 @@ public class FullPPredScalarLeftTest extends AutomatedTestBase
TestUtils.clearDirectory(TEST_DATA_DIR + TEST_CLASS_DIR);
}
+ @AfterClass
+ public static void cleanUp()
+ {
+ if (TEST_CACHE_ENABLED) {
+ TestUtils.clearDirectory(TEST_DATA_DIR + TEST_CLASS_DIR);
+ }
+ }
+
@Override
public void setUp()
{
@@ -393,21 +402,17 @@ public class FullPPredScalarLeftTest extends AutomatedTestBase
{
TestConfiguration config = getTestConfiguration(TEST_NAME);
+ loadTestConfiguration(config, TEST_CACHE_DIR);
+
/* This is for running the junit test the new way, i.e., construct the arguments directly */
String HOME = SCRIPT_DIR + TEST_DIR;
- String TARGET_IN = TEST_DATA_DIR + TEST_CLASS_DIR + INPUT_DIR;
- String TARGET_OUT = TEST_DATA_DIR + TEST_CLASS_DIR + OUTPUT_DIR;
- String TARGET_EXPECTED = TEST_DATA_DIR + TEST_CLASS_DIR + EXPECTED_DIR + TEST_CACHE_DIR;
fullDMLScriptName = HOME + TEST_NAME + ".dml";
- programArgs = new String[]{"-explain","-args", TARGET_IN + "A" ,
- Integer.toString(type.ordinal()),
- Double.toString(constant),
- TARGET_OUT + "B" };
- fullRScriptName = HOME + TEST_NAME + ".R";
- rCmd = "Rscript" + " " + fullRScriptName + " " +
- TARGET_IN + " " + type.ordinal() + " " + constant + " " + TARGET_EXPECTED;
+ programArgs = new String[]{"-explain","-args", input("A"),
+ Integer.toString(type.ordinal()), Double.toString(constant), output("B") };
- loadTestConfiguration(config, TEST_CACHE_DIR);
+ fullRScriptName = HOME + TEST_NAME + ".R";
+ rCmd = "Rscript" + " " + fullRScriptName + " " + inputDir() + " " +
+ type.ordinal() + " " + constant + " " + expectedDir();
//generate actual dataset
double[][] A = getRandomMatrix(rows, cols, -1, 1, sparsity, 7);
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/44a718e3/src/test/java/com/ibm/bi/dml/test/integration/functions/binary/matrix_full_other/FullPPredScalarRightTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/com/ibm/bi/dml/test/integration/functions/binary/matrix_full_other/FullPPredScalarRightTest.java b/src/test/java/com/ibm/bi/dml/test/integration/functions/binary/matrix_full_other/FullPPredScalarRightTest.java
index d11b4be..6ccdcde 100644
--- a/src/test/java/com/ibm/bi/dml/test/integration/functions/binary/matrix_full_other/FullPPredScalarRightTest.java
+++ b/src/test/java/com/ibm/bi/dml/test/integration/functions/binary/matrix_full_other/FullPPredScalarRightTest.java
@@ -19,6 +19,7 @@ package com.ibm.bi.dml.test.integration.functions.binary.matrix_full_other;
import java.util.HashMap;
+import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
@@ -76,6 +77,14 @@ public class FullPPredScalarRightTest extends AutomatedTestBase
{
TestUtils.clearDirectory(TEST_DATA_DIR + TEST_CLASS_DIR);
}
+
+ @AfterClass
+ public static void cleanUp()
+ {
+ if (TEST_CACHE_ENABLED) {
+ TestUtils.clearDirectory(TEST_DATA_DIR + TEST_CLASS_DIR);
+ }
+ }
@Test
public void testPPredGreaterZeroDenseCP()
@@ -392,22 +401,17 @@ public class FullPPredScalarRightTest extends AutomatedTestBase
try
{
TestConfiguration config = getTestConfiguration(TEST_NAME);
+ loadTestConfiguration(config, TEST_CACHE_DIR);
/* This is for running the junit test the new way, i.e., construct the arguments directly */
String HOME = SCRIPT_DIR + TEST_DIR;
- String TARGET_IN = TEST_DATA_DIR + TEST_CLASS_DIR + INPUT_DIR;
- String TARGET_OUT = TEST_DATA_DIR + TEST_CLASS_DIR + OUTPUT_DIR;
- String TARGET_EXPECTED = TEST_DATA_DIR + TEST_CLASS_DIR + EXPECTED_DIR + TEST_CACHE_DIR;
fullDMLScriptName = HOME + TEST_NAME + ".dml";
- programArgs = new String[]{"-args", TARGET_IN + "A" ,
- Integer.toString(type.ordinal()),
- Double.toString(constant),
- TARGET_OUT + "B" };
- fullRScriptName = HOME + TEST_NAME + ".R";
- rCmd = "Rscript" + " " + fullRScriptName + " " +
- TARGET_IN + " " + type.ordinal() + " " + constant + " " + TARGET_EXPECTED;
+ programArgs = new String[]{"-args", input("A"),
+ Integer.toString(type.ordinal()), Double.toString(constant), output("B") };
- loadTestConfiguration(config, TEST_CACHE_DIR);
+ fullRScriptName = HOME + TEST_NAME + ".R";
+ rCmd = "Rscript" + " " + fullRScriptName + " " + inputDir() + " " +
+ type.ordinal() + " " + constant + " " + expectedDir();
//generate actual dataset
double[][] A = getRandomMatrix(rows, cols, -1, 1, sparsity, 7);
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/44a718e3/src/test/java/com/ibm/bi/dml/test/integration/functions/binary/matrix_full_other/FullPowerTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/com/ibm/bi/dml/test/integration/functions/binary/matrix_full_other/FullPowerTest.java b/src/test/java/com/ibm/bi/dml/test/integration/functions/binary/matrix_full_other/FullPowerTest.java
index 3d0be68..c5174e8 100644
--- a/src/test/java/com/ibm/bi/dml/test/integration/functions/binary/matrix_full_other/FullPowerTest.java
+++ b/src/test/java/com/ibm/bi/dml/test/integration/functions/binary/matrix_full_other/FullPowerTest.java
@@ -20,6 +20,7 @@ package com.ibm.bi.dml.test.integration.functions.binary.matrix_full_other;
import java.io.IOException;
import java.util.HashMap;
+import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
@@ -67,6 +68,14 @@ public class FullPowerTest extends AutomatedTestBase
{
TestUtils.clearDirectory(TEST_DATA_DIR + TEST_CLASS_DIR);
}
+
+ @AfterClass
+ public static void cleanUp()
+ {
+ if (TEST_CACHE_ENABLED) {
+ TestUtils.clearDirectory(TEST_DATA_DIR + TEST_CLASS_DIR);
+ }
+ }
@Test
public void testPowMMDenseCP()
@@ -201,28 +210,22 @@ public class FullPowerTest extends AutomatedTestBase
{
String TEST_NAME = TEST_NAME1;
TestConfiguration config = getTestConfiguration(TEST_NAME);
+ loadTestConfiguration(config, TEST_CACHE_DIR);
/* This is for running the junit test the new way, i.e., construct the arguments directly */
String HOME = SCRIPT_DIR + TEST_DIR;
- String TARGET_IN = TEST_DATA_DIR + TEST_CLASS_DIR + INPUT_DIR;
- String TARGET_OUT = TEST_DATA_DIR + TEST_CLASS_DIR + OUTPUT_DIR;
- String TARGET_EXPECTED = TEST_DATA_DIR + TEST_CLASS_DIR + EXPECTED_DIR + TEST_CACHE_DIR;
fullDMLScriptName = HOME + TEST_NAME + ".dml";
- programArgs = new String[]{"-args", TARGET_IN + "A",
- TARGET_IN + "B",
- TARGET_OUT + "C" };
- fullRScriptName = HOME + TEST_NAME + ".R";
- rCmd = "Rscript" + " " + fullRScriptName + " " +
- TARGET_IN + " " + TARGET_EXPECTED;
+ programArgs = new String[]{"-args", input("A"), input("B"), output("C") };
- loadTestConfiguration(config, TEST_CACHE_DIR);
+ fullRScriptName = HOME + TEST_NAME + ".R";
+ rCmd = "Rscript" + " " + fullRScriptName + " " + inputDir() + " " + expectedDir();
if( dt1 == DataType.SCALAR && dt2 == DataType.SCALAR )
{
// Clear OUT folder to prevent access denied errors running DML script
// for tests testPowSSSparseCP, testPowSSSparseMR, testPowSSDenseCP, testPowSSDenseMR
// due to setOutAndExpectedDeletionDisabled(true).
- TestUtils.clearDirectory(TARGET_OUT);
+ TestUtils.clearDirectory(outputDir());
}
//generate dataset A