QuasarApp / CQtDeployer

This project is used to deploy applications written using QML, qt or other С / С++ frameworks.
https://quasarapp.ddns.net:3031/docs/QuasarApp/CQtDeployer/latest/
GNU Lesser General Public License v3.0
576 stars 87 forks source link

Unit test failed at commit 1586259 on task_481 on GitHub Actions #484

Closed pzhlkj6612 closed 3 years ago

pzhlkj6612 commented 3 years ago

Describe the bug

Hi. This is feedback about #483 . The branch task_481 works great on my PC (Qt 5.15.0 mingw810_64) but failed some tests on GitHub Actions (Qt 5.15.x mingw810_64).

Environment

To Reproduce

Steps to reproduce the behavior:

  1. Install Qt 5.15.0 (MinGW 8.1.0 64-bit) and IFW 4.0.1 with install-qt-action.
  2. Install CQtDeployer 1.4.7 with WindowsOfflineInstaller.exe.
  3. Clone this project and checkout to the commit 1586259d950b09fc4f094d617912279160e3823c .
  4. Execute qmake.exe -r, mingw32-make.exe and mingw32-make.exe test in CQtDeployer source code folder.
  5. See error in stdout and CQtDeployer\buildLog.log.

Expected behavior

Pass all tests.

pzhlkj6612 commented 3 years ago

The files I'm using


Note: These files will no longer be updated, so please review carefully before using.


GitHub Actions workflow script

It's not perfect, just for testing.

Workflow script base.yml:

