Cppcheck into Jenkins with QT project - c++

I have server with Jenkins and QT project. The server runs on CentOS 7. I installed "Cppcheck" into server also I installed "Cppcheck Plug-in" plugin into Jenkins.
The script for build project:
cd FlashClipboard;
/usr/lib64/qt5/bin/qmake FlashClipboard.pro;
make clean;
make;
cppcheck --enable=all --suppress=missingIncludeSystem . --xml --xml-version=2 . 2> ./tmp/cppcheck.xml;
Post-Build Actions:
But I have error:
[Cppcheck] Starting the cppcheck analysis.
[Cppcheck] Processing 1 files with the pattern 'tmp/cppcheck.xml'.
[Cppcheck] Parsing throws exceptions. javax.xml.bind.UnmarshalException
- with linked exception:
[org.xml.sax.SAXParseException; systemId: file:/var/lib/jenkins/workspace/Flash%20Clipboard/tmp/cppcheck.xml; lineNumber: 1; columnNumber: 1; Premature end of file.]
Build step 'Publish Cppcheck results' changed build result to FAILURE
Build step 'Publish Cppcheck results' marked build as failure
What is my mistake?

sorry but are you sure the path is correct?
Shouldn't it be:
Cppcheck report XML: FlashClipboard/tmp/cppcheck.xml

Related

FAILURE: Build failed with an exception. Give this error message when build android app in qt

I am using qt 5.12 and when compile give this error message. I think it happen when download gradle 4.
Here is the detail error code:
Generating Android Package
Input file: D:/PROJECTS/All Projects/Qt Projects/In Progress/build-Android_Test1-Android_Qt_5_12_10_Clang_armeabi_v7a-Debug/android-libAndroid_Test1.so-deployment-settings.json
Output directory: D:/PROJECTS/All Projects/Qt Projects/In Progress/build-Android_Test1-Android_Qt_5_12_10_Clang_armeabi_v7a-Debug/android-build/
Application binary: D:/PROJECTS/All Projects/Qt Projects/In Progress/build-Android_Test1-Android_Qt_5_12_10_Clang_armeabi_v7a-Debug/libAndroid_Test1.so
Android build platform: android-32
Install to device: No
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine java version from '17.0.1'.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
-- Skipping D:/PROJECTS/IDE/Qt5.12.10/5.12.10/android_armv7/plugins/iconengines/libqsvgicon.so. It has unmet dependencies: lib/libQt5Svg.so.
-- Skipping D:/PROJECTS/IDE/Qt5.12.10/5.12.10/android_armv7/plugins/imageformats/libqsvg.so. It has unmet dependencies: lib/libQt5Svg.so.
Building the android package failed!
-- For more information, run this command with --verbose.
17:20:14: The process "D:\PROJECTS\IDE\Qt5.12.10\5.12.10\android_armv7\bin\androiddeployqt.exe" exited with code 14.
Error while building/deploying project Android_Test1 (kit: Android Qt 5.12.10 Clang armeabi-v7a)
When executing step "Build Android APK"
17:20:14: Elapsed time: 00:17.

Pants exclude specific Python dependencies

Currently, I am using pants to build and test our python2.7 packages. We started noticing the following error during run goal after pytests goal is completed. I tried adding constraints.txt file to exclude the dependencies its complaining about, but the error wouldn't stop. Is there a way to exclude these dependencies during the pants build step?
./pants test.pytest --coverage=auto tests/python/abcd/test/xyz
[pytest]
[cache]
No cached artifacts for 1 target.
Invalidated 1 target.
[run]
Failed to execute PEX file, missing compatible dependencies for:
importlib-metadata
zipp
No .coverage file was found! Skipping coverage reporting.
tests/python/abcd/test/xyz ..... SUCCESS
FAILURE
Can you try increasing the verbosity with:
PEX_VERBOSE=9 ./pants test.pytest --coverage=auto tests/python/abcd/test/xyz
and then respond here?
This error can be caused by a couple of things. Are you executing the PEX on the same operating system that the PEX was built on? Do you also include platforms=[...] in your python_binary function in your BUILD file?

