Comments (11)
I'm using the latest version of Bamboo - 6.1.1. I know the regex is ok, since I get a passed test when the xml file contains no error.
The problem is that Bamboo's JUnit Parser provides no feedback as to why it objects to the xml file. I'll try to report it to them and see what they say.
Thanks for looking in to this!
from cppcheck-junit.
It does.
from cppcheck-junit.
What version of cppcheck-junit
are you running and under what Python version?
from cppcheck-junit.
Thanks for your quick response!
cppcheck-junit==1.4.0
Python 2.7.5
from cppcheck-junit.
Could you try with version 1.3.0 and 1.1.1 and see if either of those work? I'm wondering if #4 broke Bamboo.
from cppcheck-junit.
v1.1.1
Crashes :(
$ wget https://github.com/johnthagen/cppcheck-junit/archive/v1.1.1.tar.gz
$ tar xvfz v1.1.1.tar.gz
$ python cppcheck-junit-1.1.1/cppcheck_junit.py input.xml output.xml
Traceback (most recent call last):
File "cppcheck-junit-1.1.1/cppcheck_junit.py", line 170, in <module>
sys.exit(main())
File "cppcheck-junit-1.1.1/cppcheck_junit.py", line 149, in main
errors = parse_cppcheck(args.input_file)
File "cppcheck-junit-1.1.1/cppcheck_junit.py", line 83, in parse_cppcheck
error = CppcheckError(file=location_element.get('file'),
AttributeError: 'NoneType' object has no attribute 'get'
v1.3.0
Output is slightly different, but bamboo still doesn't pick it up.
$ wget https://github.com/johnthagen/cppcheck-junit/archive/v1.3.0.tar.gz
$ tar xvfz v1.3.0.tar.gz
$ python cppcheck-junit-1.3.0/cppcheck_junit.py cppcheck-result.xml cppcheck-junit.xml
cppcheck-junit.xml:
<?xml version='1.0' encoding='utf-8'?>
<testsuite errors="1" failures="0" name="Cppcheck errors" tests="1" time="1">
<testcase name="">
<error file="" line="0" message="0: (information) Cppcheck cannot find all the include files (use --check-config for details)" />
</testcase>
</testsuite>
from cppcheck-junit.
I don't have access to a Bamboo server, so I'm not sure how to resolve this. If you can find a output that Bamboo does parse and one that it doesn't, then we can try to compare them and see what is wrong.
Might also want to double check the file name and the regex Bamboo is using to pick up the JUnit files.
For historical sake, what version of Bamboo are you running?
from cppcheck-junit.
Ok, I've got it. As mentioned here and here, name
and classname
can't be empty.
The following workaround fixes it for me:
sed -i 's/classname=""/classname="foo"/g' cppcheck-junit.xml
sed -i 's/name=""/name="bar"/g' cppcheck-junit.xml
from cppcheck-junit.
Thanks for the information. I'll look into fixing this later today.
@yamokosk @mjcaisse Could you comment on if filling these in with non-empty strings would be an issue for your use case?
from cppcheck-junit.
@bjornpiltz Could you confirm that #6 fixes your issue?
from cppcheck-junit.
@bjornpiltz Please test that 1.5.0 fixes your issue.
from cppcheck-junit.
Related Issues (9)
- Failed to use in Bamboo HOT 2
- No module named enum HOT 2
- Installation with pip in Python 3.9 - cppcheck_junit is not recognized as an internal or external command, operable program or batch file HOT 4
- Drop Python 3.6 HOT 2
- Enable GitHub actions on pull requests HOT 1
- Script failure on errors without location HOT 6
- Fix type checking HOT 1
- Optional parameter to set exit code on test error
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cppcheck-junit.