base.yml ```yaml name: base on: push: branches: [main] pull_request: branches: [main] workflow_dispatch: jobs: build: env: CQTDEPLOYER_VERSION: 1.4.7 CQTDEPLOYER_INSTALLATION_DIR: ${{ github.workspace }}/CQtDeployer_installation QT_INSTALLER_NONINTERACTIVE_SCRIPT_PATH: ${{ github.workspace }}/.github/workflows/qt-installer-noninteractive.qs DOWNLOADED_FILE_DIR: ${{ github.workspace }} runs-on: windows-latest continue-on-error: true strategy: matrix: qt_ver: [5.15.0, 5.15.1, 5.15.2] branch_name: [v1.5, task_481] steps: - name: Don't direct call 'mingw32-make.exe' run: Get-Command -Name 'mingw32-make.exe' | Format-List # To get '.github/workflows/qt-installer-noninteractive.qs' - name: checkout code uses: actions/checkout@v2 - name: Install Qt uses: jurplel/install-qt-action@v2 with: version: ${{ matrix.qt_ver }} host: windows target: desktop arch: win64_mingw81 tools: "tools_ifw,4.0.1-202012091044,qt.tools.ifw.40 tools_mingw,8.1.0-1-202004170606,qt.tools.win64_mingw810" aqtversion: "==0.10.1" py7zrversion: "==0.11.1" - name: Inspect Qt run: | Get-Command -Name 'qmake.exe' | Format-List $p = Start-Process -Wait -NoNewWindow -PassThru -FilePath "qmake.exe" -ArgumentList @('-query'); If ($p.ExitCode -ne 0) { Exit $p.ExitCode } Get-ItemProperty -Path "${Env:\Qt5_Dir}\..\..\Tools\mingw810_64\bin\mingw32-make.exe" - name: clone QuasarApp/CQtDeployer@${{ matrix.branch_name }} run: | $p = Start-Process -Wait -NoNewWindow -PassThru -FilePath "git" -ArgumentList @( 'clone', '--recurse-submodules', '--branch', '${{ matrix.branch_name }}' '--single-branch', 'https://github.com/QuasarApp/CQtDeployer.git' ) If ($p.ExitCode -ne 0) { Exit $p.ExitCode } Push-Location -Path CQtDeployer\ $p = Start-Process -Wait -NoNewWindow -PassThru -FilePath "git" -ArgumentList @( 'log', '-n1' ) If ($p.ExitCode -ne 0) { Exit $p.ExitCode } Pop-Location - name: Download CQtDeployer uses: suisei-cn/actions-download-file@v1 id: downloadCqt with: url: "https://github.com/QuasarApp/CQtDeployer/releases/download/${{ env.CQTDEPLOYER_VERSION }}/WindowsOfflineInstaller.exe" target: ${{ github.workspace }} - name: Install CQtDeployer run: | $installer_path = "${Env:\DOWNLOADED_FILE_DIR}\${{ steps.downloadCqt.outputs.filename }}" Get-ItemProperty -Path "$installer_path" $p = Start-Process -Wait -NoNewWindow -PassThru -FilePath "$installer_path" -ArgumentList @( '--script', "${Env:\QT_INSTALLER_NONINTERACTIVE_SCRIPT_PATH}", '--verbose', "targetDirectory=`"${Env:\CQTDEPLOYER_INSTALLATION_DIR}`"" ) If ($p.ExitCode -ne 0) { Exit $p.ExitCode } Get-ItemProperty -Path "${Env:\CQTDEPLOYER_INSTALLATION_DIR}\1.4\bin\cqtdeployer.exe" Push-Location -Path "${Env:\CQTDEPLOYER_INSTALLATION_DIR}\1.4\lib" $p = Start-Process -Wait -NoNewWindow -PassThru -FilePath '..\bin\cqtdeployer.exe' If ($p.ExitCode -ne 0) { Exit $p.ExitCode } Pop-Location - name: qmake CQtDeployer env: cqtdeployer: ${{ env.CQTDEPLOYER_INSTALLATION_DIR }}/1.4/cqtdeployer.bat # Will be saved in Makefile by qmake run: | Push-Location -Path CQtDeployer\ $p = Start-Process -Wait -NoNewWindow -PassThru -FilePath "${Env:\Qt5_Dir}\bin\qmake.exe" -ArgumentList @('-recursive') If ($p.ExitCode -ne 0) { Exit $p.ExitCode } Pop-Location - name: make CQtDeployer run: | Push-Location -Path CQtDeployer\ $p = Start-Process -Wait -NoNewWindow -PassThru -FilePath "${Env:\Qt5_Dir}\..\..\Tools\mingw810_64\bin\mingw32-make.exe" -ArgumentList @('-j2') If ($p.ExitCode -ne 0) { Exit $p.ExitCode } Pop-Location - name: test CQtDeployer id: tst_CQtDeployer run: | Push-Location -Path CQtDeployer\ $p = Start-Process -Wait -NoNewWindow -PassThru -FilePath "${Env:\Qt5_Dir}\..\..\Tools\mingw810_64\bin\mingw32-make.exe" -ArgumentList @('test') # We need buildLog.log, so don't stop here. Write-Host "::set-output name=testExitCode::$($p.ExitCode.toString())" Write-Host '=== ${{ github.workspace }}/CQtDeployer/buildLog.log ===' Get-Content -LiteralPath "${{ github.workspace }}/CQtDeployer/buildLog.log" Pop-Location - name: Upload buildLog.log uses: actions/upload-artifact@v2 with: name: ${{ runner.os }}-CQtDeployer-${{ matrix.qt_ver }}-${{ matrix.qt_arch }}-${{ matrix.branch_name }}-buildLog.log path: ${{ github.workspace }}/CQtDeployer/buildLog.log - run: | $exitCode = ${{ steps.tst_CQtDeployer.outputs.testExitCode }} If ($exitCode -ne 0) { Exit $exitCode } ```

Qt IFW 3 noninteractive answer script (from Internet)

.github/workflows/qt-installer-noninteractive.qs:

qt-installer-noninteractive.qs ```js function Controller() { installer.autoRejectMessageBoxes(); installer.installationFinished.connect(function () { gui.clickButton(buttons.NextButton); }) } Controller.prototype.IntroductionPageCallback = function () { gui.clickButton(buttons.NextButton); } Controller.prototype.WelcomePageCallback = function () { // click delay here because the next button is initially disabled for ~1 second gui.clickButton(buttons.NextButton, 3000); } Controller.prototype.TargetDirectoryPageCallback = function () { gui.currentPageWidget().TargetDirectoryLineEdit.setText(installer.value("targetDirectory")); gui.clickButton(buttons.NextButton); } Controller.prototype.ComponentSelectionPageCallback = function () { gui.clickButton(buttons.NextButton); } Controller.prototype.StartMenuDirectoryPageCallback = function () { gui.clickButton(buttons.NextButton); } Controller.prototype.ReadyForInstallationPageCallback = function () { gui.clickButton(buttons.NextButton); } Controller.prototype.FinishedPageCallback = function () { gui.clickButton(buttons.FinishButton); } ```

