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

Missing name of the test at tap13 format output when timing is required #555

Closed
wenscarl opened this issue Mar 3, 2022 · 3 comments · Fixed by #559
Closed

Missing name of the test at tap13 format output when timing is required #555

wenscarl opened this issue Mar 3, 2022 · 3 comments · Fixed by #559
Labels
Component: Bash Code Everything regarding the bash code Priority: High Broken behavior in specific environments like in parallel mode or only on some operating systems Status: Confirmed The reproducer worked as described Type: Bug

Comments

@wenscarl
Copy link

wenscarl commented Mar 3, 2022

Describe the bug
When the output format is selected to be tap13 and timing option is selected by -T, the names of failed tests will not be shown.

To Reproduce
A test.bats looks like

load $HOME/test/'test_helper/batsassert/load.bash'
load $HOME/test/'test_helper/batscore/load.bash'

@test "TestToFail" {
  assert_output "None"
}

bats -T -F tap13 test.bats gives the following output,

TAP version 13
1..1

  ---
  duration_ms: 6
  message: |
     (from function `assert_output' in file /root/test/test_helper/batsassert/src/assert.bash, line 239,"
      in test file ./script.bats, line 35)"
       `assert_output "dd"' failed"
     -- output differs --"
     expected : None"
     actual   :"
     --"
  ...

Expected behavior
Expect to see not ok 1 TestToFail in the output.

@martin-schulze-vireso martin-schulze-vireso added Component: Bash Code Everything regarding the bash code Priority: High Broken behavior in specific environments like in parallel mode or only on some operating systems Status: Unconfirmend No reproducer was provided or the reproducer did not work for maintainers. labels Mar 7, 2022
@martin-schulze-vireso
Copy link
Member

I tried to reproduce this but the code works as expected on my system. Can you provide the following information:

  • Bats version
  • Bash version
  • operating system
  • version/url of the helper libraries

Also, you are loading a library called batscore. I assume this is bats-support?

@wenscarl
Copy link
Author

I found that the issue appears as long as timing option(-T) is turned on even without loading other library. Updated.
Bats-core version: v1.6.0
Bash version: 5.0.17(1)
OS: Ubuntu 20.04.3 LTS x86_64

@wenscarl wenscarl changed the title Missing name of the test at tap13 format output Missing name of the test at tap13 format output when timing is required Mar 15, 2022
@martin-schulze-vireso martin-schulze-vireso added Status: Confirmed The reproducer worked as described and removed Status: Unconfirmend No reproducer was provided or the reproducer did not work for maintainers. labels Mar 16, 2022
@martin-schulze-vireso
Copy link
Member

martin-schulze-vireso commented Mar 16, 2022

I could reproduce this locally with your updated information. This shows that #443 is necessary.

martin-schulze-vireso added a commit to martin-schulze-vireso/bats-core that referenced this issue Mar 16, 2022
when using timing and tap13 formatter. (Fixes bats-core#555)
martin-schulze-vireso added a commit to martin-schulze-vireso/bats-core that referenced this issue Mar 16, 2022
martin-schulze-vireso added a commit to martin-schulze-vireso/bats-core that referenced this issue Mar 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Bash Code Everything regarding the bash code Priority: High Broken behavior in specific environments like in parallel mode or only on some operating systems Status: Confirmed The reproducer worked as described Type: Bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants