Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Junit Report says Failure when successfull #1097

Closed
albydnc opened this issue Jan 15, 2024 · 5 comments · Fixed by #1114
Closed

Junit Report says Failure when successfull #1097

albydnc opened this issue Jan 15, 2024 · 5 comments · Fixed by #1114
Assignees
Labels

Comments

@albydnc
Copy link

albydnc commented Jan 15, 2024

Environment
Fedora 39

Describe the bug
The Junit output is reporting failure, while the test is successful.

To Reproduce
run vsg -j ./report.xml test.vhdl

library ieee;
  use ieee.std_logic_1164.all;
  use ieee.numeric_std.all;
  use ieee.math_real.all;

entity test is
  port (
    clk_i   : in    std_logic;
    reset_i : in    std_logic
  );
end entity test;

architecture rtl of test is

begin

end architecture rtl;

Expected behavior
I expext the failures tag in the XML to be 0 and the classname of the testcase to not be failure.

Screenshots
CLI output:

$ vsg -c vhdl_style.yaml -j report.xml ./test.vhdl 
================================================================================
File:  ./test.vhdl
================================================================================
Phase 7 of 7... Reporting
Total Rules Checked: 732
Total Violations:    0
  Error   :     0
  Warning :     0

Junit output:

<?xml version="1.0" ?>
<testsuite errors="0" hostname="blabla" failures="1" timestamp="2024-01-15T06:02:29" tests="1" time="0" name="vhdl-style-guide">
  <properties>
  </properties>
  <testcase name="./test.vhdl" time="0" classname="failure">
  </testcase>
  <system-out>
  </system-out>
  <system-err>
  </system-err>
</testsuite>
@albydnc albydnc added the bug label Jan 15, 2024
@jeremiah-c-leary
Copy link
Owner

Afternoon @albydnc ,

I was able to duplicate the issue and have a fix in mind. I was reading up classname and it is supposed to be related to the test itself. Since VSG is just using the JUnit XML to report errors, I think I can drop classname.

So I will plan to fix the failure number and remove classname.

Let me know if you feel we should keep classname.

Regards,

--Jeremy

@jeremiah-c-leary
Copy link
Owner

jeremiah-c-leary commented Jan 21, 2024

Good Afternoon @albydnc ,

I pushed an update to the issue_1097 branch for this issue. When you get a chance, please check it out and let me know if I can merge it to master.

Thanks,

--Jeremy

@jeremiah-c-leary
Copy link
Owner

Morning @albydnc ,

Just a ping to see if you had a chance to check out the update for this issue.

Thanks,

--Jeremy

@albydnc
Copy link
Author

albydnc commented Feb 6, 2024

Thank you for the fix! It looks good now :)

-A

@albydnc albydnc closed this as completed Feb 6, 2024
@jeremiah-c-leary
Copy link
Owner

Awesome,

I will get this merged to master.

--Jeremy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
2 participants