Update

GitHub Actions workflow script

I found that the path mingw810_64\ does not match any part of the arch of Qt (win64_mingw81), so I direct specify arch in with statement. If we want to use the matrix, an extra field is needed.


Note: These files will no longer be updated, so please review carefully before using.

pzhlkj6612 commented 3 years ago

Error info

Qt 5.15.0

stdout:

mingw32-make: *** [Makefile:868: test] Error 1

Full content of CQtDeployer\buildLog.log:

buildLog.log ``` ********* Start testing of deploytest ********* Config: Using QtTest library 5.15.0, Qt 5.15.0 (x86_64-little_endian-llp64 shared (dynamic) release build; by GCC 8.1.0) PASS : deploytest::initTestCase() PASS : deploytest::testDeployTarget() PASS : deploytest::testStrip() PASS : deploytest::testExtractLib() PASS : deploytest::testRelativeLink() PASS : deploytest::testCheckQt() PASS : deploytest::testQmlExtrct() PASS : deploytest::testSetTargetDir() PASS : deploytest::testZip() PASS : deploytest::costomScript() PASS : deploytest::testDistroStruct() PASS : deploytest::testOverwrite() PASS : deploytest::testextraData() QWARN : deploytest::testQt() "D:/CQtDeployer/DistributionKit/translations/qtbase_tr.qm not exits in qt Dir" QWARN : deploytest::testQt() "D:/CQtDeployer/DistributionKit/translations/qtbase_tr.qm not exits in qt Dir" QWARN : deploytest::testQt() "D:/CQtDeployer/DistributionKit/qml/QtQuick/Controls.2/designer/InsetSection.qml not exits in qt Dir" QWARN : deploytest::testQt() "D:/CQtDeployer/DistributionKit/QtWidgetsProject.exe not exits in qt Dir" QWARN : deploytest::testQt() "D:/CQtDeployer/DistributionKit/translations/qtbase_tr.qm not exits in qt Dir" QWARN : deploytest::testQt() "D:/CQtDeployer/DistributionKit/translations/qtdeclarative_tr.qm not exits in qt Dir" PASS : deploytest::testQt() PASS : deploytest::testWebEngine() QWARN : deploytest::testConfFile() "D:/CQtDeployer/DistributionKit/qml/QtQuick/Controls.2/designer/InsetSection.qml not exits in qt Dir" QWARN : deploytest::testConfFile() "D:/CQtDeployer/DistributionKit/translations/qtbase_tr.qm not exits in qt Dir" QWARN : deploytest::testConfFile() "D:/CQtDeployer/DistributionKit/translations/qtdeclarative_tr.qm not exits in qt Dir" QWARN : deploytest::testConfFile() "D:/CQtDeployer/DistributionKit/translations/qtbase_tr.qm not exits in qt Dir" QWARN : deploytest::testConfFile() "D:/CQtDeployer/DistributionKit/translations/qtbase_tr.qm not exits in qt Dir" QWARN : deploytest::testConfFile() "D:/CQtDeployer/DistributionKit/Dstro2/translations/qtbase_tr.qm not exits in qt Dir" QWARN : deploytest::testConfFile() "D:/CQtDeployer/DistributionKit/Dstro2/translations/qtdeclarative_tr.qm not exits in qt Dir" QWARN : deploytest::testConfFile() "D:/CQtDeployer/DistributionKit/Dstro2/qml/QtQuick/Controls.2/designer/InsetSection.qml not exits in qt Dir" PASS : deploytest::testConfFile() QWARN : deploytest::testPackages() "D:/CQtDeployer/DistributionKit/lolTr/qtbase_tr.qm not exits in qt Dir" QWARN : deploytest::testPackages() "D:/CQtDeployer/DistributionKit/package2/ZzZ/translations/qtbase_tr.qm not exits in qt Dir" QWARN : deploytest::testPackages() "D:/CQtDeployer/DistributionKit/package2/ZzZ/q/and/q/QtQuick/Controls.2/designer/InsetSection.qml not exits in qt Dir" QWARN : deploytest::testPackages() "D:/CQtDeployer/DistributionKit/package2/ZzZ/translations/qtdeclarative_tr.qm not exits in qt Dir" PASS : deploytest::testPackages() PASS : deploytest::testClear() QSYSTEM: deploytest::testIgnore() "added unnecessary D:/CQtDeployer/DistributionKit/libwinpthread-1.dll" QSYSTEM: deploytest::testIgnore() "added unnecessary D:/CQtDeployer/DistributionKit/libgcc_s_seh-1.dll" QSYSTEM: deploytest::testIgnore() "added unnecessary D:/CQtDeployer/DistributionKit/libstdc++-6.dll" FAIL! : deploytest::testIgnore() 'false' returned FALSE. (runTestParams fail) tst_deploytest.cpp(1430) : failure location QWARN : deploytest::testIgnore() "D:/CQtDeployer/DistributionKit/translations/qtbase_tr.qm not exits in qt Dir" PASS : deploytest::testLibDir() QWARN : deploytest::testExtraPlugins() "D:/CQtDeployer/DistributionKit/translations/qtbase_tr.qm not exits in qt Dir" QWARN : deploytest::testExtraPlugins() "D:/CQtDeployer/DistributionKit/plugins/sqldrivers/qsqlmysql.dll not exits in qt Dir" QWARN : deploytest::testExtraPlugins() "D:/CQtDeployer/DistributionKit/translations/qtbase_tr.qm not exits in qt Dir" QWARN : deploytest::testExtraPlugins() "D:/CQtDeployer/DistributionKit/plugins/sqldrivers/qsqlmysql.dll not exits in qt Dir" QWARN : deploytest::testExtraPlugins() "D:/CQtDeployer/DistributionKit/translations/qtbase_tr.qm not exits in qt Dir" QWARN : deploytest::testExtraPlugins() "D:/CQtDeployer/DistributionKit/translations/qtbase_tr.qm not exits in qt Dir" PASS : deploytest::testExtraPlugins() PASS : deploytest::testTargetDir() QWARN : deploytest::testSystemLib() "D:/CQtDeployer/DistributionKit/translations/qtbase_tr.qm not exits in qt Dir" PASS : deploytest::testSystemLib() QWARN : deploytest::testOutDirs() "D:/CQtDeployer/DistributionKit/lolTr/qtbase_tr.qm not exits in qt Dir" QWARN : deploytest::testOutDirs() "D:/CQtDeployer/DistributionKit/q/QtQuick/Controls.2/designer/InsetSection.qml not exits in qt Dir" QWARN : deploytest::testOutDirs() "D:/CQtDeployer/DistributionKit/lolTr/qtdeclarative_tr.qm not exits in qt Dir" QWARN : deploytest::testOutDirs() "D:/CQtDeployer/DistributionKit/lolTr/qtbase_tr.qm not exits in qt Dir" QWARN : deploytest::testOutDirs() "D:/CQtDeployer/DistributionKit/q/QtQuick/Controls.2/designer/InsetSection.qml not exits in qt Dir" QWARN : deploytest::testOutDirs() "D:/CQtDeployer/DistributionKit/lolTr/qtdeclarative_tr.qm not exits in qt Dir" PASS : deploytest::testOutDirs() PASS : deploytest::testMSVC() PASS : deploytest::testEmptyParamsString() PASS : deploytest::testQIF() PASS : deploytest::testQIFMulti() PASS : deploytest::testQIFCustom() PASS : deploytest::testZIP() PASS : deploytest::testZIPMulti() PASS : deploytest::testDEB() PASS : deploytest::testDEBMulti() PASS : deploytest::testDEBCustom() PASS : deploytest::testMultiPacking() QWARN : deploytest::testInit() QSettings::setValue: Empty key passed QWARN : deploytest::testInit() QSettings::setValue: Empty key passed QWARN : deploytest::testInit() QSettings::setValue: Empty key passed PASS : deploytest::testInit() PASS : deploytest::testDependencyMap() PASS : deploytest::testQmlScaner() PASS : deploytest::testPrefix() PASS : deploytest::testallowEmptyPackages() PASS : deploytest::testEmptyPackages() QWARN : deploytest::customTest() QSettings::setValue: Empty key passed PASS : deploytest::customTest() PASS : deploytest::cleanupTestCase() Totals: 42 passed, 1 failed, 0 skipped, 0 blacklisted, 237300ms ********* Finished testing of deploytest ********* ```
pzhlkj6612 commented 3 years ago

