Giter Site home page Giter Site logo

bcoconni / valgrindci Goto Github PK

View Code? Open in Web Editor NEW
19.0 19.0 8.0 192 KB

A Python package that provides tools to integrate valgrind into your CI workflow

License: GNU General Public License v3.0

Python 74.31% CSS 6.98% HTML 13.11% JavaScript 3.78% CMake 0.97% C 0.84%
continuous-integration html-report valgrind valgrind-log-parsing

valgrindci's People

Contributors

bcoconni avatar dependabot[bot] avatar hamletg avatar iotanbo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

valgrindci's Issues

New version for PyPI

I just ran into the problem fixed in #5.

When will a new release be done to PyPI? I don't want to build from source for my docker image unless necessary. In the interim, I may just patch the source during image build if no deployment is imminent.

suggestion: Add JUnit xml export

Would be very useful to add support for JUnit xml export because Jenkins natively understands it

Refs:

multiple xml reports

Can ValgrindCI handle multiple xml reports now?
If we have many valgrind.xml reports in the folder "/output/", could we use the command of "valgrind-ci /output/*.valgrind.xml "?
Thank you very much!

Missing error when use --summary

I have tested this script in my binay project but your output if I use --summary and --number-of-erros is different. Please check with the xml below
output_file.txt
number-of-errors: 14 erorrs
but --sumary: only 6 errors

fails for valgrind 3.15 when trying to read "./stack[2]"

ValgrindCI 0.2.0 fails under valgrind 3.15 and python 3.8 with error

Traceback (most recent call last):
  File "/usr/local/bin/valgrind-ci", line 23, in <module>
    main()
  File "/usr/local/lib/python3.8/dist-packages/ValgrindCI/__init__.py", line 54, in main
    data.parse(args.xml_file)
  File "/usr/local/lib/python3.8/dist-packages/ValgrindCI/parse.py", line 120, in parse
    self.errors.append(Error(error_tag))
  File "/usr/local/lib/python3.8/dist-packages/ValgrindCI/parse.py", line 50, in __init__
    for frame in tag.find("./stack[2]").findall("frame"):
AttributeError: 'NoneType' object has no attribute 'findall'

The fix is a simple if tag.find("./stack[2]") is not None:

attached the patch for the fix. (its a patch file but only txt can be uploaded)
ValgrindCI.txt

Fails if valgrind uses [xwhat] tag instead of [what] in xml file.

Thanks for a useful tool, I've already put a star!
But there is a problem:

When using valgrind-3.15.0 on Ubuntu 20.04, it looks like xwhat tag is used instead of (or in conjuncion with) what
that makes ValgrindCI fail with exception.

Xml output excerpt:

<error>
  <unique>0x0</unique>
  <tid>1</tid>
  <kind>Leak_DefinitelyLost</kind>
  <xwhat>
    <text>248 bytes in 1 blocks are definitely lost in loss record 1 of 1</text>
    <leakedbytes>248</leakedbytes>
    <leakedblocks>1</leakedblocks>
  </xwhat>
  <stack>
    <frame>
      <ip>0x483BE63</ip>
      <obj>/usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so</obj>
      <fn>operator new(unsigned long)</fn>
    </frame>
    <frame>
      <ip>0x10E303</ip>
      <obj>/MyProject/build/p01</obj>
      <fn>main</fn>
      <dir>/MyProject</dir>
      <file>my_file.cpp</file>
      <line>436</line>
    </frame>
  </stack>
</error>

valgrind-ci message:

Traceback (most recent call last):
  File "/home/username/.local/bin/valgrind-ci", line 23, in <module>
    main()
  File "/home/username/.local/lib/python3.8/site-packages/ValgrindCI/__init__.py", line 54, in main
    data.parse(args.xml_file)
  File "/home/username/.local/lib/python3.8/site-packages/ValgrindCI/parse.py", line 94, in parse
    self.errors.append(Error(error_tag))
  File "/home/username/.local/lib/python3.8/site-packages/ValgrindCI/parse.py", line 26, in __init__
    self.what = tag.find("what").text
AttributeError: 'NoneType' object has no attribute 'text'

Detecting debug info

Basically just a feature request I came up with after using this module for some time.

I am using a cmake based project, many times I wonder why I do not get any errors reported in html's generated by ValgrindCI, even though pure valgrind reports memory leaks. Reason is simply I forgot to compile with debug info / debug mode again.

It would be nice if ValgrindCI could warn the user that there is no debug / line info, so output wont be correct.

Update pypi install to 0.3.0

Hi! Using the latest 0.2.0 version I caught the following issue:

Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.11.1/x64/bin/valgrind-ci", line 23, in <module>
    main()
  File "/opt/hostedtoolcache/Python/3.11.1/x64/lib/python3.11/site-packages/ValgrindCI/__init__.py", line 54, in main
    data.parse(args.xml_file)
  File "/opt/hostedtoolcache/Python/3.11.1/x64/lib/python3.11/site-packages/ValgrindCI/parse.py", line 120, in parse
    self.errors.append(Error(error_tag))
                       ^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.11.1/x64/lib/python3.11/site-packages/ValgrindCI/parse.py", line 50, in __init__
    for frame in tag.find("./stack[2]").findall("frame"):
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'findall'

However, this has already been patched e1bc53c. Thus.. can you update the pypi distribution to avoid this critical issue? Thanks!

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.