Remove unit_tests.xml and rename others

This commit is contained in:
Antonin Delpeuch 2018-01-31 08:36:11 +00:00
parent 6ac3c206de
commit 0d8659c652
8 changed files with 3 additions and 267 deletions

View File

@ -20,7 +20,7 @@ before_install:
- mysql -u root test_db < extensions/database/test/conf/travis-mysql.sql - mysql -u root test_db < extensions/database/test/conf/travis-mysql.sql
- psql -c 'CREATE DATABASE test_db;' -U postgres - psql -c 'CREATE DATABASE test_db;' -U postgres
- psql -U postgres test_db < extensions/database/test/conf/travis-pgsql.sql - psql -U postgres test_db < extensions/database/test/conf/travis-pgsql.sql
- cp extensions/database/test/conf/travis_int_tests.xml extensions/database/test/conf/int_tests.xml - cp extensions/database/test/conf/travis_tests.xml extensions/database/test/conf/tests.xml
script: script:
- ./refine server_test - ./refine server_test

View File

@ -42,7 +42,7 @@ before_test:
createdb test_db createdb test_db
psql -U postgres test_db < extensions\database\test\conf\travis-pgsql.sql psql -U postgres test_db < extensions\database\test\conf\travis-pgsql.sql
copy extensions\database\test\conf\appveyor_int_tests.xml extensions\database\test\conf\int_tests.xml copy extensions\database\test\conf\appveyor_tests.xml extensions\database\test\conf\tests.xml
test_script: test_script:
- cmd: echo Running test_script... - cmd: echo Running test_script...

View File

