Simplify test invocation

This commit is contained in:
Antonin Delpeuch 2018-09-10 14:26:14 +01:00
parent 51f6867dc0
commit 75414fb1c3
4 changed files with 9 additions and 10 deletions

View File

@ -22,11 +22,9 @@ before_install:
- psql -c 'CREATE DATABASE test_db;' -U postgres
- psql -U postgres test_db < extensions/database/tests/conf/travis-pgsql.sql
- cp extensions/database/tests/conf/travis_tests.xml extensions/database/tests/conf/tests.xml
- mvn process-resources
script:
- ./refine server_test
- ./refine extensions_test
- ./refine test
after_success:
- java -cp ~/codacy-coverage-reporter-assembly-latest.jar com.codacy.CodacyCoverageReporter -l Java -r build/report/jacoco.xml

View File

@ -37,6 +37,7 @@ before_test:
psql -U postgres test_db < extensions\database\tests\conf\travis-pgsql.sql
copy extensions\database\tests\conf\appveyor_tests.xml extensions\database\tests\conf\tests.xml
- cmd: mvn install -DskipTests=true -Dmaven.javadoc.skip=true -B -V
test_script:
- cmd: echo Running test_script...
@ -45,6 +46,4 @@ test_script:
path
refine server_test
refine extensions_test
refine test

4
refine
View File

@ -623,12 +623,12 @@ ui_test() {
server_test() {
mvn_prepare
$MVN test -pl main
$MVN test -f main
}
extensions_test() {
mvn_prepare
$MVN test -pl extensions
$MVN test -f extensions
}
run() {

View File

@ -47,6 +47,7 @@ echo.
echo build ..................... Build OpenRefine
echo run ....................... Run OpenRefine
echo.
echo test ...................... Run all the tests
echo server_test ............... Run the server tests
echo extensions_test ........... Run the extensions tests
echo.
@ -234,8 +235,9 @@ echo.
:gotMvnHome
set MVN_ACTION=""%ACTION%""
if ""%ACTION%"" == ""build"" set MVN_ACTION=""process-resources compile dependency:build-classpath""
if ""%ACTION%"" == ""server_test"" set MVN_ACTION=""process-resources compile test -pl main""
if ""%ACTION%"" == ""extensions_test"" set MVN_ACTION=""process-resources compile test -pl extensions""
if ""%ACTION%"" == ""test"" set MVN_ACTION=""process-resources compile test""
if ""%ACTION%"" == ""server_test"" set MVN_ACTION=""process-resources compile test -f main""
if ""%ACTION%"" == ""extensions_test"" set MVN_ACTION=""process-resources compile test -f extensions""
"%MAVEN_HOME%\bin\mvn.cmd" %MVN_ACTION%
goto end