Giter Site home page Giter Site logo

Comments (11)

bjornpiltz avatar bjornpiltz commented on July 1, 2024 1

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.

bjornpiltz avatar bjornpiltz commented on July 1, 2024 1

It does.

from cppcheck-junit.

johnthagen avatar johnthagen commented on July 1, 2024

What version of cppcheck-junit are you running and under what Python version?

from cppcheck-junit.

bjornpiltz avatar bjornpiltz commented on July 1, 2024

Thanks for your quick response!

cppcheck-junit==1.4.0
Python 2.7.5

from cppcheck-junit.

johnthagen avatar johnthagen commented on July 1, 2024

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.

bjornpiltz avatar bjornpiltz commented on July 1, 2024

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.

johnthagen avatar johnthagen commented on July 1, 2024

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.

bjornpiltz avatar bjornpiltz commented on July 1, 2024

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.

johnthagen avatar johnthagen commented on July 1, 2024

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.

johnthagen avatar johnthagen commented on July 1, 2024

@bjornpiltz Could you confirm that #6 fixes your issue?

from cppcheck-junit.

johnthagen avatar johnthagen commented on July 1, 2024

@bjornpiltz Please test that 1.5.0 fixes your issue.

from cppcheck-junit.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.