From 4a325c8ff5fbe52c0334d4baf4767abf257f9ca2 Mon Sep 17 00:00:00 2001 From: Antonin Delpeuch Date: Wed, 3 Jan 2018 18:37:16 +0100 Subject: [PATCH 1/3] Configure testing for the Jython extension --- build.xml | 4 ++ extensions/build.xml | 5 ++ extensions/jython/build.xml | 69 ++++++++++++++++++- extensions/jython/tests/conf/tests.xml | 14 ++++ .../refine/jython/JythonEvaluableTest.java | 0 .../jython/tests/src/tests.log4j.properties | 4 ++ refine | 8 +++ 7 files changed, 102 insertions(+), 2 deletions(-) create mode 100644 extensions/jython/tests/conf/tests.xml rename extensions/jython/tests/{ => src}/com/google/refine/jython/JythonEvaluableTest.java (100%) create mode 100644 extensions/jython/tests/src/tests.log4j.properties diff --git a/build.xml b/build.xml index 1151ff7ca..a3e2404cd 100644 --- a/build.xml +++ b/build.xml @@ -206,6 +206,10 @@ + + + + diff --git a/extensions/build.xml b/extensions/build.xml index 1b7fa19ad..c2378e31e 100644 --- a/extensions/build.xml +++ b/extensions/build.xml @@ -22,4 +22,9 @@ + + + + + diff --git a/extensions/jython/build.xml b/extensions/jython/build.xml index 4b4f151b0..3c609f15e 100644 --- a/extensions/jython/build.xml +++ b/extensions/jython/build.xml @@ -5,8 +5,8 @@ | OpenRefine Extension Jython Build File | +--> - - + + @@ -27,12 +27,14 @@ + + @@ -40,6 +42,14 @@ + + + + + + + + @@ -48,7 +58,23 @@ + + + + + + + + + + + + + + + + @@ -60,7 +86,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/extensions/jython/tests/conf/tests.xml b/extensions/jython/tests/conf/tests.xml new file mode 100644 index 000000000..86ba31ab2 --- /dev/null +++ b/extensions/jython/tests/conf/tests.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/extensions/jython/tests/com/google/refine/jython/JythonEvaluableTest.java b/extensions/jython/tests/src/com/google/refine/jython/JythonEvaluableTest.java similarity index 100% rename from extensions/jython/tests/com/google/refine/jython/JythonEvaluableTest.java rename to extensions/jython/tests/src/com/google/refine/jython/JythonEvaluableTest.java diff --git a/extensions/jython/tests/src/tests.log4j.properties b/extensions/jython/tests/src/tests.log4j.properties new file mode 100644 index 000000000..ce3509f30 --- /dev/null +++ b/extensions/jython/tests/src/tests.log4j.properties @@ -0,0 +1,4 @@ +log4j.rootLogger=ERROR, console + +log4j.appender.console=org.apache.log4j.ConsoleAppender +log4j.appender.console.layout=com.google.refine.logging.IndentingLayout diff --git a/refine b/refine index 4f0f68fa0..798152ab6 100755 --- a/refine +++ b/refine @@ -66,6 +66,7 @@ and is one of test ................................ Run all OpenRefine tests server_test ......................... Run only the server tests ui_test ............................. Run only the UI tests + extensions_test ..................... Run only the extensions tests broker .............................. Run OpenRefine Broker @@ -591,6 +592,7 @@ mac_dist() { test() { server_test $1 ui_test $1 + extensions_test $1 } ui_test() { @@ -635,6 +637,10 @@ server_test() { ant server_test } +extensions_test() { + ant extensions_test +} + run() { FORK=$1 @@ -1018,6 +1024,8 @@ case "$ACTION" in ui_tests) ui_test $1;; server_test) server_test $1;; server_tests) server_test $1;; + extensions_test) extensions_test $1;; + extensions_tests) extensions_test $1;; findbugs) findbugs;; pmd) pmd;; cpd) cpd;; From 2b987854ab6f424351fab5f3c95a85dabc49baf8 Mon Sep 17 00:00:00 2001 From: Antonin Delpeuch Date: Wed, 3 Jan 2018 18:37:51 +0100 Subject: [PATCH 2/3] Enable Jython tests in Travis --- .travis.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 02336ce48..0563e8378 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,7 +9,9 @@ env: before_install: - wget -O ~/codacy-coverage-reporter-assembly-latest.jar https://github.com/codacy/codacy-coverage-reporter/releases/download/2.0.0/codacy-coverage-reporter-2.0.0-assembly.jar -script: ./refine server_test +script: + - ./refine server_test + - ./refine extensions_test after_success: - java -cp ~/codacy-coverage-reporter-assembly-latest.jar com.codacy.CodacyCoverageReporter -l Java -r build/report/jacoco.xml From 0f03d77178596c432e32b8c2d73fa9fb9a61cc59 Mon Sep 17 00:00:00 2001 From: Antonin Delpeuch Date: Wed, 3 Jan 2018 19:32:22 +0100 Subject: [PATCH 3/3] Enable extension tests in Appveyor --- appveyor.yml | 1 + build.xml | 1 + refine.bat | 2 ++ 3 files changed, 4 insertions(+) diff --git a/appveyor.yml b/appveyor.yml index 14214aad1..0a41220b5 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -20,3 +20,4 @@ test_script: cd OpenRefine refine server_test + refine extensions_test diff --git a/build.xml b/build.xml index a3e2404cd..4ad005eba 100644 --- a/build.xml +++ b/build.xml @@ -206,6 +206,7 @@ + diff --git a/refine.bat b/refine.bat index a0685293d..f06b35dcc 100644 --- a/refine.bat +++ b/refine.bat @@ -47,6 +47,7 @@ echo build ..................... Build OpenRefine echo run ....................... Run OpenRefine echo. echo server_test ............... Run the server tests +echo extensions_test ........... Run the extensions tests echo. echo clean ..................... Clean compiled classes @@ -184,6 +185,7 @@ set ACTION=%1 if ""%ACTION%"" == ""build"" goto doAnt if ""%ACTION%"" == ""server_test"" goto doAnt +if ""%ACTION%"" == ""extensions_test"" goto doAnt if ""%ACTION%"" == ""clean"" goto doAnt if ""%ACTION%"" == ""distclean"" goto doAnt if ""%ACTION%"" == ""run"" goto doRun