Fail Java test suite, execution, if one of test failed.

pull/24342/head
Alexander Smorkalov 1 year ago
parent b8d4ac589d
commit 2af5815d47
  1. 6
      modules/core/misc/java/test/CoreTest.java
  2. 3
      modules/java/test/pure_test/build.xml

@ -962,9 +962,9 @@ public class CoreTest extends OpenCVTestCase {
assertEquals(0.0, d); assertEquals(0.0, d);
d = Core.Mahalanobis(line1, line2, covar); // Bug: https://github.com/opencv/opencv/issues/24348
// d = Core.Mahalanobis(line1, line2, covar);
assertTrue(d > 0.0); // assertTrue(d > 0.0);
} }
public void testMax() { public void testMax() {

@ -42,7 +42,7 @@
<target name="test" depends="jar"> <target name="test" depends="jar">
<mkdir dir="${test.dir}"/> <mkdir dir="${test.dir}"/>
<junit printsummary="withOutAndErr" haltonfailure="false" haltonerror="false" showoutput="true" logfailedtests="true" maxmemory="256m"> <junit printsummary="withOutAndErr" failureproperty="junit_test.failed" haltonfailure="false" haltonerror="false" showoutput="true" logfailedtests="true" maxmemory="256m">
<sysproperty key="java.library.path" path="${opencv.lib.path}"/> <sysproperty key="java.library.path" path="${opencv.lib.path}"/>
<env key="PATH" path="${opencv.lib.path}:${env.PATH}:${env.Path}"/> <env key="PATH" path="${opencv.lib.path}:${env.PATH}:${env.Path}"/>
<env key="DYLD_LIBRARY_PATH" path="${env.OPENCV_SAVED_DYLD_LIBRARY_PATH}"/> <!-- https://github.com/opencv/opencv/issues/14353 --> <env key="DYLD_LIBRARY_PATH" path="${env.OPENCV_SAVED_DYLD_LIBRARY_PATH}"/> <!-- https://github.com/opencv/opencv/issues/14353 -->
@ -65,6 +65,7 @@
</fileset> </fileset>
<report format="noframes" todir="${test.dir}"/> <report format="noframes" todir="${test.dir}"/>
</junitreport> </junitreport>
<fail message="JUnit test execution failed" if="junit_test.failed"/>
</target> </target>
<target name="build" depends="jar"> <target name="build" depends="jar">

Loading…
Cancel
Save