Flatpak (flatpak-build) fatal error when building submodules

Following on from here, when using OpenSUSE Tumbleweed I cannot get flatpak-builder to compile submodule dependencies. I first noticed this issue when developing a console application within Gnome Builder using the Vala dependencies Gee and GXml.
As a test, I have installed org.gnome.Books.json and issued the following command (as documented here):
$ flatpak-builder --repo=repo books-app org.gnome.Books.json
The outcome is the same as I observed when developing my own application, the fatal error:
Initializing build dir
Committing stage init to cache
Starting build of org.gnome.Books
fuse: failed to exec fusermount: Permission denied
<more stuff>
Cloning into '/home/robin/Projects-CSim/org.gnome.books/.flatpak-builder/build/gnome-online-accounts-1/telepathy-account-widgets'...
Submodule path 'telepathy-account-widgets': checked out '7d944b79961dfb6291110ceb27597a224d329b36'
error: Build directory /home/<user>/Projects/org.gnome.books/.flatpak-builder/rofiles/rofiles-D4R4cZ not initialized, use flatpak build-init
Error: module gnome-online-accounts: module gnome-online-accounts: Child process exited with code 1
Effectively it fails to build the very first submodule. This is the same behaviour that I observed when invoked from Gnome-Builder on my project; it downloaded but failed to build the very first submodule - in that case it was libgee-0.8.
I've double checked the Flatpak (V0.10.4) installation here and cannot find a solution. I understand from the documentation that invoking flatpak-builder should automatically invoke flatpak build-init.
This is worrisome as Gnome-Builder seems be using Flatpak as the default packager. Any suggestions?
The problem is not Flatpak. It is a conflict between Flatpak and fuse. For some reason this was not occuring with valac or meson from the command line, only Flatpak.
From here we find a solution:
# chmod +x /usr/bin/fusermount
Is this a peculiarity of OpenSUSE Tumbleweed? In any case, after making this change, Flatpak builds submodules as expected. Magnificent!
Not sure about the security aspect of this, however - any comments would be welcomed.

Appveyor runs tests but OpenCover doesn't show coverage

I am building the project and running test cases in appveyor. After successfully executing test cases the coverage data must be uploaded to coveralls.
But in my case no error is thrown but coverage is being recorded.
The details of my project are
.Net Core 1.1.0
Visual Studio 2017
xunit - 2.2.0
OpenCover - 4.6.519
coveralls.net - 0.7.0
My appveyor.yml is as below :
version: 1.0.{build}
os: Visual Studio 2017
skip_tags: true
configuration: Release
environment:
nodejs_version: "0.12"
COVERALLS_REPO_TOKEN:
secure: rstgrtert
cache:
- "%LOCALAPPDATA%\\Yarn"
install:
- npm i -g yarn#0.16.1
- npm i -g typescript typings
- yarn global add typescript typings
- cd ".\Promact.Oauth.Server\src\Promact.Oauth.Server\"
- yarn
- cd..
- cd..
build_script:
- ps: dotnet restore
build:
project: .\Promact.Oauth.Server\Promact.Oauth.Server.sln
verbosity: minimal
test_script:
- cd ".\src\"
- ps: >-
C:\Users\appveyor\.nuget\packages\OpenCover\4.6.519\tools\OpenCover.Console.exe-target:"C:\Program Files\dotnet\dotnet.exe" -targetargs:"test -f netcoreapp1.1 -c Release .\Promact.Oauth.Server.Tests\Promact.Oauth.Server.Tests.csproj" -mergeoutput -hideskipped:File -output:opencover.xml -oldStyle -filter:"+[Promact.Oauth.Server]*Repository -[Promact.Oauth.Server.Tests*]*" -register:user
if(![string]::IsNullOrEmpty($env:COVERALLS_REPO_TOKEN)){
$coveralls = (Resolve-Path "C:\Users\appveyor\.nuget\packages\coveralls.net\0.7.0\tools\csmacnz.coveralls. exe").ToString()
& $coveralls --opencover -i opencover.xml --repoToken
$env:COVERALLS_REPO_TOKEN --commitId $env:APPVEYOR_REPO_COMMIT --commitBranch $env:APPVEYOR_REPO_BRANCH --commitAuthor $env:APPVEYOR_REPO_COMMIT_AUTHOR --commitEmail $env:APPVEYOR_REPO_COMMIT_AUTHOR_EMAIL --commitMessage $env:APPVEYOR_REPO_COMMIT_MESSAGE --jobId $env:APPVEYOR_JOB_ID
}
In appveyor it runs the test and simply shows
Committing...
No results, this could be for a number of reasons. The most common reasons are:
1) missing PDBs for the assemblies that match the filter please review the
output file and refer to the Usage guide (Usage.rtf) about filters.
2) the profiler may not be registered correctly, please refer to the Usage
guide and the -register switch.
Coverage data uploaded to coveralls.
link to the appveyor build

