From cde027a4886ac1160ac42a6e4ba1fa2d271009be Mon Sep 17 00:00:00 2001
From: Ondrej Dubaj <odubaj@redhat.com>
Date: Thu, 28 Jul 2022 09:54:06 +0200
Subject: [PATCH] Remove coverage test
 
---
 build.xml | 162 ------------------------------------------------------
 1 file changed, 162 deletions(-)
 
diff --git a/build.xml b/build.xml
index 8c4e9f5d..3d13bf45 100644
--- a/build.xml
+++ b/build.xml
@@ -1279,82 +1279,6 @@ See also com.mysql.cj.conf.PropertyDefinitions.SYSP_* variables for other test o
         </condition>
         <echo>${com.mysql.cj.testsuite.message.test.mode}</echo>
 
-        <local name="com.mysql.cj.testsuite.test.coverage" />
-        <condition property="com.mysql.cj.testsuite.test.coverage" value="true" else="false">
-            <isset property="com.mysql.cj.coverage.result.dir.final" />
-        </condition>
-
-        <local name="com.mysql.cj.testsuite.test.coverage.jvmargfinal" />
-        <condition property="com.mysql.cj.testsuite.test.coverage.jvmargfinal"
-                   value="${com.mysql.cj.testsuite.test.coverage.jvmarg}"
-                   else="-Dcoverage=disabled">
-            <and>
-                <isset property="com.mysql.cj.testsuite.test.coverage.jvmarg" />
-                <not>
-                    <equals arg1="${com.mysql.cj.testsuite.test.coverage.jvmarg}" arg2="" />
-                </not>
-            </and>
-        </condition>
-
-        <!-- ant 1.10.10 and above print report summaries to the console from where test counts can be retrieved. -->
-        <antversion property="com.mysql.cj.testsuite.ant.version" atleast="1.10.10" />
-
-        <junitlauncher haltOnFailure="false" printSummary="true" failureProperty="com.mysql.cj.testsuite.junit.fail">
-            <classpath refid="com.mysql.cj.testsuite.build.classpath" />
-
-            <test if="${com.mysql.cj.testsuite.test.methods.enabled}"
-                  name="${com.mysql.cj.testsuite.test.class}"
-                  methods="${com.mysql.cj.testsuite.test.methods}"
-                  outputdir="${com.mysql.cj.testsuite.junit.results}">
-                <fork>
-                    <jvmarg value="-Dfile.encoding=UTF-8" />
-                    <jvmarg value="-Xmx1024m" />
-                    <jvmarg value="${com.mysql.cj.testsuite.test.coverage.jvmargfinal}" />
-                    <syspropertyset refid="junit.system.properties" />
-                </fork>
-                <listener classname="testsuite.JUnitSummary" unless="com.mysql.cj.testsuite.ant.version" />
-                <listener type="legacy-xml" sendSysOut="true" sendSysErr="true" />
-                <listener type="legacy-plain" sendSysOut="true" sendSysErr="true" />
-            </test>
-
-            <test if="com.mysql.cj.testsuite.test.class"
-                  unless="com.mysql.cj.testsuite.test.methods"
-                  name="${com.mysql.cj.testsuite.test.class}"
-                  outputdir="${com.mysql.cj.testsuite.junit.results}">
-                <fork>
-                    <jvmarg value="-Dfile.encoding=UTF-8" />
-                    <jvmarg value="-Xmx1024m" />
-                    <jvmarg value="${com.mysql.cj.testsuite.test.coverage.jvmargfinal}" />
-                    <syspropertyset refid="junit.system.properties" />
-                </fork>
-                <listener classname="testsuite.JUnitSummary" unless="com.mysql.cj.testsuite.ant.version" />
-                <listener type="legacy-xml" sendSysOut="true" sendSysErr="true" />
-                <listener type="legacy-plain" sendSysOut="true" sendSysErr="true" />
-            </test>
-
-            <testclasses unless="com.mysql.cj.testsuite.test.class" outputdir="${com.mysql.cj.testsuite.junit.results}">
-                <fileset dir="${com.mysql.cj.testsuite.build.dir}/${com.mysql.cj.build.driver.fullName}">
-                    <include name="**/*Test.class" />
-                    <exclude name="**/perf/*.class" />
-                </fileset>
-                <fork>
-                    <jvmarg value="-Dfile.encoding=UTF-8" />
-                    <jvmarg value="-Xmx1024m" />
-                    <jvmarg value="${com.mysql.cj.testsuite.test.coverage.jvmargfinal}" />
-                    <syspropertyset refid="junit.system.properties" />
-                </fork>
-                <listener classname="testsuite.JUnitSummary" unless="com.mysql.cj.testsuite.ant.version" />
-                <listener type="legacy-xml" sendSysOut="true" sendSysErr="true" />
-                <listener type="legacy-plain" sendSysOut="true" sendSysErr="true" />
-            </testclasses>
-        </junitlauncher>
-
-        <junitreport todir="${com.mysql.cj.testsuite.junit.results}/report">
-            <fileset dir="${com.mysql.cj.testsuite.junit.results}">
-                <include name="**/TEST-*.xml" />
-            </fileset>
-            <report styledir="${junit.styledir}" format="frames" todir="${com.mysql.cj.testsuite.junit.results}/report" />
-        </junitreport>
 
         <!-- Don't fail the build if we're doing coverage test. -->
         <fail message="Tests failed. Check logs and/or reports in '${com.mysql.cj.testsuite.junit.results}'.">