Error info

Qt 5.15.1 & 5.15.2

The two versions' CQtDeployer\buildLog.log are almost identical but the position of line QSYSTEM: deploytest::testIgnore() "added unnecessary file : D:/CQtDeployer/DistributionKit/libstdc++-6.dll" before FAIL! : deploytest::testIgnore() 'false' returned FALSE. (runTestParams fail) is not the same.

stdout:

mingw32-make: *** [Makefile:868: test] Error 1

Full content of CQtDeployer\buildLog.log:

buildLog.log ``` ********* Start testing of deploytest ********* Config: Using QtTest library 5.15.1, Qt 5.15.1 (x86_64-little_endian-llp64 shared (dynamic) release build; by GCC 8.1.0) PASS : deploytest::initTestCase() PASS : deploytest::testDeployTarget() PASS : deploytest::testStrip() PASS : deploytest::testExtractLib() PASS : deploytest::testRelativeLink() PASS : deploytest::testCheckQt() PASS : deploytest::testQmlExtrct() PASS : deploytest::testSetTargetDir() PASS : deploytest::testZip() PASS : deploytest::costomScript() PASS : deploytest::testDistroStruct() PASS : deploytest::testOverwrite() PASS : deploytest::testextraData() QWARN : deploytest::testQt() "D:/CQtDeployer/DistributionKit/QtWidgetsProject.exe not exits in qt Dir" PASS : deploytest::testQt() PASS : deploytest::testWebEngine() PASS : deploytest::testConfFile() PASS : deploytest::testPackages() PASS : deploytest::testClear() QSYSTEM: deploytest::testIgnore() "added unnecessary D:/CQtDeployer/DistributionKit/libstdc++-6.dll" QSYSTEM: deploytest::testIgnore() "added unnecessary D:/CQtDeployer/DistributionKit/libgcc_s_seh-1.dll" QSYSTEM: deploytest::testIgnore() "added unnecessary D:/CQtDeployer/DistributionKit/libwinpthread-1.dll" FAIL! : deploytest::testIgnore() 'false' returned FALSE. (runTestParams fail) tst_deploytest.cpp(1430) : failure location PASS : deploytest::testLibDir() QWARN : deploytest::testExtraPlugins() "D:/CQtDeployer/DistributionKit/plugins/sqldrivers/qsqlmysql.dll not exits in qt Dir" QWARN : deploytest::testExtraPlugins() "D:/CQtDeployer/DistributionKit/plugins/sqldrivers/qsqlmysql.dll not exits in qt Dir" PASS : deploytest::testExtraPlugins() PASS : deploytest::testTargetDir() PASS : deploytest::testSystemLib() PASS : deploytest::testOutDirs() PASS : deploytest::testMSVC() PASS : deploytest::testEmptyParamsString() PASS : deploytest::testQIF() PASS : deploytest::testQIFMulti() PASS : deploytest::testQIFCustom() PASS : deploytest::testZIP() PASS : deploytest::testZIPMulti() PASS : deploytest::testDEB() PASS : deploytest::testDEBMulti() PASS : deploytest::testDEBCustom() PASS : deploytest::testMultiPacking() QWARN : deploytest::testInit() QSettings::setValue: Empty key passed QWARN : deploytest::testInit() QSettings::setValue: Empty key passed QWARN : deploytest::testInit() QSettings::setValue: Empty key passed PASS : deploytest::testInit() PASS : deploytest::testDependencyMap() PASS : deploytest::testQmlScaner() PASS : deploytest::testPrefix() PASS : deploytest::testallowEmptyPackages() PASS : deploytest::testEmptyPackages() QWARN : deploytest::customTest() QSettings::setValue: Empty key passed PASS : deploytest::customTest() PASS : deploytest::cleanupTestCase() Totals: 42 passed, 1 failed, 0 skipped, 0 blacklisted, 233855ms ********* Finished testing of deploytest ********* ```
EndrII commented 3 years ago

I am close this issue because it is fixed in the #483 pull request.