@ -1,194 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--+
|
| OpenRefine Database Extension Build File
|
+-->
<project name="refine-database-extension" default="build" basedir="." xmlns:jacoco="antlib:org.jacoco.ant">
<property environment="env"/>
<condition property="version" value="trunk">
<not><isset property="version"/></not>
</condition>
<condition property="revision" value="rXXXX">
<not><isset property="revision"/></not>
</condition>
<condition property="full_version" value="0.0.0.0">
<not><isset property="full_version"/></not>
</condition>
<condition property="dist.dir" value="dist">
<not><isset property="dist.dir"/></not>
</condition>
<property name="fullname" value="${name}-${version}-${revision}" />
<property name="java_version" value="1.8"/>
<property name="refine.dir" value="${basedir}/../../main" />
<property name="refine.webinf.dir" value="${refine.dir}/webapp/WEB-INF" />
<property name="refine.modinf.dir" value="${refine.dir}/webapp/modules/core/MOD-INF" />
<property name="refine.classes.dir" value="${refine.webinf.dir}/classes" />
<property name="refine.lib.dir" value="${refine.webinf.dir}/lib" />
<property name="refine.tests.lib.dir" value="${refine.dir}/tests/server/lib" />
<property name="src.dir" value="${basedir}/src" />
<property name="module.dir" value="${basedir}/module" />
<property name="modinf.dir" value="${module.dir}/MOD-INF" />
<property name="lib.dir" value="${modinf.dir}/lib" />
<property name="classes.dir" value="${modinf.dir}/classes" />
<property name="test.dir" value="${basedir}/test" />
<property name="test.src.dir" value="${test.dir}"/>
<property name="test.out.dir" value="${basedir}/test-out" />
<property name="test.build.dir" value="${test.out.dir}/build" />
<property name="test.classes.dir" value="${test.out.dir}/classes" />
<property name="test.report.dir" value="${test.out.dir}/report"/>
<property name="test.report.html.dir" value="${test.report.dir}/html"/>
<property name="test.report.xml.path" value="${test.report.dir}/jacoco.xml"/>
<path id="class.path">
<fileset dir="${lib.dir}">
<include name="**/*.jar" />
</fileset>
<fileset dir="${refine.lib.dir}">
<include name="**/*.jar" />
</fileset>
<fileset dir="${server.lib.dir}">
<include name="**/*.jar" />
</fileset>
<pathelement path="${refine.classes.dir}"/>
<pathelement path="${classes.dir}"/>
</path>
<path id="extension.tests.class.path">
<path refid="class.path"/>
<pathelement location="${test.classes.dir}"/>
<pathelement location="${refine.tests.lib.dir}/testng-6.8.jar"/>
<fileset dir="${refine.tests.lib.dir}">
<include name="**/*.jar" />
</fileset>
</path>
<taskdef resource="testngtasks" classpath="${refine.tests.lib.dir}/testng-6.8.jar"/>
<taskdef uri="antlib:org.jacoco.ant" resource="org/jacoco/ant/antlib.xml">
<classpath path="${refine.tests.lib.dir}/jacocoant.jar"/>
</taskdef>
<target name="build_java">
<mkdir dir="${classes.dir}" />
<javac source="${java_version}" target="${java_version}" encoding="utf-8" destdir="${classes.dir}" debug="true" includeAntRuntime="no">
<src path="${src.dir}"/>
<classpath refid="class.path" />
</javac>
</target>
<target name="build" depends="build_java"/>
<target name="build_tests" depends="clean, build">
<mkdir dir="${test.classes.dir}" />
<javac source="${java_version}" target="${java_version}" encoding="utf-8" srcdir="${test.src.dir}" destdir="${test.classes.dir}" debug="true" includeAntRuntime="no">
<classpath refid="extension.tests.class.path" />
</javac>
<copy file="${test.src.dir}/log4j-test.properties" tofile="${test.classes.dir}/log4j-test.properties"/>
</target>
<mkdir dir="${test.build.dir}" />
<target name="test" depends="build_tests">
<jacoco:coverage destfile="${test.report.dir}/jacoco.exec">
<testng verbose="2" haltOnFailure="true" workingdir="${test.build.dir}"
listener="org.testng.reporters.DotTestListener" excludedgroups="broken"
classpathref="extension.tests.class.path">
<xmlfileset file="${test.src.dir}/conf/int_tests.xml"/>
</testng>
</jacoco:coverage>
<jacoco:report>
<executiondata>
<file file="${test.report.dir}/jacoco.exec"/>
</executiondata>
<structure name="Database extension">
<classfiles>
<fileset dir="${classes.dir}"/>
</classfiles>
<sourcefiles encoding="UTF-8">
<fileset dir="${src.dir}"/>
</sourcefiles>
</structure>
<html destdir="${test.report.html.dir}"/>
<xml destfile="${test.report.xml.path}"/>
</jacoco:report>
</target>
<target name="unit_test" depends="build_tests">
<jacoco:coverage destfile="${test.report.dir}/jacoco.exec">
<testng verbose="2" haltOnFailure="true" workingdir="${test.build.dir}"
listener="org.testng.reporters.DotTestListener" excludedgroups="broken"
classpathref="extension.tests.class.path">
<xmlfileset file="${test.src.dir}/conf/unit_tests.xml"/>
</testng>
</jacoco:coverage>
<jacoco:report>
<executiondata>
<file file="${test.report.dir}/jacoco.exec"/>
</executiondata>
<structure name="Database extension">
<classfiles>
<fileset dir="${classes.dir}"/>
</classfiles>
<sourcefiles encoding="UTF-8">
<fileset dir="${src.dir}"/>
</sourcefiles>
</structure>
<html destdir="${test.report.html.dir}"/>
<xml destfile="${test.report.xml.path}"/>
</jacoco:report>
</target>
<target name="dist" depends="build">
<mkdir dir="${ext.dir}"/>
<copy todir="${ext.dir}/module">
<fileset dir="module">
<include name="**/*"/>
<exclude name="**/lib-src/*"/>
<exclude name="**/src/*"/>
</fileset>
</copy>
<copy todir="${ext.dir}/licenses">
<fileset dir="${basedir}/licenses">
<include name="**"/>
</fileset>
</copy>
<copy file="${basedir}/LICENSE.txt" tofile="${ext.dir}/LICENSE.txt"/>
<copy file="${basedir}/README.txt" tofile="${ext.dir}/README.txt"/>
<zip destfile="${dist.dir}/openrefine-${fullname}.zip">
<zipfileset dir="${ext.dir}/..">
<include name="**/**"/>
</zipfileset>
</zip>
<delete dir="${ext.dir}"/>
</target>
<target name="clean">
<delete dir="${classes.dir}" />
<delete dir="${test.out.dir}" />
</target>
<target name="distclean">
<delete dir="${dist.dir}" />
</target>
</project>

View File

