Skip to content

Commit

Permalink
Trim filename based test names to just the basename
Browse files Browse the repository at this point in the history
  • Loading branch information
pcolby committed Feb 11, 2024
1 parent 45ac521 commit 7c047b6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
5 changes: 4 additions & 1 deletion summary.gawk
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ BEGINFILE {

# If we have test results, and no test name yet, default to the current TAP file name.
/^(not )?ok .*/ && !testName {
setTestName(FILENAME)
name=FILENAME
sub("^.*/", "", name)
sub(".tap$", "", name)
setTestName(name)
}

# QtTest sets the test name on the second line of the TAP file.
Expand Down
16 changes: 8 additions & 8 deletions test/buzztrax-7856445010/expected.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
| Test result | Passed | Failed | Skipped | Test name |
|:------------------------|-------:|-------:|--------:|:--------------------------------------|
| :heavy_check_mark: pass | 5 | 0 | 0 | ./buzztrax-7856445010/bml.log.tap |
| :heavy_check_mark: pass | 6 | 0 | 0 | ./buzztrax-7856445010/bt_cmd.log.tap |
| :x: fail | 320 | 5 | 0 | ./buzztrax-7856445010/bt_core.log.tap |
| :x: fail | 3 | 110 | 0 | ./buzztrax-7856445010/bt_edit.log.tap |
| :heavy_check_mark: pass | 95 | 0 | 0 | ./buzztrax-7856445010/bt_gst.log.tap |
| :heavy_check_mark: pass | 15 | 0 | 0 | ./buzztrax-7856445010/bt_ic.log.tap |
| Test result | Passed | Failed | Skipped | Test name |
|:------------------------|-------:|-------:|--------:|:------------|
| :heavy_check_mark: pass | 5 | 0 | 0 | bml.log |
| :heavy_check_mark: pass | 6 | 0 | 0 | bt_cmd.log |
| :x: fail | 320 | 5 | 0 | bt_core.log |
| :x: fail | 3 | 110 | 0 | bt_edit.log |
| :heavy_check_mark: pass | 95 | 0 | 0 | bt_gst.log |
| :heavy_check_mark: pass | 15 | 0 | 0 | bt_ic.log |

0 comments on commit 7c047b6

Please sign in to comment.