@@ -1367,92 +1291,6 @@ See also com.mysql.cj.conf.PropertyDefinitions.SYSP_* variables for other test o
     </target>
 
 
-    <!-- ********************************* -->
-    <!-- ***** TESTING CODE COVERAGE ***** -->
-    <!-- ********************************* -->
-
-
-    <target name="test-coverage" description="Runs tests collecting coverage results." depends="-setup-test-coverage-agent, test" />
-
-
-    <target name="-set-test-coverage-defaults" depends="-extra-libs-check">
-        <condition property="com.mysql.cj.coverage.result.dir.final"
-                   value="${com.mysql.cj.coverage.result.dir}"
-                   else="${com.mysql.cj.testsuite.build.dir}/coverage">
-            <isset property="com.mysql.cj.coverage.result.dir" />
-        </condition>
-        <condition property="com.mysql.cj.coverage.result.name.final" value="${com.mysql.cj.coverage.result.name}" else="jacoco.exec">
-            <isset property="com.mysql.cj.coverage.result.name" />
-        </condition>
-
-        <taskdef uri="antlib:org.jacoco.ant" resource="org/jacoco/ant/antlib.xml">
-            <classpath>
-                <fileset dir="${com.mysql.cj.extra.libs}">
-                    <include name="**/jacocoant.jar" />
-                </fileset>
-            </classpath>
-        </taskdef>
-    </target>
-
-
-    <target name="-setup-test-coverage-agent" depends="-set-test-coverage-defaults">
-        <jacoco:agent destfile="${com.mysql.cj.coverage.result.dir.final}/${com.mysql.cj.coverage.result.name.final}"
-                      property="com.mysql.cj.testsuite.test.coverage.jvmarg" />
-    </target>
-
-
-    <!-- *********************************** -->
-    <!-- ***** REPORTING CODE COVERAGE ***** -->
-    <!-- *********************************** -->
-
-
-    <target name="report-coverage"
-            depends="-set-report-coverage-defaults, -jacoco-merge"
-            description="Merges coverage results and creates HTML coverage report.">
-        <jacoco:report>
-            <executiondata>
-                <file file="${com.mysql.cj.coverage.merge.result.final}" />
-            </executiondata>
-
-            <structure name="Connector/J classes">
-                <classfiles>
-                    <fileset dir="${com.mysql.cj.build.dir.driver}">
-                        <include name="com/mysql/cj/**" />
-                        <exclude name="com/mysql/cj/x/protobuf/**" />
-                    </fileset>
-                </classfiles>
-                <sourcefiles encoding="UTF-8">
-                    <fileset dir="${com.mysql.cj.build.dir.driver}">
-                        <include name="com/mysql/cj/**" />
-                        <exclude name="com/mysql/cj/x/protobuf/**" />
-                    </fileset>
-                </sourcefiles>
-            </structure>
-
-            <html destdir="${com.mysql.cj.coverage.report.dir.final}" />
-        </jacoco:report>
-    </target>
-
-
-    <target name="-jacoco-merge" depends="-set-report-coverage-defaults" if="com.mysql.cj.coverage.merge.files">
-        <jacoco:merge destfile="${com.mysql.cj.coverage.merge.result.final}">
-            <fileset dir="${com.mysql.cj.coverage.result.dir.final}" includes="${com.mysql.cj.coverage.merge.files}" />
-        </jacoco:merge>
-    </target>
-
-
-    <target name="-set-report-coverage-defaults" depends="-set-test-coverage-defaults">
-        <condition property="com.mysql.cj.coverage.merge.result.final"
-                   value="${com.mysql.cj.coverage.merge.result}"
-                   else="${com.mysql.cj.coverage.result.dir.final}/jacoco.exec">
-            <isset property="com.mysql.cj.coverage.merge.result" />
-        </condition>
-        <condition property="com.mysql.cj.coverage.report.dir.final"
-                   value="${com.mysql.cj.coverage.report.dir}"
-                   else="${com.mysql.cj.coverage.result.dir.final}/report">
-            <isset property="com.mysql.cj.coverage.report.dir" />
-        </condition>
-    </target>
 
 
     <!-- ***************************** -->
-- 
2.37.1