Not able to build .net solution in Team city by using Nant.exe

I have using team city to build my project by using of Nant as build. So I have created one batch file in to build my project by where I using Nant.exe which is responsible for build my solution.
When I am ruing this batch file from command prompt I am successfully able to build my solution. But When I run the same file from TeamCity its giving me Build fail error.
So That I have verified path and that also correct. Below are the path I have stored in team city.
Path to a build file: Build.bat (bat file for build)
Working directly : D:\CMS (path where my bat file is located.
NAnt home: Path were Nant exe located.
Targeted framwork : Net 4.0
When I am ruing this build by team city every time build fails with below log generated.
[21:27:54]: Checking for changes
[21:27:55]: Clearing temporary directory: C:\TeamCity\buildAgent\temp\buildTmp
[21:27:55]: Checkout directory: D:\Projects\JoyaCMS\src
[21:27:56]: Repository sources transferred
[21:27:55]: Updating sources: server side checkout... (1s)
[21:27:57]: Publishing internal artifacts (2s)
[21:27:57]: Starting: D:\Projects\JoyaCMS\src\UppercuT\lib\NAnt\NAnt.exe - buildfile:D:\Projects\JoyaCMS\src\build.bat -targetframework:net-4.0 - extension:C:\TeamCity\buildAgent\plugins\dotnetPlugin\bin\JetBrains.BuildServer.NAntLoggers .dll -listener:JetBrains.BuildServer.NAntLoggers.NAntListener
[21:27:57]: in directory: D:\Projects\JoyaCMS\src
[21:27:57]: Process exited with code 1
[21:27:57]: NAnt output:
[21:27:57]: NAnt 0.91 (Build 0.91.3881.0; alpha2; 8/17/2010)
[21:27:57]: Copyright (C) 2001-2010 Gerry Shaw
[21:27:57]: http://nant.sourceforge.net
[21:27:57]: BUILD FAILED
[21:27:57]: For more information regarding the cause of the build failure, run the build again in debug mode.
[21:27:57]: Try 'nant -help' for more information
[21:27:57]: D:\Projects\JoyaCMS\src\build.bat(1,1):
[21:27:57]: Error loading buildfile.
[21:27:57]: Data at the root level is invalid. Line 1, position 1.
[21:28:02]: Publishing internal artifacts (1s)
[21:28:05]: Build finished
So let me know how can I resolve this issue in team city. and what setting I need to perform more to resolve this issue.
Thanks,
Amit
First of all I noticed a few occurrences of additional whitespace characters in your NAnt call e.g.- extension:C:\TeamCity\buildAgent\plugins\dotnetPlugin\bin\JetBrains.BuildServer.NAntLoggers .dll. Might be an SO formatting issue, but in case they're part of your batch, remove them first.
If this doesn't help, activate verbose build output via NAnt switch -v+. That should give more information.