@ -106,7 +106,7 @@
<testng verbose="2" haltOnFailure="true" workingdir="${test.build.dir}" <testng verbose="2" haltOnFailure="true" workingdir="${test.build.dir}"
listener="org.testng.reporters.DotTestListener" listener="org.testng.reporters.DotTestListener"
classpathref="extension.tests.class.path"> classpathref="extension.tests.class.path">
<xmlfileset file="${test.src.dir}/conf/int_tests.xml"/> <xmlfileset file="${test.src.dir}/conf/tests.xml"/>
</testng> </testng>
</jacoco:coverage> </jacoco:coverage>
<jacoco:report> <jacoco:report>
@ -126,34 +126,6 @@
<xml destfile="${test.report.xml.path}"/> <xml destfile="${test.report.xml.path}"/>
</jacoco:report> </jacoco:report>
</target> </target>
<target name="unit_test" depends="build_tests">
<jacoco:coverage destfile="${test.report.dir}/jacoco.exec">
<testng verbose="2" haltOnFailure="true" workingdir="${test.build.dir}"
listener="org.testng.reporters.DotTestListener"
classpathref="extension.tests.class.path">
<xmlfileset file="${test.src.dir}/conf/unit_tests.xml"/>
</testng>
</jacoco:coverage>
<jacoco:report>
<executiondata>
<file file="${test.report.dir}/jacoco.exec"/>
</executiondata>
<structure name="Database extension">
<classfiles>
<fileset dir="${classes.dir}"/>
</classfiles>
<sourcefiles encoding="UTF-8">
<fileset dir="${src.dir}"/>
</sourcefiles>
</structure>
<html destdir="${test.report.html.dir}"/>
<xml destfile="${test.report.xml.path}"/>
</jacoco:report>
</target>
<target name="dist" depends="build"> <target name="dist" depends="build">
<mkdir dir="${ext.dir}"/> <mkdir dir="${ext.dir}"/>

View File

@ -1,42 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<suite name="DatabaseExtensionUnitTestSuite">
<parameter name = "mySqlDbName" value="test_db"/>
<parameter name = "mySqlDbHost" value="127.0.0.1"/>
<parameter name = "mySqlDbPort" value="3306"/>
<parameter name = "mySqlDbUser" value="root"/>
<parameter name = "mySqlDbPassword" value="secret"/>
<parameter name = "mySqlTestTable" value="test_table"/>
<parameter name = "pgSqlDbName" value="test_db"/>
<parameter name = "pgSqlDbHost" value="127.0.0.1"/>
<parameter name = "pgSqlDbPort" value="5432"/>
<parameter name = "pgSqlDbUser" value="postgres"/>
<parameter name = "pgSqlDbPassword" value=""/>
<parameter name = "pgSqlTestTable" value="test_table"/>
<parameter name = "mariaDbName" value="test_db"/>
<parameter name = "mariaDbHost" value="127.0.0.1"/>
<parameter name = "mariadbDbPort" value="3306"/>
<parameter name = "mariaDbUser" value="root"/>
<parameter name = "mariaDbPassword" value="secret"/>
<parameter name = "mariaDbTestTable" value="test_table"/>
<test name="DatabaseExtensionUnitTest">
<classes>
<class name="com.google.refine.extension.database.DatabaseTestConfig"/>
<class name="com.google.refine.extension.database.DatabaseImportControllerTest"/>
<class name="com.google.refine.extension.database.DatabaseServiceTest"/>
<class name="com.google.refine.extension.database.SimpleTextEncryptorTest"/>
<class name="com.google.refine.extension.database.cmd.ConnectCommandTest"/>
<class name="com.google.refine.extension.database.cmd.ExecuteQueryCommandTest"/>
<class name="com.google.refine.extension.database.cmd.SavedConnectionCommandTest"/>
<class name="com.google.refine.extension.database.cmd.TestConnectCommandTest"/>
<class name="com.google.refine.extension.database.cmd.TestQueryCommandTest"/>
<class name="com.google.refine.extension.database.mariadb.MariaDBConnectionManagerTest"/>
<class name="com.google.refine.extension.database.mariadb.MariaDBDatabaseServiceTest"/>
<class name="com.google.refine.extension.database.mysql.MySQLConnectionManagerTest"/>
<class name="com.google.refine.extension.database.mysql.MySQLDatabaseServiceTest"/>
<class name="com.google.refine.extension.database.pgsql.PgSQLConnectionManagerTest"/>
<class name="com.google.refine.extension.database.pgsql.PgSQLDatabaseServiceTest" />
</classes>
</test>
</suite>