Skip to content
Snippets Groups Projects
Commit 8b689d0a authored by buczekp's avatar buczekp
Browse files

[LMS-1625] introduced a macro for running system tests not to finish running...

[LMS-1625] introduced a macro for running system tests not to finish running test suites when one fails

SVN: 16848
parent 93dbe855
No related branches found
No related tags found
No related merge requests found
...@@ -59,80 +59,68 @@ ...@@ -59,80 +59,68 @@
</target> </target>
<!-- <!--
// Target that sets up enviroment info for tests. The test.suite parameter should be provided when called. // Macro that runs a system test suite. The 'testsuite' parameter should be provided when called.
// Property with name specified in 'failureproperty' parameter will hold info about failure.
--> -->
<target name="run-system-test-suite"> <macrodef name="run-system-test-suite" description="runs one system test suite">
<junit dir="." fork="true" forkmode="once" maxmemory="1024m" showoutput="true" failureproperty="tests-failed"> <attribute name="testsuite"/>
<classpath> <attribute name="failureproperty"/>
<pathelement location="${sources}" /> <sequential>
<pathelement location="${sources.test}" /> <echo>Running @{testsuite}...</echo>
<pathelement location="../common/${sources}" /> <junit dir="." fork="true" forkmode="once" maxmemory="1024m" showoutput="true" failureproperty="@{failureproperty}">
<pathelement path="${ecp}" /> <classpath>
<pathelement location="${gwt.lib}/gwt-dev.jar" /> <pathelement location="${sources}" />
</classpath> <pathelement location="${sources.test}" />
<jvmarg value="-ea" /> <pathelement location="../common/${sources}" />
<sysproperty key="authentication-service" value="file-authentication-service" /> <pathelement path="${ecp}" />
<sysproperty key="database.create-from-scratch" value="true" /> <pathelement location="${gwt.lib}/gwt-dev.jar" />
<sysproperty key="database.kind" value="system_test" /> </classpath>
<sysproperty key="script-folder" value="sourceTest" /> <jvmarg value="-ea" />
<sysproperty key="mass-upload-folder" value="sourceTest/sql/postgresql" /> <sysproperty key="authentication-service" value="file-authentication-service" />
<sysproperty key="log4j.configuration" value="etc/log.xml" /> <sysproperty key="database.create-from-scratch" value="true" />
<sysproperty key="hibernate.search.index-base" value="sourceTest/lucene/indices" /> <sysproperty key="database.kind" value="system_test" />
<sysproperty key="hibernate.search.index-mode" value="NO_INDEX" /> <sysproperty key="script-folder" value="sourceTest" />
<sysproperty key="hibernate.search.indexing_strategy" value="manual" /> <sysproperty key="mass-upload-folder" value="sourceTest/sql/postgresql" />
<sysproperty key="data-store-server-base-url" value="https://localhost:8889" /> <sysproperty key="log4j.configuration" value="etc/log.xml" />
<sysproperty key="gwt.args" value="-testMethodTimeout 4 -Xtries 1" /> <sysproperty key="hibernate.search.index-base" value="sourceTest/lucene/indices" />
<formatter type="xml" /> <sysproperty key="hibernate.search.index-mode" value="NO_INDEX" />
<test name="${test.suite}" todir="${output.test}" /> <sysproperty key="hibernate.search.indexing_strategy" value="manual" />
</junit> <sysproperty key="data-store-server-base-url" value="https://localhost:8889" />
<fail> <sysproperty key="gwt.args" value="-testMethodTimeout 4 -Xtries 1" />
<condition> <formatter type="xml" />
<isset property="tests-failed" /> <test name="@{testsuite}" todir="${output.test}" />
</condition> </junit>
</fail> </sequential>
</target> </macrodef>
<target name="run-editing1-tests">
<antcall target="run-system-test-suite">
<param name="test.suite" value="ch.systemsx.cisd.openbis.generic.EditingTestSuite1" />
</antcall>
</target>
<target name="run-editing2-tests">
<antcall target="run-system-test-suite">
<param name="test.suite" value="ch.systemsx.cisd.openbis.generic.EditingTestSuite2" />
</antcall>
</target>
<target name="run-viewing1-tests">
<antcall target="run-system-test-suite">
<param name="test.suite" value="ch.systemsx.cisd.openbis.generic.ViewingTestSuite1" />
</antcall>
</target>
<target name="run-viewing2-tests">
<antcall target="run-system-test-suite">
<param name="test.suite" value="ch.systemsx.cisd.openbis.generic.ViewingTestSuite2" />
</antcall>
</target>
<target name="run-viewing3-tests">
<antcall target="run-system-test-suite">
<param name="test.suite" value="ch.systemsx.cisd.openbis.generic.ViewingTestSuite3" />
</antcall>
</target>
<!-- <!--
// Runs system tests // Runs system tests
--> -->
<target name="run-system-tests"
depends="prepare-gwt, compile-tests, run-editing1-tests, run-editing2-tests, run-viewing1-tests, run-viewing2-tests, run-viewing3-tests"> <target name="run-system-tests" depends="prepare-gwt, compile-tests, run-system-tests-no-prep"/>
<delete dir="${output.test}" />
<mkdir dir="${output.test}" /> <target name="run-system-tests-no-prep">
</target> <run-system-test-suite testsuite="ch.systemsx.cisd.openbis.generic.EditingTestSuite1"
failureproperty="editing1-failed" />
<target name="run-system-tests-no-prep" <run-system-test-suite testsuite="ch.systemsx.cisd.openbis.generic.EditingTestSuite2"
depends="run-editing1-tests, run-editing2-tests, run-viewing1-tests, run-viewing2-tests, run-viewing3-tests"> failureproperty="editing2-failed" />
<run-system-test-suite testsuite="ch.systemsx.cisd.openbis.generic.ViewingTestSuite1"
failureproperty="viewing1-failed" />
<run-system-test-suite testsuite="ch.systemsx.cisd.openbis.generic.ViewingTestSuite2"
failureproperty="viewing2-failed" />
<run-system-test-suite testsuite="ch.systemsx.cisd.openbis.generic.ViewingTestSuite3"
failureproperty="viewing3-failed" />
<fail>
<condition>
<or>
<isset property="editing1-failed" />
<isset property="editing2-failed" />
<isset property="viewing1-failed" />
<isset property="viewing2-failed" />
<isset property="viewing3-failed" />
</or>
</condition>
</fail>
<delete dir="${output.test}" /> <delete dir="${output.test}" />
<mkdir dir="${output.test}" /> <mkdir dir="${output.test}" />
</target> </target>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment