diff --git a/.travis.yml b/.travis.yml index 5d9e2d4..cd24181 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,7 +21,7 @@ after_success: - wget -c https://github.com/probonopd/uploadtool/raw/master/upload.sh # quick fix for issue 223 - if [ "$TRAVIS_TAG" != "$TRAVIS_BRANCH" ] && [ "$TRAVIS_BRANCH" != "master" ]; then export TRAVIS_EVENT_TYPE=pull_request; fi - - bash ./upload.sh ./linuxdeployqt-*.AppImage* + - bash ./upload.sh ./linuxdeployqt-*.AppImage* pvs-studio-report.* after_script: - "xpra stop :99" diff --git a/tests/tests-ci.sh b/tests/tests-ci.sh index 5d6595c..d3d7b64 100755 --- a/tests/tests-ci.sh +++ b/tests/tests-ci.sh @@ -4,7 +4,18 @@ set -x source /opt/qt*/bin/qt*-env.sh /opt/qt*/bin/qmake CONFIG+=release CONFIG+=force_debug_info linuxdeployqt.pro -make -j +# make -j$(nproc) # Not doing here but below with "pvs-tool trace" + +# Test +wget -q -O - http://files.viva64.com/etc/pubkey.txt | sudo apt-key add - +sudo wget -O /etc/apt/sources.list.d/viva64.list http://files.viva64.com/etc/viva64.list +sudo apt-get update +sudo apt-get -y install --no-install-recommends pvs-studio +pvs-studio-analyzer credentials probono@puredarwin.org $PVS_KEY -o ./licence.lic +pvs-studio-analyzer trace -- make -j$(nproc) +pvs-studio-analyzer analyze -e /opt -e /usr -o pvs-studio.log -j $(nproc) -l ./licence.lic +plog-converter -a GA:1,2 -t tasklist -o pvs-studio-report.txt pvs-studio.log +rm ./licence.lic # exit on failure set -e diff --git a/tools/linuxdeployqt/main.cpp b/tools/linuxdeployqt/main.cpp index e9d0277..b74e311 100644 --- a/tools/linuxdeployqt/main.cpp +++ b/tools/linuxdeployqt/main.cpp @@ -251,7 +251,7 @@ int main(int argc, char **argv) QString desktopExecEntry = ""; QString desktopIconEntry = ""; - if (argc > 1) { + if (argc > 2) { /* If we got a desktop file as the argument, try to figure out the application binary from it. * This has the advantage that we can also figure out the icon file this way, and have less work * to do when using linuxdeployqt. */ diff --git a/tools/linuxdeployqt/shared.cpp b/tools/linuxdeployqt/shared.cpp index 61828ba..632ed8e 100644 --- a/tools/linuxdeployqt/shared.cpp +++ b/tools/linuxdeployqt/shared.cpp @@ -514,7 +514,7 @@ LibraryInfo parseLddLibraryLine(const QString &line, const QString &appDirPath, } qtPath += (currentPart + "/"); - } if (state == LibraryName) { + } else if (state == LibraryName) { name = currentPart; info.isDylib = true; info.libraryName = name; @@ -785,7 +785,7 @@ QString runPatchelf(QStringList options) bool patchQtCore(const QString &path, const QString &variable, const QString &value) { return true; // ################################### Disabling for now since using qt.conf - QFile file(path); + /* QFile file(path); if (!file.open(QIODevice::ReadWrite)) { LogWarning() << QString::fromLatin1("Unable to patch %1: %2").arg( QDir::toNativeSeparators(path), file.errorString()); @@ -828,6 +828,7 @@ bool patchQtCore(const QString &path, const QString &variable, const QString &va return false; } return true; + */ } void changeIdentification(const QString &id, const QString &binaryPath)