Skip to content

Commit

Permalink
Patch version 6.3.4
Browse files Browse the repository at this point in the history
Bugfix Issue #73
Bugfix Issue #72
Bugfix Issue #71
  • Loading branch information
omix committed Sep 2, 2022
1 parent d9abd12 commit 15cc708
Show file tree
Hide file tree
Showing 82 changed files with 5,583 additions and 2,423 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ to your project:
<version>$VERSION</version>
</dependency>
```
(exchange `$VERSION` either by `5.15.8`, `6.2.6` or by `6.3.3`).
(exchange `$VERSION` either by `5.15.9`, `6.2.7` or by `6.3.4`).

Otherwise, download QtJambi JAR file from [Maven Central Repository](https://search.maven.org/artifact/io.qtjambi/qtjambi/).

Expand All @@ -120,7 +120,7 @@ public class Test {
Compile the file:

``` powershell
javac -cp qtjambi-6.3.3.jar Test.java
javac -cp qtjambi-6.3.4.jar Test.java
```

### Execute Example
Expand All @@ -135,7 +135,7 @@ Therefore, use the PATH environment (LD_LIBRARY_PATH on Linux, DYLD_LIBRARY_PATH
or the Java runtime property java.library.path. The example program can be executed this way:

```
java -cp qtjambi-6.3.3.jar;. -Djava.library.path=C:\Qt\6.3.1\msvc2019_64\bin Test
java -cp qtjambi-6.3.4.jar;. -Djava.library.path=C:\Qt\6.3.1\msvc2019_64\bin Test
```

(On macOS you additionally need to use the start parameter -XstartOnFirstThread)
Expand Down
9 changes: 8 additions & 1 deletion autotestlib/autotestlib.pro
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,14 @@ include(../src/cpp/qtjambi/qtjambi_include.pri)
exists($$QTJAMBI_BUILDDIR/tests/autotest-generator/cpp/io_qt_autotests_generated):
include($$QTJAMBI_BUILDDIR/tests/autotest-generator/cpp/io_qt_autotests_generated/generated.pri)

DESTDIR = ../lib
android:{
armeabi-v7a: DESTDIR = ../lib/armeabi-v7a
arm64-v8a: DESTDIR = ../lib/arm64-v8a
x86: DESTDIR = ../lib/x86
x86_64: DESTDIR = ../lib/x86_64
}else{
DESTDIR = ../lib
}

INCLUDEPATH += ./cpp/io_qt_autotests_generated

Expand Down
2 changes: 1 addition & 1 deletion build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ Further options:
description="Runs tests and generates report in TestReport subdir">
<foreach-version targets="tests.run-impl"/>
</target>

<target name="tests.run.all" depends="log, setenv, init.taskdef"
description="Runs tests and generates report in TestReport subdir">
<foreach-version targets="tests.run.all-impl"/>
Expand Down
136 changes: 107 additions & 29 deletions build_autotests.xml
Original file line number Diff line number Diff line change
Expand Up @@ -141,15 +141,15 @@

<target name="tests.clean-impl" depends="load-properties">
<delete dir="${outputDir}/tests/autotest-generator"/>
<delete dir="${outputDir}/tests/autotests"/>
<delete dir="${outputDir}/tests/auto"/>
<delete dir="${outputDir}/${qtjambi.osname}/tests/autotests"/>
<delete dir="${outputDir}/${qtjambi.osname}/tests/auto"/>
<delete dir="${outputDir}/tests"/>
<delete dir="${outputDir}/${qtjambi.osname}/tests"/>
</target>

<target name="reports.clean" depends="load-properties" description="Cleans the Unit Test results">
<delete dir="${outputDir}/tests/junitxml-*"/>
<delete dir="${outputDir}/tests/TestResults-*"/>
<delete dir="${outputDir}/${qtjambi.osname}/tests/junitxml-*"/>
<delete dir="${outputDir}/${qtjambi.osname}/tests/TestResults-*"/>
</target>

<target name="check.junit">
Expand Down Expand Up @@ -221,22 +221,70 @@
<if>
<os family="mac"/>
<then>
<install-name-tool dir="${outputDir}/tests/lib/" libname="io_qt_autotests_generated" debug="false" suffix="jnilib"/>
<install-name-tool dir="${outputDir}/tests/lib/" libname="io_qt_autotests_generated" debug="true" suffix="jnilib"/>
<install-name-tool dir="${outputDir}/${qtjambi.osname}/tests/lib/" libname="io_qt_autotests_generated" debug="false" suffix="jnilib"/>
<install-name-tool dir="${outputDir}/${qtjambi.osname}/tests/lib/" libname="io_qt_autotests_generated" debug="true" suffix="jnilib"/>
</then>
</if>
<if>
<or>
<equals arg1="${qtjambi.osname}" arg2="android"/>
<equals arg1="${qtjambi.osname}" arg2="android-arm"/>
<equals arg1="${qtjambi.osname}" arg2="android-arm64"/>
<equals arg1="${qtjambi.osname}" arg2="android-x86"/>
<equals arg1="${qtjambi.osname}" arg2="android-x64"/>
</or>
<then>
<antcall inheritrefs="true" target="create-android-bundles">
<param name="qtjambi.android.abi" value="armeabi-v7a"/>
<param name="qtjambi.android.osname" value="android-arm"/>
</antcall>
<antcall inheritrefs="true" target="create-android-bundles">
<param name="qtjambi.android.abi" value="arm64-v8a"/>
<param name="qtjambi.android.osname" value="android-arm64"/>
</antcall>
<antcall inheritrefs="true" target="create-android-bundles">
<param name="qtjambi.android.abi" value="x86"/>
<param name="qtjambi.android.osname" value="android-x86"/>
</antcall>
<antcall inheritrefs="true" target="create-android-bundles">
<param name="qtjambi.android.abi" value="x86_64"/>
<param name="qtjambi.android.osname" value="android-x64"/>
</antcall>
</then>
</if>
</target>
<target name="create-android-bundles">
<if>
<available file="${outputDir}/${qtjambi.osname}/tests/lib/${qtjambi.android.abi}/libio_qt_autotests_generated_${qtjambi.android.abi}.so"/>
<then>
<mkdir dir="${outputDir}/${qtjambi.osname}/tests/"/>
<jar destfile="${outputDir}/${qtjambi.osname}/tests/qtjambi-autotests-native-${qtjambi.android.osname}-${qtjambi.jar.version}.jar" excludes="${jar.excludes}">
<manifest>
<attribute name="Built-By" value="${qtjambi.user.name} &lt;${qtjambi.user.email}> - ${TODAY}"/>
<attribute name="Bundle-Name" value="QtJambi Autotests natives ${qtjambi.android.osname}"/>
<attribute name="Bundle-Description" value="QtJambi Autotests natives ${qtjambi.android.osname}"/>
</manifest>
<fileset dir="${outputDir}/${qtjambi.osname}/tests" includes="lib/${qtjambi.android.abi}/libio_qt_autotests_generated_${qtjambi.android.abi}.so"/>
</jar>
</then>
</if>
<if>
<available file="${outputDir}/${qtjambi.osname}/tests/lib/${qtjambi.android.abi}/libio_qt_autotests_generated_debug_${qtjambi.android.abi}.so"/>
<then>
<mkdir dir="${outputDir}/${qtjambi.osname}/tests/"/>
<jar destfile="${outputDir}/${qtjambi.osname}/tests/qtjambi-autotests-native-${qtjambi.android.osname}-debug-${qtjambi.jar.version}.jar" excludes="${jar.excludes}">
<manifest>
<attribute name="Built-By" value="${qtjambi.user.name} &lt;${qtjambi.user.email}> - ${TODAY}"/>
<attribute name="Bundle-Name" value="QtJambi Autotests natives ${qtjambi.android.osname}"/>
<attribute name="Bundle-Description" value="QtJambi Autotests natives ${qtjambi.android.osname}"/>
</manifest>
<fileset dir="${outputDir}/${qtjambi.osname}/tests" includes="lib/${qtjambi.android.abi}/libio_qt_autotests_generated_debug_${qtjambi.android.abi}.so"/>
</jar>
</then>
</if>
</target>

<target name="compile.deps">
<!-- <mkdir dir="${outputDir}/tests/autotests" />
<javac destdir="${outputDir}/tests/autotests" debug="true"
includeantruntime="false"
source="1.8" target="1.8">
<classpath>
<pathelement location="${deploymentdir}/qtjambi.jar" />
<pathelement location="." />
</classpath>
</javac> -->
</target>

<target name="copy-resources">
Expand All @@ -255,15 +303,15 @@
<target name="compile.java">
<ant inheritrefs="true" target="compile.java.impl">
<property name="module.suffix" value=""/>
<property name="test.java.outdir" location="${outputDir}/tests/java"/>
<property name="test.java.srcoutdir" location="${outputDir}/tests/java-src"/>
<property name="test.java.outdir" location="${outputDir}/${qtjambi.osname}/tests/java"/>
<property name="test.java.srcoutdir" location="${outputDir}/${qtjambi.osname}/tests/java-src"/>
</ant>
</target>
<target name="compile.plugins.java">
<ant inheritrefs="true" target="compile.java.plugins.impl">
<property name="module.suffix" value=""/>
<property name="test.java.outdir" location="${outputDir}/tests/java"/>
<property name="test.java.srcoutdir" location="${outputDir}/tests/java-src"/>
<property name="test.java.outdir" location="${outputDir}/${qtjambi.osname}/tests/java"/>
<property name="test.java.srcoutdir" location="${outputDir}/${qtjambi.osname}/tests/java-src"/>
</ant>
</target>
<target name="compile.java.impl" depends="load-properties">
Expand Down Expand Up @@ -306,6 +354,33 @@
<antcall inheritrefs="true" target="copy-resources">
<param name="src" value="${basedir}/src/java/autotest"/>
</antcall>
<jar destfile="${outputDir}/${qtjambi.osname}/tests/qtjambi-autotests-${qtjambi.jar.version}.jar">
<manifest>
<attribute name="Built-By" value="${qtjambi.user.name} &lt;${qtjambi.user.email}> - ${TODAY}"/>
<!-- <attribute name="Bundle-Activator" value="io.qt.qtjambi.${qtjambi.osplatform}.${qtjambi.configuration}.osgi.Activator"/> -->
<attribute name="Bundle-Description" value="QtJambi Autotests"/>
<!-- TODO: qtjambi.png -->
<!-- <attribute name="Bundle-Icon" value="qtjambi.png"/> -->
<attribute name="Bundle-License" value="GNU LESSER GENERAL PUBLIC LICENSE Version 2.1 February 1999 with Nokia Qt LGPL Exception version 1.0"/>
<!-- <attribute name="Bundle-Localization" value="plugin"/> -->
<attribute name="Bundle-ManifestVersion" value="2"/>
<attribute name="Bundle-Name" value="QtJambi Autotests"/>
<attribute name="Bundle-RequiredExecutionEnvironment" value="${minimum.java.version}"/>
<attribute name="Bundle-Version" value="${qtjambi.version.bundle}"/>
<attribute name="QtJambi-Plugin-Metadata" value="${plugin.metadata}"/>
<attribute name="QtJambi-Plugin-Class" value="${plugin.class.name}"/>
<attribute name="QtJambi-Plugin-Name" value="${module}"/>
</manifest>
<fileset dir="${test.java.outdir}"/>
</jar>
<jar destfile="${outputDir}/${qtjambi.osname}/tests/qtjambi-autotests-${qtjambi.jar.version}-sources.jar" excludes="${jar.excludes}">
<manifest>
<attribute name="Built-By" value="${qtjambi.user.name} &lt;${qtjambi.user.email}> - ${TODAY}"/>
<attribute name="Bundle-Name" value="QtJambi Autotests sources"/>
<attribute name="Bundle-Description" value="QtJambi Autotests sources"/>
</manifest>
<fileset dir="${test.java.srcoutdir}" excludes="**/*.class"/>
</jar>
</target>
<target name="compile.java.plugins.impl">
<if>
Expand Down Expand Up @@ -416,7 +491,8 @@
<pathelement location="${tests.hamcrest}" />
<pathelement location="${sqlite.jdbc}" />
<pathelement location="${jna.lib}" />
<pathelement path="${absOutputDir}/tests/java" />
<pathelement path="${outputDir}/${qtjambi.osname}/tests/qtjambi-autotests-${qtjambi.jar.version}.jar" />
<!--pathelement path="${absOutputDir}/${qtjambi.osname}/tests/java" /-->
</path>
</then>
<else>
Expand Down Expand Up @@ -460,7 +536,8 @@
<pathelement location="${tests.hamcrest}" />
<pathelement location="${sqlite.jdbc}" />
<pathelement location="${jna.lib}" />
<pathelement path="${absOutputDir}/tests/java" />
<pathelement path="${outputDir}/${qtjambi.osname}/tests/qtjambi-autotests-${qtjambi.jar.version}.jar" />
<!--pathelement path="${absOutputDir}/${qtjambi.osname}/tests/java" /-->
</path>
</else>
</if>
Expand Down Expand Up @@ -517,7 +594,7 @@
<isset property="qtjambi.autotests"/>
</not>
<then>
<delete dir="${outputDir}/tests/junitxml-${kind}${jdk-exec-version}" />
<delete dir="${outputDir}/${qtjambi.osname}/tests/junitxml-${kind}${jdk-exec-version}" />
</then>
</if>
<condition property="Xcheck_jni" value="-Xcheck:jni" else="-Dx">
Expand All @@ -528,20 +605,21 @@
<os family="windows"/>
</not>
<then>
<symlink link="${outputDir}/tests/${kind}/lib" resource="${deploymentdir}/native/${qtjambi.osname}/${kind}/lib"/>
<symlink link="${outputDir}/${qtjambi.osname}/tests/${kind}/lib" resource="${deploymentdir}/native/${qtjambi.osname}/${kind}/lib"/>
</then>
</if>
<trycatch>
<try>
<mkdir dir="${outputDir}/tests/junitxml-${kind}${jdk-exec-version}"/>
<mkdir dir="${outputDir}/${qtjambi.osname}/tests/junitxml-${kind}${jdk-exec-version}"/>
<junit fork="yes" jvm="${test.jvm}" printsummary="true" haltonfailure="no" timeout="${qtjambi.junit.timeout}" showoutput="yes" logfailedtests="yes" threads="${qtjambi.junit.threads}">
<classpath refid="qtjambi.classpath"/>
<jvmarg value="-Djava.library.path=${absQtPath}${psep}${absJambiPath}${psep}${outputDir}/${qtjambi.osname}/tests/bin${psep}${outputDir}/${qtjambi.osname}/tests/lib"/>
<jvmarg value="-Dio.qt.verbose-loading=${io.qt.verbose-loading}"/>
<jvmarg value="-Dio.qt.debug=${kind}"/><!-- This should not be needed now, it loads default from MANIFEST.MF -->
<jvmarg value="-Dio.qt.log-messages=ALL"/>
<jvmarg value="-Dio.qt.no-deployment-spec=true"/>
<jvmarg value="-Dio.qt.pluginpath=${deploymentdir}/native/${qtjambi.osname}/${kind}/plugins${psep}${outputDir}/tests/${kind}/plugins"/>
<jvmarg value="-Dio.qt.qml-imports=${outputDir}/${qtjambi.osname}/tests/${kind}/qml"/>
<jvmarg value="-Dio.qt.pluginpath=${deploymentdir}/native/${qtjambi.osname}/${kind}/plugins${psep}${outputDir}/${qtjambi.osname}/tests/${kind}/plugins"/>
<jvmarg value="${XstartOnFirstThread}"/>
<jvmarg value="-Dqtjambi.deployer.test.jdbc=${sqlite.jdbc}"/>
<jvmarg value="-Djava.util.logging.config.file=${basedir}/logging.properties"/>
Expand All @@ -557,19 +635,19 @@
<env key="QML2_IMPORT_PATH" value="${absQtPath}/../qml"/-->
<!-- <jvmarg value="-verbose"/> -->
<formatter type="xml" usefile="yes" />
<batchtest fork="yes" todir="${outputDir}/tests/junitxml-${kind}${jdk-exec-version}">
<batchtest fork="yes" todir="${outputDir}/${qtjambi.osname}/tests/junitxml-${kind}${jdk-exec-version}">
<fileset refid="qtjambi.autotest.classes"/>
</batchtest>
</junit>
<modify-test-results dir="${outputDir}/tests/junitxml-${kind}${jdk-exec-version}" version="${qtjambi.jar.version}" mode="${kind}" jdk="${jdk-exec-version}"/>
<modify-test-results dir="${outputDir}/${qtjambi.osname}/tests/junitxml-${kind}${jdk-exec-version}" version="${qtjambi.jar.version}" mode="${kind}" jdk="${jdk-exec-version}"/>
</try>
<finally>
<if>
<not>
<os family="windows"/>
</not>
<then>
<symlink action="delete" link="${outputDir}/tests/${kind}/lib"/>
<symlink action="delete" link="${outputDir}/${qtjambi.osname}/tests/${kind}/lib"/>
</then>
</if>
</finally>
Expand Down Expand Up @@ -713,7 +791,7 @@
<mkdir dir="${basedir}/TestResults"/>
<junitreport todir="${basedir}/TestResults">
<fileset dir="${basedir}">
<include name="*/build/tests/junitxml-*/TEST-*.xml" />
<include name="*/build/*/tests/junitxml-*/TEST-*.xml" />
</fileset>
<report format="frames" todir="${basedir}/TestResults" />
</junitreport>
Expand Down
Loading

0 comments on commit 15cc708

Please sign in to comment.