diff options
| author | RncLsn <rnc.lsn@gmail.com> | 2015-05-06 18:11:08 +0100 |
|---|---|---|
| committer | Ronca <alessandro.a.ronca@gmail.com> | 2015-05-06 18:20:58 +0100 |
| commit | f2909a748a300f94cf6067fc84416e408d3e6de8 (patch) | |
| tree | 02962a710fe27ea1c7a2704a356b7f663a42cb52 /test | |
| parent | 58e6d87cb604702e7b307bad73c4fd42a694c3ec (diff) | |
| download | ACQuA-f2909a748a300f94cf6067fc84416e408d3e6de8.tar.gz ACQuA-f2909a748a300f94cf6067fc84416e408d3e6de8.zip | |
Switch from JUnit to TestNG.
Plus minor fixes.
Diffstat (limited to 'test')
| -rw-r--r-- | test/AllTests.xml | 12 | ||||
| -rw-r--r-- | test/FullEvaluation.xml | 18 | ||||
| -rw-r--r-- | test/uk/ac/ox/cs/pagoda/junit/AllTests.java | 48 | ||||
| -rw-r--r-- | test/uk/ac/ox/cs/pagoda/junit/FullEvaluation.java | 14 | ||||
| -rw-r--r-- | test/uk/ac/ox/cs/pagoda/junit/PagodaLUBM.java | 38 | ||||
| -rw-r--r-- | test/uk/ac/ox/cs/pagoda/junit/PagodaUOBM.java | 48 | ||||
| -rw-r--r-- | test/uk/ac/ox/cs/pagoda/test_units/ClauseTester.java (renamed from test/uk/ac/ox/cs/pagoda/junit/ClauseTester.java) | 17 | ||||
| -rw-r--r-- | test/uk/ac/ox/cs/pagoda/test_units/CostEvaluation.java (renamed from test/uk/ac/ox/cs/pagoda/junit/CostEvaluation.java) | 4 | ||||
| -rw-r--r-- | test/uk/ac/ox/cs/pagoda/test_units/JAIR_PAGOdA.java (renamed from test/uk/ac/ox/cs/pagoda/junit/JAIR_PAGOdA.java) | 151 | ||||
| -rw-r--r-- | test/uk/ac/ox/cs/pagoda/test_units/JAIR_Scalability.java (renamed from test/uk/ac/ox/cs/pagoda/junit/JAIR_Scalability.java) | 28 | ||||
| -rw-r--r-- | test/uk/ac/ox/cs/pagoda/test_units/LightEvaluation.java (renamed from test/uk/ac/ox/cs/pagoda/junit/LightEvaluation.java) | 33 | ||||
| -rw-r--r-- | test/uk/ac/ox/cs/pagoda/test_units/PagodaDBPedia.java (renamed from test/uk/ac/ox/cs/pagoda/junit/PagodaDBPedia.java) | 11 | ||||
| -rw-r--r-- | test/uk/ac/ox/cs/pagoda/test_units/PagodaELU.java (renamed from test/uk/ac/ox/cs/pagoda/junit/PagodaELU.java) | 2 | ||||
| -rw-r--r-- | test/uk/ac/ox/cs/pagoda/test_units/PagodaFLY.java (renamed from test/uk/ac/ox/cs/pagoda/junit/PagodaFLY.java) | 2 | ||||
| -rw-r--r-- | test/uk/ac/ox/cs/pagoda/test_units/PagodaLUBM.java | 68 | ||||
| -rw-r--r-- | test/uk/ac/ox/cs/pagoda/test_units/PagodaNPD.java (renamed from test/uk/ac/ox/cs/pagoda/junit/PagodaNPD.java) | 17 | ||||
| -rw-r--r-- | test/uk/ac/ox/cs/pagoda/test_units/PagodaNPD_bench.java (renamed from test/uk/ac/ox/cs/pagoda/junit/PagodaNPD_bench.java) | 11 | ||||
| -rw-r--r-- | test/uk/ac/ox/cs/pagoda/test_units/PagodaRLU.java (renamed from test/uk/ac/ox/cs/pagoda/junit/PagodaRLU.java) | 2 | ||||
| -rw-r--r-- | test/uk/ac/ox/cs/pagoda/test_units/PagodaUOBM.java | 79 | ||||
| -rw-r--r-- | test/uk/ac/ox/cs/pagoda/tester/PagodaTester.java | 16 |
20 files changed, 334 insertions, 285 deletions
diff --git a/test/AllTests.xml b/test/AllTests.xml new file mode 100644 index 0000000..8ce5fcf --- /dev/null +++ b/test/AllTests.xml | |||
| @@ -0,0 +1,12 @@ | |||
| 1 | <?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | <!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" > | ||
| 3 | |||
| 4 | <suite name="AllTests"> | ||
| 5 | |||
| 6 | <test name="PagodaUOBM"> | ||
| 7 | <classes> | ||
| 8 | <class name="uk.ac.ox.cs.pagoda.test_units.PagodaUOBM" /> | ||
| 9 | </classes> | ||
| 10 | </test> | ||
| 11 | |||
| 12 | </suite> \ No newline at end of file | ||
diff --git a/test/FullEvaluation.xml b/test/FullEvaluation.xml new file mode 100644 index 0000000..f0f047d --- /dev/null +++ b/test/FullEvaluation.xml | |||
| @@ -0,0 +1,18 @@ | |||
| 1 | <?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | <!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" > | ||
| 3 | |||
| 4 | <suite name="AllTests"> | ||
| 5 | |||
| 6 | <test name="LightEvaluation"> | ||
| 7 | <classes> | ||
| 8 | <class name="uk.ac.ox.cs.pagoda.test_units.LightEvaluation" /> | ||
| 9 | </classes> | ||
| 10 | </test> | ||
| 11 | |||
| 12 | <test name="CostEvaluation"> | ||
| 13 | <classes> | ||
| 14 | <class name="uk.ac.ox.cs.pagoda.test_units.CostEvaluation" /> | ||
| 15 | </classes> | ||
| 16 | </test> | ||
| 17 | |||
| 18 | </suite> \ No newline at end of file | ||
diff --git a/test/uk/ac/ox/cs/pagoda/junit/AllTests.java b/test/uk/ac/ox/cs/pagoda/junit/AllTests.java deleted file mode 100644 index fb38787..0000000 --- a/test/uk/ac/ox/cs/pagoda/junit/AllTests.java +++ /dev/null | |||
| @@ -1,48 +0,0 @@ | |||
| 1 | package uk.ac.ox.cs.pagoda.junit; | ||
| 2 | |||
| 3 | import java.io.BufferedWriter; | ||
| 4 | import java.io.FileInputStream; | ||
| 5 | import java.io.FileNotFoundException; | ||
| 6 | import java.io.FileOutputStream; | ||
| 7 | import java.io.IOException; | ||
| 8 | import java.io.InputStream; | ||
| 9 | import java.io.OutputStream; | ||
| 10 | import java.io.OutputStreamWriter; | ||
| 11 | |||
| 12 | import org.junit.runner.RunWith; | ||
| 13 | import org.junit.runners.Suite; | ||
| 14 | import org.junit.runners.Suite.SuiteClasses; | ||
| 15 | |||
| 16 | @RunWith(Suite.class) | ||
| 17 | @SuiteClasses({ PagodaUOBM.class | ||
| 18 | }) | ||
| 19 | public class AllTests { | ||
| 20 | |||
| 21 | public static void copy(String source, String dest) { | ||
| 22 | InputStream is = null; | ||
| 23 | OutputStream os = null; | ||
| 24 | try { | ||
| 25 | is = new FileInputStream(source); | ||
| 26 | os = new FileOutputStream(dest); | ||
| 27 | byte[] buffer = new byte[1024]; | ||
| 28 | int length; | ||
| 29 | while ((length = is.read(buffer)) > 0) { | ||
| 30 | os.write(buffer, 0, length); | ||
| 31 | } | ||
| 32 | is.close(); | ||
| 33 | os.close(); | ||
| 34 | |||
| 35 | BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(source))); | ||
| 36 | writer.write(""); | ||
| 37 | writer.close(); | ||
| 38 | } catch (FileNotFoundException e) { | ||
| 39 | e.printStackTrace(); | ||
| 40 | } catch (IOException e) { | ||
| 41 | e.printStackTrace(); | ||
| 42 | } | ||
| 43 | |||
| 44 | // File src = new File(source); | ||
| 45 | // src.delete(); | ||
| 46 | } | ||
| 47 | |||
| 48 | } | ||
diff --git a/test/uk/ac/ox/cs/pagoda/junit/FullEvaluation.java b/test/uk/ac/ox/cs/pagoda/junit/FullEvaluation.java deleted file mode 100644 index 3406ed2..0000000 --- a/test/uk/ac/ox/cs/pagoda/junit/FullEvaluation.java +++ /dev/null | |||
| @@ -1,14 +0,0 @@ | |||
| 1 | package uk.ac.ox.cs.pagoda.junit; | ||
| 2 | |||
| 3 | import org.junit.runner.RunWith; | ||
| 4 | import org.junit.runners.Suite; | ||
| 5 | import org.junit.runners.Suite.SuiteClasses; | ||
| 6 | |||
| 7 | @RunWith(Suite.class) | ||
| 8 | @SuiteClasses({ LightEvaluation.class, | ||
| 9 | CostEvaluation.class | ||
| 10 | }) | ||
| 11 | |||
| 12 | public class FullEvaluation { | ||
| 13 | |||
| 14 | } | ||
diff --git a/test/uk/ac/ox/cs/pagoda/junit/PagodaLUBM.java b/test/uk/ac/ox/cs/pagoda/junit/PagodaLUBM.java deleted file mode 100644 index f8fef0e..0000000 --- a/test/uk/ac/ox/cs/pagoda/junit/PagodaLUBM.java +++ /dev/null | |||
| @@ -1,38 +0,0 @@ | |||
| 1 | package uk.ac.ox.cs.pagoda.junit; | ||
| 2 | |||
| 3 | import static org.junit.Assert.*; | ||
| 4 | |||
| 5 | import org.junit.Test; | ||
| 6 | |||
| 7 | import uk.ac.ox.cs.pagoda.tester.PagodaTester; | ||
| 8 | import uk.ac.ox.cs.pagoda.tester.Statistics; | ||
| 9 | |||
| 10 | public class PagodaLUBM { | ||
| 11 | |||
| 12 | public void test_all(int number) { | ||
| 13 | PagodaTester.main( | ||
| 14 | PagodaTester.onto_dir + "lubm/univ-bench.owl", | ||
| 15 | PagodaTester.onto_dir + "lubm/data/lubm" + number + ".ttl", | ||
| 16 | PagodaTester.onto_dir + "lubm/queries/test_all_pagoda.sparql" | ||
| 17 | ); | ||
| 18 | |||
| 19 | AllTests.copy("log4j.log", "output/jair/lubm" + number + ".out"); | ||
| 20 | } | ||
| 21 | |||
| 22 | @Test | ||
| 23 | public void test1() { test_all(1); } | ||
| 24 | |||
| 25 | public void test() { | ||
| 26 | int number = 100; | ||
| 27 | test_all(number); | ||
| 28 | } | ||
| 29 | |||
| 30 | public void check(int number) { | ||
| 31 | Statistics stat = new Statistics("output/log4j.log"); | ||
| 32 | String diff = stat.diff("results-backup/benchmark/lubm" + number + ".out"); | ||
| 33 | AllTests.copy("output/log4j.log", "results-backup/current/lubm" + number + ".out"); | ||
| 34 | if (!diff.isEmpty()) | ||
| 35 | fail(diff); | ||
| 36 | } | ||
| 37 | |||
| 38 | } | ||
diff --git a/test/uk/ac/ox/cs/pagoda/junit/PagodaUOBM.java b/test/uk/ac/ox/cs/pagoda/junit/PagodaUOBM.java deleted file mode 100644 index 5b56c6d..0000000 --- a/test/uk/ac/ox/cs/pagoda/junit/PagodaUOBM.java +++ /dev/null | |||
| @@ -1,48 +0,0 @@ | |||
| 1 | package uk.ac.ox.cs.pagoda.junit; | ||
| 2 | |||
| 3 | import org.junit.Test; | ||
| 4 | |||
| 5 | import uk.ac.ox.cs.pagoda.tester.PagodaTester; | ||
| 6 | import uk.ac.ox.cs.pagoda.tester.Statistics; | ||
| 7 | |||
| 8 | public class PagodaUOBM { | ||
| 9 | |||
| 10 | public void test_all(int number ) { | ||
| 11 | PagodaTester.main( | ||
| 12 | PagodaTester.onto_dir + "uobm/univ-bench-dl.owl", | ||
| 13 | PagodaTester.onto_dir + "uobm/data/uobm" + number + ".ttl", | ||
| 14 | PagodaTester.onto_dir + "uobm/queries/standard_all_pagoda.sparql" | ||
| 15 | // PagodaTester.onto_dir + "uobm/queries/standard_group3_all_less.sparql;" + | ||
| 16 | // PagodaTester.onto_dir + "uobm/queries/G3.sparql;" + | ||
| 17 | // PagodaTester.onto_dir + "uobm/queries/last.sparql" | ||
| 18 | ); | ||
| 19 | |||
| 20 | AllTests.copy("log4j.log", "output/jair/newuobm/uobm" + number + ".out"); | ||
| 21 | } | ||
| 22 | |||
| 23 | public void test_upToSum(int number) { | ||
| 24 | PagodaTester.main( | ||
| 25 | PagodaTester.onto_dir + "uobm/univ-bench-dl.owl", | ||
| 26 | PagodaTester.onto_dir + "uobm/data/uobm" + number + ".ttl", | ||
| 27 | PagodaTester.onto_dir + "uobm/queries/standard_group3_all.sparql" | ||
| 28 | ); | ||
| 29 | |||
| 30 | // AllTests.copy("log4j.log", "output/jair/uobm" + number + ".out"); | ||
| 31 | } | ||
| 32 | |||
| 33 | @Test | ||
| 34 | public void test1() { test_all(1); } | ||
| 35 | |||
| 36 | public void test500() { test_upToSum(500); } | ||
| 37 | |||
| 38 | public static void main(String... args) { | ||
| 39 | new PagodaUOBM().test_all(1); | ||
| 40 | } | ||
| 41 | |||
| 42 | public void check() { | ||
| 43 | Statistics stat = new Statistics("results-backup/current/uobm1.out"); | ||
| 44 | String diff = stat.diff("results-backup/benchmark/uobm1.out"); | ||
| 45 | System.out.println(diff); | ||
| 46 | } | ||
| 47 | |||
| 48 | } | ||
diff --git a/test/uk/ac/ox/cs/pagoda/junit/ClauseTester.java b/test/uk/ac/ox/cs/pagoda/test_units/ClauseTester.java index d23f186..a0f16d4 100644 --- a/test/uk/ac/ox/cs/pagoda/junit/ClauseTester.java +++ b/test/uk/ac/ox/cs/pagoda/test_units/ClauseTester.java | |||
| @@ -1,8 +1,5 @@ | |||
| 1 | package uk.ac.ox.cs.pagoda.junit; | 1 | package uk.ac.ox.cs.pagoda.test_units; |
| 2 | 2 | ||
| 3 | import static org.junit.Assert.*; | ||
| 4 | |||
| 5 | import org.junit.Test; | ||
| 6 | import org.semanticweb.HermiT.model.Atom; | 3 | import org.semanticweb.HermiT.model.Atom; |
| 7 | import org.semanticweb.HermiT.model.AtomicConcept; | 4 | import org.semanticweb.HermiT.model.AtomicConcept; |
| 8 | import org.semanticweb.HermiT.model.AtomicRole; | 5 | import org.semanticweb.HermiT.model.AtomicRole; |
| @@ -13,6 +10,8 @@ import org.semanticweb.owlapi.apibinding.OWLManager; | |||
| 13 | import org.semanticweb.owlapi.model.OWLOntology; | 10 | import org.semanticweb.owlapi.model.OWLOntology; |
| 14 | import org.semanticweb.owlapi.model.OWLOntologyManager; | 11 | import org.semanticweb.owlapi.model.OWLOntologyManager; |
| 15 | 12 | ||
| 13 | import org.testng.Assert; | ||
| 14 | import org.testng.annotations.Test; | ||
| 16 | import uk.ac.ox.cs.pagoda.approx.Clause; | 15 | import uk.ac.ox.cs.pagoda.approx.Clause; |
| 17 | import uk.ac.ox.cs.pagoda.approx.Clausifier; | 16 | import uk.ac.ox.cs.pagoda.approx.Clausifier; |
| 18 | 17 | ||
| @@ -39,7 +38,7 @@ public class ClauseTester { | |||
| 39 | emptyOntology = m.createOntology(); | 38 | emptyOntology = m.createOntology(); |
| 40 | } catch (Exception e) { | 39 | } catch (Exception e) { |
| 41 | e.printStackTrace(); | 40 | e.printStackTrace(); |
| 42 | fail("failed to create a new ontology"); | 41 | Assert.fail("failed to create a new ontology"); |
| 43 | } | 42 | } |
| 44 | Clause c = new Clause(Clausifier.getInstance(emptyOntology), DLClause.create(headAtoms, bodyAtoms)); | 43 | Clause c = new Clause(Clausifier.getInstance(emptyOntology), DLClause.create(headAtoms, bodyAtoms)); |
| 45 | System.out.println(c.toString()); | 44 | System.out.println(c.toString()); |
| @@ -69,7 +68,7 @@ public class ClauseTester { | |||
| 69 | emptyOntology = m.createOntology(); | 68 | emptyOntology = m.createOntology(); |
| 70 | } catch (Exception e) { | 69 | } catch (Exception e) { |
| 71 | e.printStackTrace(); | 70 | e.printStackTrace(); |
| 72 | fail("failed to create a new ontology"); | 71 | Assert.fail("failed to create a new ontology"); |
| 73 | } | 72 | } |
| 74 | Clause c = new Clause(Clausifier.getInstance(emptyOntology), DLClause.create(headAtoms, bodyAtoms)); | 73 | Clause c = new Clause(Clausifier.getInstance(emptyOntology), DLClause.create(headAtoms, bodyAtoms)); |
| 75 | System.out.println(c.toString()); | 74 | System.out.println(c.toString()); |
| @@ -96,7 +95,7 @@ public class ClauseTester { | |||
| 96 | emptyOntology = m.createOntology(); | 95 | emptyOntology = m.createOntology(); |
| 97 | } catch (Exception e) { | 96 | } catch (Exception e) { |
| 98 | e.printStackTrace(); | 97 | e.printStackTrace(); |
| 99 | fail("failed to create a new ontology"); | 98 | Assert.fail("failed to create a new ontology"); |
| 100 | } | 99 | } |
| 101 | Clause c = new Clause(Clausifier.getInstance(emptyOntology), DLClause.create(headAtoms, bodyAtoms)); | 100 | Clause c = new Clause(Clausifier.getInstance(emptyOntology), DLClause.create(headAtoms, bodyAtoms)); |
| 102 | System.out.println(c.toString()); | 101 | System.out.println(c.toString()); |
| @@ -126,7 +125,7 @@ public class ClauseTester { | |||
| 126 | emptyOntology = m.createOntology(); | 125 | emptyOntology = m.createOntology(); |
| 127 | } catch (Exception e) { | 126 | } catch (Exception e) { |
| 128 | e.printStackTrace(); | 127 | e.printStackTrace(); |
| 129 | fail("failed to create a new ontology"); | 128 | Assert.fail("failed to create a new ontology"); |
| 130 | } | 129 | } |
| 131 | Clause c = new Clause(Clausifier.getInstance(emptyOntology), DLClause.create(headAtoms, bodyAtoms)); | 130 | Clause c = new Clause(Clausifier.getInstance(emptyOntology), DLClause.create(headAtoms, bodyAtoms)); |
| 132 | System.out.println(c.toString()); | 131 | System.out.println(c.toString()); |
| @@ -156,7 +155,7 @@ public class ClauseTester { | |||
| 156 | emptyOntology = m.createOntology(); | 155 | emptyOntology = m.createOntology(); |
| 157 | } catch (Exception e) { | 156 | } catch (Exception e) { |
| 158 | e.printStackTrace(); | 157 | e.printStackTrace(); |
| 159 | fail("failed to create a new ontology"); | 158 | Assert.fail("failed to create a new ontology"); |
| 160 | } | 159 | } |
| 161 | Clause c = new Clause(Clausifier.getInstance(emptyOntology), DLClause.create(headAtoms, bodyAtoms)); | 160 | Clause c = new Clause(Clausifier.getInstance(emptyOntology), DLClause.create(headAtoms, bodyAtoms)); |
| 162 | System.out.println(c.toString()); | 161 | System.out.println(c.toString()); |
diff --git a/test/uk/ac/ox/cs/pagoda/junit/CostEvaluation.java b/test/uk/ac/ox/cs/pagoda/test_units/CostEvaluation.java index 87b01ed..4e32297 100644 --- a/test/uk/ac/ox/cs/pagoda/junit/CostEvaluation.java +++ b/test/uk/ac/ox/cs/pagoda/test_units/CostEvaluation.java | |||
| @@ -1,8 +1,8 @@ | |||
| 1 | package uk.ac.ox.cs.pagoda.junit; | 1 | package uk.ac.ox.cs.pagoda.test_units; |
| 2 | 2 | ||
| 3 | import org.junit.Test; | ||
| 4 | import org.semanticweb.owlapi.model.OWLOntology; | 3 | import org.semanticweb.owlapi.model.OWLOntology; |
| 5 | 4 | ||
| 5 | import org.testng.annotations.Test; | ||
| 6 | import uk.ac.ox.cs.pagoda.owl.OWLHelper; | 6 | import uk.ac.ox.cs.pagoda.owl.OWLHelper; |
| 7 | import uk.ac.ox.cs.pagoda.reasoner.QueryReasoner; | 7 | import uk.ac.ox.cs.pagoda.reasoner.QueryReasoner; |
| 8 | import uk.ac.ox.cs.pagoda.reasoner.QueryReasoner.Type; | 8 | import uk.ac.ox.cs.pagoda.reasoner.QueryReasoner.Type; |
diff --git a/test/uk/ac/ox/cs/pagoda/junit/JAIR_PAGOdA.java b/test/uk/ac/ox/cs/pagoda/test_units/JAIR_PAGOdA.java index 2a148cc..ff616f7 100644 --- a/test/uk/ac/ox/cs/pagoda/junit/JAIR_PAGOdA.java +++ b/test/uk/ac/ox/cs/pagoda/test_units/JAIR_PAGOdA.java | |||
| @@ -1,173 +1,180 @@ | |||
| 1 | package uk.ac.ox.cs.pagoda.junit; | 1 | package uk.ac.ox.cs.pagoda.test_units; |
| 2 | |||
| 3 | import org.junit.Test; | ||
| 4 | 2 | ||
| 3 | import org.testng.annotations.Test; | ||
| 5 | import uk.ac.ox.cs.pagoda.tester.PagodaTester; | 4 | import uk.ac.ox.cs.pagoda.tester.PagodaTester; |
| 5 | import uk.ac.ox.cs.pagoda.util.Utility; | ||
| 6 | |||
| 7 | import java.io.IOException; | ||
| 6 | 8 | ||
| 7 | public class JAIR_PAGOdA { | 9 | public class JAIR_PAGOdA { |
| 8 | 10 | ||
| 9 | public void lubm1() { | 11 | @Test |
| 12 | public void lubm1() throws IOException { | ||
| 10 | String[] args = new String[] { | 13 | String[] args = new String[] { |
| 11 | PagodaTester.onto_dir + "lubm/univ-bench.owl", | 14 | PagodaTester.onto_dir + "lubm/univ-bench.owl", |
| 12 | PagodaTester.onto_dir + "lubm/data/lubm1.ttl", | 15 | PagodaTester.onto_dir + "lubm/data/lubm1.ttl", |
| 13 | PagodaTester.onto_dir + "lubm/queries/test.sparql" | 16 | PagodaTester.onto_dir + "lubm/queries/test.sparql" |
| 14 | }; | 17 | }; |
| 15 | PagodaTester.main(args); | 18 | PagodaTester.main(args); |
| 16 | AllTests.copy("output/log4j.log", "/home/yzhou/java-workspace/test-share/results_new/lubm1/pagoda"); | 19 | Utility.copyFile("output/log4j.log", "/home/yzhou/java-workspace/test-share/results_new/lubm1/pagoda"); |
| 17 | } | 20 | } |
| 18 | 21 | ||
| 19 | 22 | @Test | |
| 20 | public void lubm1_conj() { | 23 | public void lubm1_conj() throws IOException { |
| 21 | String[] args = new String[] { | 24 | String[] args = new String[] { |
| 22 | PagodaTester.onto_dir + "lubm/univ-bench.owl", | 25 | PagodaTester.onto_dir + "lubm/univ-bench.owl", |
| 23 | PagodaTester.onto_dir + "lubm/data/lubm1.ttl", | 26 | PagodaTester.onto_dir + "lubm/data/lubm1.ttl", |
| 24 | PagodaTester.onto_dir + "lubm/queries/test_pellet.sparql" | 27 | PagodaTester.onto_dir + "lubm/queries/test_pellet.sparql" |
| 25 | }; | 28 | }; |
| 26 | PagodaTester.main(args); | 29 | PagodaTester.main(args); |
| 27 | AllTests.copy("output/log4j.log", "/home/yzhou/java-workspace/test-share/results_new/lubm1/pagoda_conj"); | 30 | Utility.copyFile("output/log4j.log", "/home/yzhou/java-workspace/test-share/results_new/lubm1/pagoda_conj"); |
| 28 | } | 31 | } |
| 29 | 32 | ||
| 30 | 33 | @Test | |
| 31 | public void lubm1_rolledUp() { | 34 | public void lubm1_rolledUp() throws IOException { |
| 32 | String[] args = new String[] { | 35 | String[] args = new String[] { |
| 33 | "/home/yzhou/backup/20141212/univ-bench-queries.owl", | 36 | "/home/yzhou/backup/20141212/univ-bench-queries.owl", |
| 34 | PagodaTester.onto_dir + "lubm/data/lubm1.ttl", | 37 | PagodaTester.onto_dir + "lubm/data/lubm1.ttl", |
| 35 | PagodaTester.onto_dir + "lubm/queries/atomic_lubm.sparql" | 38 | PagodaTester.onto_dir + "lubm/queries/atomic_lubm.sparql" |
| 36 | }; | 39 | }; |
| 37 | PagodaTester.main(args); | 40 | PagodaTester.main(args); |
| 38 | AllTests.copy("output/log4j.log", "/home/yzhou/java-workspace/test-share/results_new/lubm1/pagoda_rolledUp"); | 41 | Utility.copyFile("output/log4j.log", "/home/yzhou/java-workspace/test-share/results_new/lubm1/pagoda_rolledUp"); |
| 39 | } | 42 | } |
| 40 | 43 | ||
| 41 | 44 | @Test | |
| 42 | public void uobm1() { | 45 | public void uobm1() throws IOException { |
| 43 | String[] args = new String[] { | 46 | String[] args = new String[] { |
| 44 | PagodaTester.onto_dir + "uobm/univ-bench-dl.owl", | 47 | PagodaTester.onto_dir + "uobm/univ-bench-dl.owl", |
| 45 | PagodaTester.onto_dir + "uobm/data/uobm1.ttl", | 48 | PagodaTester.onto_dir + "uobm/data/uobm1.ttl", |
| 46 | PagodaTester.onto_dir + "uobm/queries/standard.sparql" | 49 | PagodaTester.onto_dir + "uobm/queries/standard.sparql" |
| 47 | }; | 50 | }; |
| 48 | PagodaTester.main(args); | 51 | PagodaTester.main(args); |
| 49 | AllTests.copy("output/log4j.log", "/home/yzhou/java-workspace/test-share/results_new/uobm1/pagoda"); | 52 | Utility.copyFile("output/log4j.log", "/home/yzhou/java-workspace/test-share/results_new/uobm1/pagoda"); |
| 50 | } | 53 | } |
| 51 | 54 | ||
| 52 | 55 | @Test | |
| 53 | public void uobm1_conj() { | 56 | public void uobm1_conj() throws IOException { |
| 54 | String[] args = new String[] { | 57 | String[] args = new String[] { |
| 55 | PagodaTester.onto_dir + "uobm/univ-bench-dl.owl", | 58 | PagodaTester.onto_dir + "uobm/univ-bench-dl.owl", |
| 56 | PagodaTester.onto_dir + "uobm/data/uobm1.ttl", | 59 | PagodaTester.onto_dir + "uobm/data/uobm1.ttl", |
| 57 | PagodaTester.onto_dir + "uobm/queries/standard_pellet.sparql" | 60 | PagodaTester.onto_dir + "uobm/queries/standard_pellet.sparql" |
| 58 | }; | 61 | }; |
| 59 | PagodaTester.main(args); | 62 | PagodaTester.main(args); |
| 60 | AllTests.copy("output/log4j.log", "/home/yzhou/java-workspace/test-share/results_new/uobm1/pagoda_conj"); | 63 | Utility.copyFile("output/log4j.log", "/home/yzhou/java-workspace/test-share/results_new/uobm1/pagoda_conj"); |
| 61 | } | 64 | } |
| 62 | 65 | ||
| 63 | 66 | @Test | |
| 64 | public void uobm1_rolledUp() { | 67 | public void uobm1_rolledUp() { |
| 65 | String[] args = new String[] { | 68 | String[] args = new String[] { |
| 66 | "/home/yzhou/backup/20141212/univ-bench-dl-queries.owl", | 69 | "/home/yzhou/backup/20141212/univ-bench-dl-queries.owl", |
| 67 | PagodaTester.onto_dir + "uobm/data/uobm1.ttl", | 70 | PagodaTester.onto_dir + "uobm/data/uobm1.ttl", |
| 68 | PagodaTester.onto_dir + "uobm/queries/atomic_uobm.sparql" | 71 | PagodaTester.onto_dir + "uobm/queries/atomic_uobm.sparql" |
| 69 | }; | 72 | }; |
| 70 | PagodaTester.main(args); | 73 | PagodaTester.main(args); |
| 71 | // AllTests.copy("output/log4j.log", "/home/yzhou/java-workspace/test-share/results_new/uobm1/pagoda_rolledUp"); | 74 | // AllTests.copy("output/log4j.log", "/home/yzhou/java-workspace/test-share/results_new/uobm1/pagoda_rolledUp"); |
| 72 | } | 75 | } |
| 73 | 76 | ||
| 74 | 77 | @Test | |
| 75 | public void fly() { | 78 | public void fly() { |
| 76 | String[] args = new String[] { | 79 | String[] args = new String[] { |
| 77 | PagodaTester.onto_dir + "fly/fly_anatomy_XP_with_GJ_FC_individuals.owl", | 80 | PagodaTester.onto_dir + "fly/fly_anatomy_XP_with_GJ_FC_individuals.owl", |
| 78 | null, | 81 | null, |
| 79 | PagodaTester.onto_dir + "fly/queries/fly_pellet.sparql" | 82 | PagodaTester.onto_dir + "fly/queries/fly_pellet.sparql" |
| 80 | }; | 83 | }; |
| 81 | PagodaTester.main(args); | 84 | PagodaTester.main(args); |
| 82 | // AllTests.copy("output/log4j.log", "/home/yzhou/java-workspace/test-share/results_new/fly/pagoda"); | 85 | // AllTests.copy("output/log4j.log", "/home/yzhou/java-workspace/test-share/results_new/fly/pagoda"); |
| 83 | } | 86 | } |
| 84 | 87 | ||
| 85 | @Test | 88 | @Test |
| 86 | public void fly_conj() { | 89 | public void fly_conj() throws IOException { |
| 87 | String[] args = new String[] { | 90 | String[] args = new String[] { |
| 88 | PagodaTester.onto_dir + "fly/fly_anatomy_XP_with_GJ_FC_individuals.owl", | 91 | PagodaTester.onto_dir + "fly/fly_anatomy_XP_with_GJ_FC_individuals.owl", |
| 89 | null, | 92 | null, |
| 90 | PagodaTester.onto_dir + "fly/queries/fly_pellet.sparql" | 93 | PagodaTester.onto_dir + "fly/queries/fly_pellet.sparql" |
| 91 | }; | 94 | }; |
| 92 | PagodaTester.main(args); | 95 | PagodaTester.main(args); |
| 93 | AllTests.copy("output/log4j.log", "/home/yzhou/java-workspace/test-share/results_new/fly/pagoda_conj"); | 96 | Utility.copyFile("output/log4j.log", "/home/yzhou/java-workspace/test-share/results_new/fly/pagoda_conj"); |
| 94 | } | 97 | } |
| 95 | 98 | ||
| 96 | 99 | ||
| 97 | public void fly_rolledUp() { | 100 | public void fly_rolledUp() { |
| 98 | PagodaTester.main(new String[] { | 101 | PagodaTester.main(new String[] { |
| 99 | // PagodaTester.onto_dir + "fly/fly_anatomy_XP_with_GJ_FC_individuals.owl", | 102 | // PagodaTester.onto_dir + "fly/fly_anatomy_XP_with_GJ_FC_individuals.owl", |
| 100 | PagodaTester.onto_dir + "fly/fly-all-in-one_rolledUp.owl", | 103 | PagodaTester.onto_dir + "fly/fly-all-in-one_rolledUp.owl", |
| 101 | null, | 104 | null, |
| 102 | PagodaTester.onto_dir + "fly/queries/fly_atomic.sparql" | 105 | PagodaTester.onto_dir + "fly/queries/fly_atomic.sparql" |
| 103 | }); | 106 | }); |
| 104 | // AllTests.copy("output/log4j.log", "/home/yzhou/java-workspace/test-share/results_new/fly/pagoda_rolledUp"); | 107 | // Utility.copyFile("output/log4j.log", "/home/yzhou/java-workspace/test-share/results_new/fly/pagoda_rolledUp"); |
| 105 | } | 108 | } |
| 106 | 109 | ||
| 107 | public void dbpedia() { | 110 | public void dbpedia() { |
| 108 | PagodaTester.main( | 111 | PagodaTester.main( |
| 109 | PagodaTester.onto_dir + "dbpedia/integratedOntology-all-in-one-minus-datatype.owl", | 112 | PagodaTester.onto_dir + "dbpedia/integratedOntology-all-in-one-minus-datatype.owl", |
| 110 | PagodaTester.onto_dir + "dbpedia/data/dbpedia-minus-datatype-new.ttl", | 113 | PagodaTester.onto_dir + "dbpedia/data/dbpedia-minus-datatype-new.ttl", |
| 111 | PagodaTester.onto_dir + "dbpedia/queries/atomic_ground.sparql" | 114 | PagodaTester.onto_dir + "dbpedia/queries/atomic_ground.sparql" |
| 112 | , "dbpedia.ans" | 115 | , "dbpedia.ans" |
| 113 | ); | 116 | ); |
| 114 | 117 | ||
| 115 | // AllTests.copy("output/log4j.log", "/home/yzhou/java-workspace/test-share/results_new/dbpedia/pagoda"); | 118 | // Utility.copyFile("output/log4j.log", "/home/yzhou/java-workspace/test-share/results_new/dbpedia/pagoda"); |
| 116 | } | 119 | } |
| 117 | 120 | ||
| 118 | public void npd() { | 121 | public void npd() { |
| 119 | PagodaTester.main( | 122 | PagodaTester.main( |
| 120 | PagodaTester.onto_dir + "npd/npd-all-minus-datatype.owl", | 123 | PagodaTester.onto_dir + "npd/npd-all-minus-datatype.owl", |
| 121 | PagodaTester.onto_dir + "npd/data/npd-data-dump-minus-datatype-new.ttl", | 124 | PagodaTester.onto_dir + "npd/data/npd-data-dump-minus-datatype-new.ttl", |
| 122 | PagodaTester.onto_dir + "npd/queries/atomic_ground.sparql" | 125 | PagodaTester.onto_dir + "npd/queries/atomic_ground.sparql" |
| 123 | , "npd.ans" | 126 | , "npd.ans" |
| 124 | ); | 127 | ); |
| 125 | 128 | ||
| 126 | // AllTests.copy("output/log4j.log", "/home/yzhou/java-workspace/test-share/results_new/npd/pagoda"); | 129 | // Utility.copyFile("output/log4j.log", "/home/yzhou/java-workspace/test-share/results_new/npd/pagoda"); |
| 127 | } | 130 | } |
| 128 | 131 | ||
| 129 | public void reactome() { | 132 | public void reactome() throws IOException { |
| 130 | PagodaTester.main( | 133 | PagodaTester.main( |
| 131 | PagodaTester.onto_dir + "bio2rdf/reactome/biopax-level3-processed.owl", | 134 | PagodaTester.onto_dir + "bio2rdf/reactome/biopax-level3-processed.owl", |
| 132 | PagodaTester.onto_dir + "bio2rdf/reactome/graph sampling/reactome_sample_10.ttl", | 135 | PagodaTester.onto_dir + "bio2rdf/reactome/graph sampling/reactome_sample_10.ttl", |
| 133 | // null, | 136 | // null, |
| 134 | // PagodaTester.onto_dir + "bio2rdf/reactome/queries/atomic_ground.sparql" | 137 | // PagodaTester.onto_dir + "bio2rdf/reactome/queries/atomic_ground.sparql" |
| 135 | PagodaTester.onto_dir + "bio2rdf/reactome/queries/example.sparql" | 138 | PagodaTester.onto_dir + "bio2rdf/reactome/queries/example.sparql" |
| 136 | , "pagoda_reactome.ans" | 139 | , "pagoda_reactome.ans" |
| 137 | ); | 140 | ); |
| 138 | AllTests.copy("log4j.log", "output/jair/pagoda_reactome.example"); | 141 | Utility.copyFile("log4j.log", "output/jair/pagoda_reactome.example"); |
| 139 | 142 | ||
| 140 | // AllTests.copy("output/log4j.log", "/home/yzhou/java-workspace/test-share/results_new/reactome/pagoda_10p"); | 143 | // AllTests.copy("output/log4j.log", "/home/yzhou/java-workspace/test-share/results_new/reactome/pagoda_10p"); |
| 141 | } | 144 | } |
| 142 | 145 | ||
| 143 | public void chembl() { | 146 | public void chembl() throws IOException { |
| 144 | PagodaTester.main( | 147 | PagodaTester.main( |
| 145 | PagodaTester.onto_dir + "bio2rdf/chembl/cco-noDPR.ttl", | 148 | PagodaTester.onto_dir + "bio2rdf/chembl/cco-noDPR.ttl", |
| 146 | PagodaTester.onto_dir + "bio2rdf/chembl/graph sampling/sample_1.nt", | 149 | PagodaTester.onto_dir + "bio2rdf/chembl/graph sampling/sample_1.nt", |
| 147 | // PagodaTester.onto_dir + "bio2rdf/chembl/queries/atomic_ground.sparql" | 150 | // PagodaTester.onto_dir + "bio2rdf/chembl/queries/atomic_ground.sparql" |
| 148 | PagodaTester.onto_dir + "bio2rdf/chembl/queries/example.sparql" | 151 | PagodaTester.onto_dir + "bio2rdf/chembl/queries/example.sparql" |
| 149 | , "pagoda_chembl.ans" | 152 | , "pagoda_chembl.ans" |
| 150 | ); | 153 | ); |
| 151 | AllTests.copy("log4j.log", "output/jair/pagoda_chembl.example"); | 154 | Utility.copyFile("log4j.log", "output/jair/pagoda_chembl.example"); |
| 152 | // AllTests.copy("output/log4j.log", "/home/yzhou/java-workspace/test-share/results_new/chembl/pagoda_1p"); | 155 | // Utility.copyFile("output/log4j.log", "/home/yzhou/java-workspace/test-share/results_new/chembl/pagoda_1p"); |
| 153 | } | 156 | } |
| 154 | 157 | ||
| 155 | public void uniprot() { | 158 | public void uniprot() throws IOException { |
| 156 | PagodaTester.main( | 159 | PagodaTester.main( |
| 157 | PagodaTester.onto_dir + "bio2rdf/uniprot/core-sat-processed.owl", | 160 | PagodaTester.onto_dir + "bio2rdf/uniprot/core-sat-processed.owl", |
| 158 | PagodaTester.onto_dir + "bio2rdf/uniprot/graph sampling/sample_1.nt", | 161 | PagodaTester.onto_dir + "bio2rdf/uniprot/graph sampling/sample_1.nt", |
| 159 | // null, | 162 | // null, |
| 160 | // PagodaTester.onto_dir + "bio2rdf/uniprot/queries/atomic_ground.sparql" | 163 | // PagodaTester.onto_dir + "bio2rdf/uniprot/queries/atomic_ground.sparql" |
| 161 | PagodaTester.onto_dir + "bio2rdf/uniprot/queries/example.sparql" | 164 | PagodaTester.onto_dir + "bio2rdf/uniprot/queries/example.sparql" |
| 162 | , "pagoda_uniprot.ans" | 165 | , "pagoda_uniprot.ans" |
| 163 | ); | 166 | ); |
| 164 | AllTests.copy("log4j.log", "output/jair/pagoda_uniprot.example"); | 167 | Utility.copyFile("log4j.log", "output/jair/pagoda_uniprot.example"); |
| 165 | // AllTests.copy("output/log4j.log", "/home/yzhou/java-workspace/test-share/results_new/uniprot/pagoda_1p"); | 168 | // AllTests.copy("output/log4j.log", "/home/yzhou/java-workspace/test-share/results_new/uniprot/pagoda_1p"); |
| 166 | } | 169 | } |
| 167 | 170 | ||
| 168 | 171 | ||
| 169 | public static void main(String... args) { | 172 | public static void main(String... args) { |
| 170 | new JAIR_PAGOdA().fly(); | 173 | try { |
| 174 | new JAIR_PAGOdA().lubm1(); | ||
| 175 | } catch (IOException e) { | ||
| 176 | e.printStackTrace(); | ||
| 177 | } | ||
| 171 | } | 178 | } |
| 172 | 179 | ||
| 173 | } | 180 | } |
diff --git a/test/uk/ac/ox/cs/pagoda/junit/JAIR_Scalability.java b/test/uk/ac/ox/cs/pagoda/test_units/JAIR_Scalability.java index 5e2b1d7..43cb810 100644 --- a/test/uk/ac/ox/cs/pagoda/junit/JAIR_Scalability.java +++ b/test/uk/ac/ox/cs/pagoda/test_units/JAIR_Scalability.java | |||
| @@ -1,30 +1,32 @@ | |||
| 1 | package uk.ac.ox.cs.pagoda.junit; | 1 | package uk.ac.ox.cs.pagoda.test_units; |
| 2 | |||
| 3 | import org.junit.Test; | ||
| 4 | 2 | ||
| 3 | import org.testng.annotations.Test; | ||
| 5 | import uk.ac.ox.cs.pagoda.tester.PagodaTester; | 4 | import uk.ac.ox.cs.pagoda.tester.PagodaTester; |
| 6 | import uk.ac.ox.cs.pagoda.util.Properties; | 5 | import uk.ac.ox.cs.pagoda.util.Properties; |
| 6 | import uk.ac.ox.cs.pagoda.util.Utility; | ||
| 7 | |||
| 8 | import java.io.IOException; | ||
| 7 | 9 | ||
| 8 | public class JAIR_Scalability { | 10 | public class JAIR_Scalability { |
| 9 | 11 | ||
| 10 | private static final String date = "_0123"; | 12 | private static final String date = "_0123"; |
| 11 | 13 | ||
| 12 | @Test | 14 | @Test |
| 13 | public void reactome() { | 15 | public void reactome() throws IOException { |
| 14 | testReactome(10, false); | 16 | testReactome(10, false); |
| 15 | } | 17 | } |
| 16 | 18 | ||
| 17 | @Test | 19 | @Test |
| 18 | public void chembl() { | 20 | public void chembl() throws IOException { |
| 19 | testChEMBL(1, false); | 21 | testChEMBL(1, false); |
| 20 | } | 22 | } |
| 21 | 23 | ||
| 22 | @Test | 24 | @Test |
| 23 | public void uniprot() { | 25 | public void uniprot() throws IOException { |
| 24 | testUniProt(1, false); | 26 | testUniProt(1, false); |
| 25 | } | 27 | } |
| 26 | 28 | ||
| 27 | public void testReactome(int percentage, boolean save) { | 29 | public void testReactome(int percentage, boolean save) throws IOException { |
| 28 | String[] args = new String[] { | 30 | String[] args = new String[] { |
| 29 | PagodaTester.onto_dir + "bio2rdf/reactome/biopax-level3-processed.owl", | 31 | PagodaTester.onto_dir + "bio2rdf/reactome/biopax-level3-processed.owl", |
| 30 | PagodaTester.onto_dir + "bio2rdf/reactome/graph sampling/simplifed_sample_" + percentage + ".ttl", | 32 | PagodaTester.onto_dir + "bio2rdf/reactome/graph sampling/simplifed_sample_" + percentage + ".ttl", |
| @@ -36,10 +38,10 @@ public class JAIR_Scalability { | |||
| 36 | 38 | ||
| 37 | PagodaTester.main(args); | 39 | PagodaTester.main(args); |
| 38 | if (save) | 40 | if (save) |
| 39 | AllTests.copy("log4j.log", "/home/yzhou/java-workspace/test-share/results_new/reactome/pagoda_" + percentage + "p" + date); | 41 | Utility.copyFile("log4j.log", "/home/yzhou/java-workspace/test-share/results_new/reactome/pagoda_" + percentage + "p" + date); |
| 40 | } | 42 | } |
| 41 | 43 | ||
| 42 | public void testChEMBL(int percentage, boolean save) { | 44 | public void testChEMBL(int percentage, boolean save) throws IOException { |
| 43 | String[] args = new String[] { | 45 | String[] args = new String[] { |
| 44 | PagodaTester.onto_dir + "bio2rdf/chembl/cco-noDPR.ttl", | 46 | PagodaTester.onto_dir + "bio2rdf/chembl/cco-noDPR.ttl", |
| 45 | PagodaTester.onto_dir + "bio2rdf/chembl/sample_" + percentage + ".nt", | 47 | PagodaTester.onto_dir + "bio2rdf/chembl/sample_" + percentage + ".nt", |
| @@ -55,10 +57,10 @@ public class JAIR_Scalability { | |||
| 55 | 57 | ||
| 56 | PagodaTester.main(args); | 58 | PagodaTester.main(args); |
| 57 | if (save) | 59 | if (save) |
| 58 | AllTests.copy("log4j.log", "/home/yzhou/java-workspace/test-share/results_new/chembl/pagoda_" + percentage + "p" + date); | 60 | Utility.copyFile("log4j.log", "/home/yzhou/java-workspace/test-share/results_new/chembl/pagoda_" + percentage + "p" + date); |
| 59 | } | 61 | } |
| 60 | 62 | ||
| 61 | public void testUniProt(int percentage, boolean save) { | 63 | public void testUniProt(int percentage, boolean save) throws IOException { |
| 62 | String[] args = new String[] { | 64 | String[] args = new String[] { |
| 63 | PagodaTester.onto_dir + "bio2rdf/uniprot/core-sat-processed.owl", | 65 | PagodaTester.onto_dir + "bio2rdf/uniprot/core-sat-processed.owl", |
| 64 | PagodaTester.onto_dir + "bio2rdf/uniprot/sample_" + percentage + ".nt", | 66 | PagodaTester.onto_dir + "bio2rdf/uniprot/sample_" + percentage + ".nt", |
| @@ -75,10 +77,10 @@ public class JAIR_Scalability { | |||
| 75 | 77 | ||
| 76 | PagodaTester.main(args); | 78 | PagodaTester.main(args); |
| 77 | if (save) | 79 | if (save) |
| 78 | AllTests.copy("log4j.log", "/home/yzhou/java-workspace/test-share/results_new/uniprot/pagoda_" + percentage + "p" + date); | 80 | Utility.copyFile("log4j.log", "/home/yzhou/java-workspace/test-share/results_new/uniprot/pagoda_" + percentage + "p" + date); |
| 79 | } | 81 | } |
| 80 | 82 | ||
| 81 | public static void main(String... args) { | 83 | public static void main(String... args) throws IOException { |
| 82 | Properties.ShellModeDefault = true; | 84 | Properties.ShellModeDefault = true; |
| 83 | new JAIR_Scalability().testUniProt(50, false); | 85 | new JAIR_Scalability().testUniProt(50, false); |
| 84 | } | 86 | } |
diff --git a/test/uk/ac/ox/cs/pagoda/junit/LightEvaluation.java b/test/uk/ac/ox/cs/pagoda/test_units/LightEvaluation.java index 1ddca15..29006de 100644 --- a/test/uk/ac/ox/cs/pagoda/junit/LightEvaluation.java +++ b/test/uk/ac/ox/cs/pagoda/test_units/LightEvaluation.java | |||
| @@ -1,59 +1,62 @@ | |||
| 1 | package uk.ac.ox.cs.pagoda.junit; | 1 | package uk.ac.ox.cs.pagoda.test_units; |
| 2 | 2 | ||
| 3 | import org.junit.Test; | 3 | import org.junit.Test; |
| 4 | import uk.ac.ox.cs.pagoda.tester.PagodaTester; | 4 | import uk.ac.ox.cs.pagoda.tester.PagodaTester; |
| 5 | import uk.ac.ox.cs.pagoda.util.Utility; | ||
| 6 | |||
| 7 | import java.io.IOException; | ||
| 5 | 8 | ||
| 6 | public class LightEvaluation { | 9 | public class LightEvaluation { |
| 7 | 10 | ||
| 8 | @Test | 11 | @Test |
| 9 | public void uobm1() { | 12 | public void uobm1() throws IOException { |
| 10 | int number = 1; | 13 | int number = 1; |
| 11 | PagodaTester.main( | 14 | PagodaTester.main( |
| 12 | PagodaTester.onto_dir + "uobm/univ-bench-dl.owl", | 15 | PagodaTester.onto_dir + "uobm/univ-bench-dl.owl", |
| 13 | PagodaTester.onto_dir + "uobm/data/uobm" + number + ".ttl", | 16 | PagodaTester.onto_dir + "uobm/data/uobm" + number + ".ttl", |
| 14 | PagodaTester.onto_dir + "uobm/queries/standard.sparql" | 17 | PagodaTester.onto_dir + "uobm/queries/standard.sparql" |
| 15 | ); | 18 | ); |
| 16 | AllTests.copy("log4j.log", "output/jair/uobm1.out"); | 19 | Utility.copyFile("log4j.log", "output/jair/uobm1.out"); |
| 17 | } | 20 | } |
| 18 | 21 | ||
| 19 | @Test | 22 | @Test |
| 20 | public void lubm100() { | 23 | public void lubm100() throws IOException { |
| 21 | int number = 100; | 24 | int number = 100; |
| 22 | PagodaTester.main( | 25 | PagodaTester.main( |
| 23 | PagodaTester.onto_dir + "lubm/univ-bench.owl", | 26 | PagodaTester.onto_dir + "lubm/univ-bench.owl", |
| 24 | PagodaTester.onto_dir + "lubm/data/lubm" + number + ".ttl", | 27 | PagodaTester.onto_dir + "lubm/data/lubm" + number + ".ttl", |
| 25 | PagodaTester.onto_dir + "lubm/queries/test.sparql" | 28 | PagodaTester.onto_dir + "lubm/queries/test.sparql" |
| 26 | ); | 29 | ); |
| 27 | AllTests.copy("log4j.log", "results-backup/current/lubm100.out"); | 30 | Utility.copyFile("log4j.log", "results-backup/current/lubm100.out"); |
| 28 | } | 31 | } |
| 29 | 32 | ||
| 30 | @Test | 33 | @Test |
| 31 | public void fly() { | 34 | public void fly() throws IOException { |
| 32 | PagodaTester.main( | 35 | PagodaTester.main( |
| 33 | PagodaTester.onto_dir + "fly/fly_anatomy_XP_with_GJ_FC_individuals.owl", | 36 | PagodaTester.onto_dir + "fly/fly_anatomy_XP_with_GJ_FC_individuals.owl", |
| 34 | PagodaTester.onto_dir + "fly/queries/fly.sparql" | 37 | PagodaTester.onto_dir + "fly/queries/fly.sparql" |
| 35 | ); | 38 | ); |
| 36 | AllTests.copy("log4j.log", "results-backup/current/fly.out"); | 39 | Utility.copyFile("log4j.log", "results-backup/current/fly.out"); |
| 37 | } | 40 | } |
| 38 | 41 | ||
| 39 | @Test | 42 | @Test |
| 40 | public void dbpedia() { | 43 | public void dbpedia() throws IOException { |
| 41 | PagodaTester.main( | 44 | PagodaTester.main( |
| 42 | PagodaTester.onto_dir + "dbpedia/integratedOntology-all-in-one-minus-datatype.owl", | 45 | PagodaTester.onto_dir + "dbpedia/integratedOntology-all-in-one-minus-datatype.owl", |
| 43 | PagodaTester.onto_dir + "dbpedia/data/dbpedia-minus-datatype-new.ttl", | 46 | PagodaTester.onto_dir + "dbpedia/data/dbpedia-minus-datatype-new.ttl", |
| 44 | PagodaTester.onto_dir + "dbpedia/atomic.sparql" | 47 | PagodaTester.onto_dir + "dbpedia/atomic.sparql" |
| 45 | ); | 48 | ); |
| 46 | AllTests.copy("log4j.log", "results-backup/current/dbpedia.out"); | 49 | Utility.copyFile("log4j.log", "results-backup/current/dbpedia.out"); |
| 47 | } | 50 | } |
| 48 | 51 | ||
| 49 | @Test | 52 | @Test |
| 50 | public void npdWithoutDataType() { | 53 | public void npdWithoutDataType() throws IOException { |
| 51 | PagodaTester.main( | 54 | PagodaTester.main( |
| 52 | PagodaTester.onto_dir + "npd/npd-all-minus-datatype.owl", | 55 | PagodaTester.onto_dir + "npd/npd-all-minus-datatype.owl", |
| 53 | PagodaTester.onto_dir + "npd/data/npd-data-dump-minus-datatype-new.ttl", | 56 | PagodaTester.onto_dir + "npd/data/npd-data-dump-minus-datatype-new.ttl", |
| 54 | PagodaTester.onto_dir + "npd/queries/atomic.sparql" | 57 | PagodaTester.onto_dir + "npd/queries/atomic.sparql" |
| 55 | ); | 58 | ); |
| 56 | AllTests.copy("log4j.log", "results-backup/current/npd_minus.out"); | 59 | Utility.copyFile("log4j.log", "results-backup/current/npd_minus.out"); |
| 57 | } | 60 | } |
| 58 | 61 | ||
| 59 | } | 62 | } |
diff --git a/test/uk/ac/ox/cs/pagoda/junit/PagodaDBPedia.java b/test/uk/ac/ox/cs/pagoda/test_units/PagodaDBPedia.java index 37ffb44..aaf542e 100644 --- a/test/uk/ac/ox/cs/pagoda/junit/PagodaDBPedia.java +++ b/test/uk/ac/ox/cs/pagoda/test_units/PagodaDBPedia.java | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | package uk.ac.ox.cs.pagoda.junit; | 1 | package uk.ac.ox.cs.pagoda.test_units; |
| 2 | 2 | ||
| 3 | import static org.junit.Assert.fail; | 3 | import static org.junit.Assert.fail; |
| 4 | 4 | ||
| @@ -6,11 +6,14 @@ import org.junit.Test; | |||
| 6 | 6 | ||
| 7 | import uk.ac.ox.cs.pagoda.tester.PagodaTester; | 7 | import uk.ac.ox.cs.pagoda.tester.PagodaTester; |
| 8 | import uk.ac.ox.cs.pagoda.tester.Statistics; | 8 | import uk.ac.ox.cs.pagoda.tester.Statistics; |
| 9 | import uk.ac.ox.cs.pagoda.util.Utility; | ||
| 10 | |||
| 11 | import java.io.IOException; | ||
| 9 | 12 | ||
| 10 | public class PagodaDBPedia { | 13 | public class PagodaDBPedia { |
| 11 | 14 | ||
| 12 | @Test | 15 | @Test |
| 13 | public void test() { | 16 | public void test() throws IOException { |
| 14 | PagodaTester.main( | 17 | PagodaTester.main( |
| 15 | PagodaTester.onto_dir + "dbpedia/integratedOntology-all-in-one-minus-datatype.owl", | 18 | PagodaTester.onto_dir + "dbpedia/integratedOntology-all-in-one-minus-datatype.owl", |
| 16 | PagodaTester.onto_dir + "dbpedia/data/dbpedia-minus-datatype-new.ttl", | 19 | PagodaTester.onto_dir + "dbpedia/data/dbpedia-minus-datatype-new.ttl", |
| @@ -18,8 +21,8 @@ public class PagodaDBPedia { | |||
| 18 | ); | 21 | ); |
| 19 | 22 | ||
| 20 | Statistics stat = new Statistics("output/log4j.log"); | 23 | Statistics stat = new Statistics("output/log4j.log"); |
| 21 | String diff = stat.diff("results-backup/benchmark/dbpedia.out"); | 24 | String diff = stat.diff("results-backup/benchmark/dbpedia.out"); |
| 22 | AllTests.copy("output/log4j.log", "results-backup/current/dbpedia.out"); | 25 | Utility.copyFile("output/log4j.log", "results-backup/current/dbpedia.out"); |
| 23 | if (!diff.isEmpty()) | 26 | if (!diff.isEmpty()) |
| 24 | fail(diff); | 27 | fail(diff); |
| 25 | } | 28 | } |
diff --git a/test/uk/ac/ox/cs/pagoda/junit/PagodaELU.java b/test/uk/ac/ox/cs/pagoda/test_units/PagodaELU.java index d999a6e..c2fa838 100644 --- a/test/uk/ac/ox/cs/pagoda/junit/PagodaELU.java +++ b/test/uk/ac/ox/cs/pagoda/test_units/PagodaELU.java | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | package uk.ac.ox.cs.pagoda.junit; | 1 | package uk.ac.ox.cs.pagoda.test_units; |
| 2 | 2 | ||
| 3 | import org.junit.Test; | 3 | import org.junit.Test; |
| 4 | import uk.ac.ox.cs.pagoda.tester.PagodaTester; | 4 | import uk.ac.ox.cs.pagoda.tester.PagodaTester; |
diff --git a/test/uk/ac/ox/cs/pagoda/junit/PagodaFLY.java b/test/uk/ac/ox/cs/pagoda/test_units/PagodaFLY.java index 4631837..2fe07f0 100644 --- a/test/uk/ac/ox/cs/pagoda/junit/PagodaFLY.java +++ b/test/uk/ac/ox/cs/pagoda/test_units/PagodaFLY.java | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | package uk.ac.ox.cs.pagoda.junit; | 1 | package uk.ac.ox.cs.pagoda.test_units; |
| 2 | 2 | ||
| 3 | import org.junit.Test; | 3 | import org.junit.Test; |
| 4 | 4 | ||
diff --git a/test/uk/ac/ox/cs/pagoda/test_units/PagodaLUBM.java b/test/uk/ac/ox/cs/pagoda/test_units/PagodaLUBM.java new file mode 100644 index 0000000..f40e41b --- /dev/null +++ b/test/uk/ac/ox/cs/pagoda/test_units/PagodaLUBM.java | |||
| @@ -0,0 +1,68 @@ | |||
| 1 | package uk.ac.ox.cs.pagoda.test_units; | ||
| 2 | |||
| 3 | import org.testng.Assert; | ||
| 4 | import org.testng.annotations.Test; | ||
| 5 | import uk.ac.ox.cs.pagoda.tester.PagodaTester; | ||
| 6 | import uk.ac.ox.cs.pagoda.tester.Statistics; | ||
| 7 | import uk.ac.ox.cs.pagoda.util.Utility; | ||
| 8 | |||
| 9 | import java.io.FileInputStream; | ||
| 10 | import java.io.IOException; | ||
| 11 | import java.util.Properties; | ||
| 12 | |||
| 13 | public class PagodaLUBM { | ||
| 14 | |||
| 15 | public static final String CONFIG_FILE = "config/test.properties"; | ||
| 16 | |||
| 17 | private static boolean isInit = false; | ||
| 18 | private static String ontoDir; | ||
| 19 | |||
| 20 | private static void init() { | ||
| 21 | if(isInit) return; | ||
| 22 | isInit = true; | ||
| 23 | |||
| 24 | Properties config = new Properties(); | ||
| 25 | |||
| 26 | try(FileInputStream in = new FileInputStream(CONFIG_FILE)) { | ||
| 27 | config.load(in); | ||
| 28 | in.close(); | ||
| 29 | } catch (IOException e) { | ||
| 30 | e.printStackTrace(); | ||
| 31 | } | ||
| 32 | |||
| 33 | ontoDir = config.getProperty("ontoDir"); | ||
| 34 | } | ||
| 35 | |||
| 36 | private void test_all(int number) { | ||
| 37 | init(); | ||
| 38 | PagodaTester.main( | ||
| 39 | Utility.combinePaths(ontoDir, "lubm/univ-bench.owl"), | ||
| 40 | Utility.combinePaths(ontoDir, "lubm/data/lubm" + number + ".ttl"), | ||
| 41 | Utility.combinePaths(ontoDir, "lubm/queries/test.sparql") | ||
| 42 | ); | ||
| 43 | |||
| 44 | // assertTrue(false); | ||
| 45 | // AllTests.copy("log4j.log", "output/jair/lubm" + number + ".out"); | ||
| 46 | } | ||
| 47 | |||
| 48 | @Test | ||
| 49 | public void test1() { | ||
| 50 | test_all(1); | ||
| 51 | } | ||
| 52 | |||
| 53 | // @Test | ||
| 54 | // public void test() { | ||
| 55 | // int number = 100; | ||
| 56 | // test_all(number); | ||
| 57 | // } | ||
| 58 | |||
| 59 | private void check(int number) throws IOException { | ||
| 60 | Statistics stat = new Statistics("output/log4j.log"); | ||
| 61 | // TODO insert proper file | ||
| 62 | String diff = stat.diff("results-backup/benchmark/lubm" + number + ".out"); | ||
| 63 | Utility.copyFile("output/log4j.log", "results-backup/current/lubm" + number + ".out"); | ||
| 64 | if (!diff.isEmpty()) | ||
| 65 | Assert.fail(diff); | ||
| 66 | } | ||
| 67 | |||
| 68 | } | ||
diff --git a/test/uk/ac/ox/cs/pagoda/junit/PagodaNPD.java b/test/uk/ac/ox/cs/pagoda/test_units/PagodaNPD.java index 96edbb4..8fbe793 100644 --- a/test/uk/ac/ox/cs/pagoda/junit/PagodaNPD.java +++ b/test/uk/ac/ox/cs/pagoda/test_units/PagodaNPD.java | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | package uk.ac.ox.cs.pagoda.junit; | 1 | package uk.ac.ox.cs.pagoda.test_units; |
| 2 | 2 | ||
| 3 | import static org.junit.Assert.fail; | 3 | import static org.junit.Assert.fail; |
| 4 | 4 | ||
| @@ -6,11 +6,14 @@ import org.junit.Test; | |||
| 6 | 6 | ||
| 7 | import uk.ac.ox.cs.pagoda.tester.PagodaTester; | 7 | import uk.ac.ox.cs.pagoda.tester.PagodaTester; |
| 8 | import uk.ac.ox.cs.pagoda.tester.Statistics; | 8 | import uk.ac.ox.cs.pagoda.tester.Statistics; |
| 9 | import uk.ac.ox.cs.pagoda.util.Utility; | ||
| 10 | |||
| 11 | import java.io.IOException; | ||
| 9 | 12 | ||
| 10 | public class PagodaNPD { | 13 | public class PagodaNPD { |
| 11 | 14 | ||
| 12 | @Test | 15 | @Test |
| 13 | public void testNPDwithoutDataType() { | 16 | public void testNPDwithoutDataType() throws IOException { |
| 14 | PagodaTester.main( | 17 | PagodaTester.main( |
| 15 | PagodaTester.onto_dir + "npd/npd-all-minus-datatype.owl", | 18 | PagodaTester.onto_dir + "npd/npd-all-minus-datatype.owl", |
| 16 | PagodaTester.onto_dir + "npd/data/npd-data-dump-minus-datatype-new.ttl", | 19 | PagodaTester.onto_dir + "npd/data/npd-data-dump-minus-datatype-new.ttl", |
| @@ -18,14 +21,14 @@ public class PagodaNPD { | |||
| 18 | ); | 21 | ); |
| 19 | 22 | ||
| 20 | Statistics stat = new Statistics("output/log4j.log"); | 23 | Statistics stat = new Statistics("output/log4j.log"); |
| 21 | String diff = stat.diff("results-backup/benchmark/npd_minus.out"); | 24 | String diff = stat.diff("results-backup/benchmark/npd_minus.out"); |
| 22 | AllTests.copy("output/log4j.log", "results-backup/current/npd_minus.out"); | 25 | Utility.copyFile("output/log4j.log", "results-backup/current/npd_minus.out"); |
| 23 | if (!diff.isEmpty()) | 26 | if (!diff.isEmpty()) |
| 24 | fail(diff); | 27 | fail(diff); |
| 25 | } | 28 | } |
| 26 | 29 | ||
| 27 | @Test | 30 | @Test |
| 28 | public void testNPD() { | 31 | public void testNPD() throws IOException { |
| 29 | PagodaTester.main( | 32 | PagodaTester.main( |
| 30 | PagodaTester.onto_dir + "npd/npd-all.owl", | 33 | PagodaTester.onto_dir + "npd/npd-all.owl", |
| 31 | PagodaTester.onto_dir + "npd/data/npd-data-dump-processed.ttl", | 34 | PagodaTester.onto_dir + "npd/data/npd-data-dump-processed.ttl", |
| @@ -33,8 +36,8 @@ public class PagodaNPD { | |||
| 33 | ); | 36 | ); |
| 34 | 37 | ||
| 35 | Statistics stat = new Statistics("output/log4j.log"); | 38 | Statistics stat = new Statistics("output/log4j.log"); |
| 36 | String diff = stat.diff("results-backup/benchmark/npd.out"); | 39 | String diff = stat.diff("results-backup/benchmark/npd.out"); |
| 37 | AllTests.copy("output/log4j.log", "results-backup/current/npd.out"); | 40 | Utility.copyFile("output/log4j.log", "results-backup/current/npd.out"); |
| 38 | if (!diff.isEmpty()) | 41 | if (!diff.isEmpty()) |
| 39 | fail(diff); | 42 | fail(diff); |
| 40 | } | 43 | } |
diff --git a/test/uk/ac/ox/cs/pagoda/junit/PagodaNPD_bench.java b/test/uk/ac/ox/cs/pagoda/test_units/PagodaNPD_bench.java index df1a57d..1243180 100644 --- a/test/uk/ac/ox/cs/pagoda/junit/PagodaNPD_bench.java +++ b/test/uk/ac/ox/cs/pagoda/test_units/PagodaNPD_bench.java | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | package uk.ac.ox.cs.pagoda.junit; | 1 | package uk.ac.ox.cs.pagoda.test_units; |
| 2 | 2 | ||
| 3 | import static org.junit.Assert.fail; | 3 | import static org.junit.Assert.fail; |
| 4 | 4 | ||
| @@ -6,11 +6,14 @@ import org.junit.Test; | |||
| 6 | 6 | ||
| 7 | import uk.ac.ox.cs.pagoda.tester.PagodaTester; | 7 | import uk.ac.ox.cs.pagoda.tester.PagodaTester; |
| 8 | import uk.ac.ox.cs.pagoda.tester.Statistics; | 8 | import uk.ac.ox.cs.pagoda.tester.Statistics; |
| 9 | import uk.ac.ox.cs.pagoda.util.Utility; | ||
| 10 | |||
| 11 | import java.io.IOException; | ||
| 9 | 12 | ||
| 10 | public class PagodaNPD_bench { | 13 | public class PagodaNPD_bench { |
| 11 | 14 | ||
| 12 | @Test | 15 | @Test |
| 13 | public void test() { | 16 | public void test() throws IOException { |
| 14 | PagodaTester.main( | 17 | PagodaTester.main( |
| 15 | PagodaTester.onto_dir + "npd-benchmark/npd-v2-ql_a.owl", | 18 | PagodaTester.onto_dir + "npd-benchmark/npd-v2-ql_a.owl", |
| 16 | PagodaTester.onto_dir + "npd-benchmark/npd-v2-ql_a.ttl", | 19 | PagodaTester.onto_dir + "npd-benchmark/npd-v2-ql_a.ttl", |
| @@ -18,8 +21,8 @@ public class PagodaNPD_bench { | |||
| 18 | ); | 21 | ); |
| 19 | 22 | ||
| 20 | Statistics stat = new Statistics("output/log4j.log"); | 23 | Statistics stat = new Statistics("output/log4j.log"); |
| 21 | String diff = stat.diff("results-backup/benchmark/npd-bench.out"); | 24 | String diff = stat.diff("results-backup/benchmark/npd-bench.out"); |
| 22 | AllTests.copy("output/log4j.log", "results-backup/current/npd-bench.out"); | 25 | Utility.copyFile("output/log4j.log", "results-backup/current/npd-bench.out"); |
| 23 | if (!diff.isEmpty()) | 26 | if (!diff.isEmpty()) |
| 24 | fail(diff); | 27 | fail(diff); |
| 25 | } | 28 | } |
diff --git a/test/uk/ac/ox/cs/pagoda/junit/PagodaRLU.java b/test/uk/ac/ox/cs/pagoda/test_units/PagodaRLU.java index 5d93302..8b31c99 100644 --- a/test/uk/ac/ox/cs/pagoda/junit/PagodaRLU.java +++ b/test/uk/ac/ox/cs/pagoda/test_units/PagodaRLU.java | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | package uk.ac.ox.cs.pagoda.junit; | 1 | package uk.ac.ox.cs.pagoda.test_units; |
| 2 | 2 | ||
| 3 | import org.junit.Test; | 3 | import org.junit.Test; |
| 4 | import uk.ac.ox.cs.pagoda.tester.PagodaTester; | 4 | import uk.ac.ox.cs.pagoda.tester.PagodaTester; |
diff --git a/test/uk/ac/ox/cs/pagoda/test_units/PagodaUOBM.java b/test/uk/ac/ox/cs/pagoda/test_units/PagodaUOBM.java new file mode 100644 index 0000000..29a9056 --- /dev/null +++ b/test/uk/ac/ox/cs/pagoda/test_units/PagodaUOBM.java | |||
| @@ -0,0 +1,79 @@ | |||
| 1 | package uk.ac.ox.cs.pagoda.test_units; | ||
| 2 | |||
| 3 | import org.testng.annotations.Test; | ||
| 4 | import uk.ac.ox.cs.pagoda.tester.PagodaTester; | ||
| 5 | import uk.ac.ox.cs.pagoda.tester.Statistics; | ||
| 6 | import uk.ac.ox.cs.pagoda.util.Utility; | ||
| 7 | |||
| 8 | import java.io.FileInputStream; | ||
| 9 | import java.io.IOException; | ||
| 10 | import java.util.Properties; | ||
| 11 | |||
| 12 | public class PagodaUOBM { | ||
| 13 | |||
| 14 | public static final String CONFIG_FILE = "config/test.properties"; | ||
| 15 | |||
| 16 | private static boolean isInit = false; | ||
| 17 | private static String ontoDir; | ||
| 18 | |||
| 19 | private static void init() { | ||
| 20 | if(isInit) return; | ||
| 21 | isInit = true; | ||
| 22 | |||
| 23 | Properties config = new Properties(); | ||
| 24 | |||
| 25 | try(FileInputStream in = new FileInputStream(CONFIG_FILE)) { | ||
| 26 | config.load(in); | ||
| 27 | in.close(); | ||
| 28 | } catch (IOException e) { | ||
| 29 | e.printStackTrace(); | ||
| 30 | } | ||
| 31 | |||
| 32 | ontoDir = config.getProperty("ontoDir"); | ||
| 33 | } | ||
| 34 | |||
| 35 | private void test_all(int number ) { | ||
| 36 | init(); | ||
| 37 | |||
| 38 | PagodaTester.main( | ||
| 39 | Utility.combinePaths(ontoDir, "uobm/univ-bench-dl.owl"), | ||
| 40 | Utility.combinePaths(ontoDir, "uobm/data/uobm" + number + ".ttl"), | ||
| 41 | Utility.combinePaths(ontoDir, "uobm/queries/test.sparql") | ||
| 42 | // + ";" + | ||
| 43 | // Utility.combinePaths(ontoDir, "uobm/queries/standard_group3_all_less.sparql") + ";" + | ||
| 44 | // Utility.combinePaths(ontoDir, "uobm/queries/G3.sparql") + ";" + | ||
| 45 | // Utility.combinePaths(ontoDir, "uobm/queries/last.sparql") | ||
| 46 | ); | ||
| 47 | |||
| 48 | // AllTests.copy("log4j.log", "output/jair/newuobm/uobm" + number + ".out"); | ||
| 49 | } | ||
| 50 | |||
| 51 | private void test_upToSum(int number) { | ||
| 52 | init(); | ||
| 53 | |||
| 54 | PagodaTester.main( | ||
| 55 | PagodaTester.onto_dir + "uobm/univ-bench-dl.owl", | ||
| 56 | PagodaTester.onto_dir + "uobm/data/uobm" + number + ".ttl", | ||
| 57 | PagodaTester.onto_dir + "uobm/queries/standard_group3_all.sparql" | ||
| 58 | ); | ||
| 59 | |||
| 60 | // AllTests.copy("log4j.log", "output/jair/uobm" + number + ".out"); | ||
| 61 | } | ||
| 62 | |||
| 63 | @Test | ||
| 64 | public void test1() { test_all(1); } | ||
| 65 | |||
| 66 | // @Test | ||
| 67 | public void test500() { test_upToSum(500); } | ||
| 68 | |||
| 69 | // public static void main(String... args) { | ||
| 70 | // new PagodaUOBM().test_all(1); | ||
| 71 | // } | ||
| 72 | |||
| 73 | private void check() { | ||
| 74 | Statistics stat = new Statistics("results-backup/current/uobm1.out"); | ||
| 75 | String diff = stat.diff("results-backup/benchmark/uobm1.out"); | ||
| 76 | System.out.println(diff); | ||
| 77 | } | ||
| 78 | |||
| 79 | } | ||
diff --git a/test/uk/ac/ox/cs/pagoda/tester/PagodaTester.java b/test/uk/ac/ox/cs/pagoda/tester/PagodaTester.java index 05a7d70..51b41f9 100644 --- a/test/uk/ac/ox/cs/pagoda/tester/PagodaTester.java +++ b/test/uk/ac/ox/cs/pagoda/tester/PagodaTester.java | |||
| @@ -17,7 +17,7 @@ public class PagodaTester { | |||
| 17 | // public static final String onto_dir = "/media/RDFData/yzhou/"; | 17 | // public static final String onto_dir = "/media/RDFData/yzhou/"; |
| 18 | // public static final String onto_dir = "/users/yzhou/ontologies/"; | 18 | // public static final String onto_dir = "/users/yzhou/ontologies/"; |
| 19 | // public static final String onto_dir = "/home/scratch/yzhou/ontologies/"; | 19 | // public static final String onto_dir = "/home/scratch/yzhou/ontologies/"; |
| 20 | public static final String onto_dir = "/home/yzhou/krr-nas-share/Yujiao/ontologies/"; | 20 | public static final String onto_dir = "/home/alessandro/Big_files/Ontologies/"; |
| 21 | 21 | ||
| 22 | public static final String fly = onto_dir + "fly/fly_anatomy_XP_with_GJ_FC_individuals.owl"; | 22 | public static final String fly = onto_dir + "fly/fly_anatomy_XP_with_GJ_FC_individuals.owl"; |
| 23 | public static final String fly_query = onto_dir + "fly/queries/fly.sparql"; | 23 | public static final String fly_query = onto_dir + "fly/queries/fly.sparql"; |
| @@ -88,12 +88,12 @@ public class PagodaTester { | |||
| 88 | 88 | ||
| 89 | public static final String atlas_tbox = onto_dir + "bio2rdf/atlas/gxaterms.owl"; | 89 | public static final String atlas_tbox = onto_dir + "bio2rdf/atlas/gxaterms.owl"; |
| 90 | public static final String atlas_abox = onto_dir + "bio2rdf/atlas/graph sampling/sample_1.nt"; | 90 | public static final String atlas_abox = onto_dir + "bio2rdf/atlas/graph sampling/sample_1.nt"; |
| 91 | public static final String atlas_queries = onto_dir + "bio2rdf/atlas/queries/atomic_one.sparql"; | 91 | public static final String atlas_queries = onto_dir + "bio2rdf/atlas/queries/atomic_one.sparql"; |
| 92 | 92 | ||
| 93 | public static void main(String... args) { | 93 | public static void main(String... args) { |
| 94 | if (args.length == 0) { | 94 | if (args.length == 0) { |
| 95 | // args = new String[] {test_tbox, test_abox, test_query}; | 95 | // args = new String[] {test_tbox, test_abox, test_query}; |
| 96 | // args = new String[] {lubm_tbox, lubm_abox, lubm_query.replace(".sparql", "_all_pagoda.sparql")}; | 96 | args = new String[] {lubm_tbox, lubm_abox, lubm_query}; |
| 97 | // args = new String[] {uobm_tbox, uobm_abox, uobm_query.replace(".sparql", "_all_pagoda.sparql")}; | 97 | // args = new String[] {uobm_tbox, uobm_abox, uobm_query.replace(".sparql", "_all_pagoda.sparql")}; |
| 98 | // args = new String[] {fly, "null", fly_query.replace(".sparql", "_pellet.sparql") }; | 98 | // args = new String[] {fly, "null", fly_query.replace(".sparql", "_pellet.sparql") }; |
| 99 | // args = new String[] {dbpedia_tbox, dbpedia_abox, dbpedia_query}; | 99 | // args = new String[] {dbpedia_tbox, dbpedia_abox, dbpedia_query}; |
| @@ -129,10 +129,10 @@ public class PagodaTester { | |||
| 129 | if (args.length > index) properties.setToClassify(Boolean.parseBoolean(args[index++].substring(1))); | 129 | if (args.length > index) properties.setToClassify(Boolean.parseBoolean(args[index++].substring(1))); |
| 130 | if (args.length > index) properties.setToCallHermiT(Boolean.parseBoolean(args[index++].substring(1))); | 130 | if (args.length > index) properties.setToCallHermiT(Boolean.parseBoolean(args[index++].substring(1))); |
| 131 | 131 | ||
| 132 | System.out.println("Ontology file: " + properties.getOntologyPath()); | 132 | Utility.logInfo("Ontology file: " + properties.getOntologyPath()); |
| 133 | System.out.println("Data files: " + properties.getDataPath()); | 133 | Utility.logInfo("Data files: " + properties.getDataPath()); |
| 134 | System.out.println("Query files: " + properties.getQueryPath()); | 134 | Utility.logInfo("Query files: " + properties.getQueryPath()); |
| 135 | System.out.println("Answer file: " + properties.getAnswerPath()); | 135 | Utility.logInfo("Answer file: " + properties.getAnswerPath()); |
| 136 | 136 | ||
| 137 | QueryReasoner pagoda = null; | 137 | QueryReasoner pagoda = null; |
| 138 | 138 | ||
