Skip to content

Commit 41468aa

Browse files
committed
Merge branch 'main' into block-scalars
2 parents 962483d + 4cd6558 commit 41468aa

File tree

17 files changed

+658
-29
lines changed

17 files changed

+658
-29
lines changed

.github/workflows/expected/default.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
| Test result | Passed | Failed | Skipped | Test name |
22
|:------------------------|-------:|-------:|--------:|:-------------------------|
3-
| :heavy_check_mark: pass | 2618 | 0 | 182 | TestAbstractCommand |
3+
| :heavy_check_mark: pass | 5 | 0 | 0 | bml.log |
4+
| :heavy_check_mark: pass | 6 | 0 | 0 | bt_cmd.log |
5+
| :x: fail | 320 | 5 | 0 | bt_core.log |
6+
| :x: fail | 3 | 110 | 0 | bt_edit.log |
7+
| :heavy_check_mark: pass | 95 | 0 | 0 | bt_gst.log |
8+
| :heavy_check_mark: pass | 15 | 0 | 0 | bt_ic.log |
9+
| :heavy_check_mark: pass | 2800 | 0 | 182 | TestAbstractCommand |
410
| :heavy_check_mark: pass | 1092 | 0 | 0 | TestAbstractPokitService |
511
| :heavy_check_mark: pass | 126 | 0 | 0 | TestCalibrateCommand |
612
| :heavy_check_mark: pass | 420 | 0 | 0 | TestCalibrationService |

.github/workflows/expected/path.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
| Test result | Passed | Failed | Skipped | Test name |
22
|:------------------------|-------:|-------:|--------:|:-------------------------|
3-
| :heavy_check_mark: pass | 90 | 0 | 26 | TestAbstractCommand |
3+
| :heavy_check_mark: pass | 116 | 0 | 26 | TestAbstractCommand |
44
| :heavy_check_mark: pass | 52 | 0 | 0 | TestAbstractPokitService |
55
| :heavy_check_mark: pass | 6 | 0 | 0 | TestCalibrateCommand |
66
| :heavy_check_mark: pass | 20 | 0 | 0 | TestCalibrationService |

.github/workflows/lint.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# SPDX-FileCopyrightText: 2022-2024 Paul Colby <git@colby.id.au>
2+
# SPDX-License-Identifier: MIT
3+
4+
name: Lint Checks
5+
6+
on: [push, pull_request]
7+
8+
jobs:
9+
shellcheck:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
- run: shellcheck --enable=all --norc test/test.sh

.github/workflows/test.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# SPDX-FileCopyrightText: 2022 Paul Colby <git@colby.id.au>
1+
# SPDX-FileCopyrightText: 2022-2024 Paul Colby <git@colby.id.au>
22
# SPDX-License-Identifier: MIT
33

44
name: Automatic Tests
@@ -22,6 +22,7 @@ jobs:
2222
- macos-11
2323
- macos-12
2424
- macos-13
25+
- macos-14
2526
- ubuntu-20.04
2627
- ubuntu-22.04
2728
- windows-2019
@@ -106,6 +107,7 @@ jobs:
106107
- macos-11
107108
- macos-12
108109
- macos-13
110+
- macos-14
109111
- ubuntu-20.04
110112
- ubuntu-22.04
111113
- windows-2019

.yamllint.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# SPDX-FileCopyrightText: 2022 Paul Colby <git@colby.id.au>
1+
# SPDX-FileCopyrightText: 2022-2024 Paul Colby <git@colby.id.au>
22
# SPDX-License-Identifier: MIT
33

44
extends: default

CHANGELOG.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [1.1.0] (2024-02-11)
11+
12+
### Changed
13+
14+
- Increased support for non-QtTest (but still valid) TAP files ([#2])
15+
16+
### Fixed
17+
18+
- Total 'pass' count was incorrectly deducting 'skip' count.
19+
1020
## [1.0.1] (2023-03-29)
1121

1222
### Changed
@@ -20,9 +30,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2030
- Support for summarising [Qt Test] [TAP] files.
2131
- Automated tests on all supported GitHub-hosted runners (`macos-*`, `ubuntu-*` and `windows-*`).
2232

23-
[unreleased]: https://github.com/pcolby/tap-summary/compare/v1.0.1...HEAD
33+
[unreleased]: https://github.com/pcolby/tap-summary/compare/v1.1.0...HEAD
34+
[1.1.0]: https://github.com/pcolby/tap-summary/releases/tag/v1.1.0
2435
[1.0.1]: https://github.com/pcolby/tap-summary/releases/tag/v1.0.1
2536
[1.0.0]: https://github.com/pcolby/tap-summary/releases/tag/v1.0.0
2637

38+
[#2]: https://github.com/pcolby/tap-summary/issues/2
2739
[TAP]: https://testanything.org/ "Test Anything Protocol"
2840
[Qt Test]: https://doc.qt.io/qt-6/qtest-overview.html "Qt Test Overview"

action.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
# SPDX-FileCopyrightText: 2022 Paul Colby <git@colby.id.au>
1+
# SPDX-FileCopyrightText: 2022-2024 Paul Colby <git@colby.id.au>
22
# SPDX-License-Identifier: MIT
33

4-
name: Summary Test Results
4+
name: Summarize Test Results
55

66
author: Paul Colby
77

summary.gawk

Lines changed: 32 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# SPDX-FileCopyrightText: 2022 Paul Colby <git@colby.id.au>
1+
# SPDX-FileCopyrightText: 2022-2024 Paul Colby <git@colby.id.au>
22
# SPDX-License-Identifier: MIT
33
#
44
# Summarise a set of QTest TAP (Test Anything Protocol) output files as a
@@ -16,23 +16,43 @@ BEGIN {
1616
maxNameLength = 0
1717
}
1818

19-
FNR==2 {
20-
testName = $2
19+
# Reset the test name at the beginning of each TAP file.
20+
BEGINFILE {
21+
testName=""
22+
}
23+
24+
# If we have test results, and no test name yet, default to the current TAP file name.
25+
/^(not )?ok .*/ && !testName {
26+
name=FILENAME
27+
sub("^.*/", "", name)
28+
sub(".tap$", "", name)
29+
setTestName(name)
30+
}
31+
32+
# QtTest sets the test name on the second line of the TAP file.
33+
FNR==2 && NF==2 && $1=="#" {
34+
setTestName($2)
35+
}
36+
37+
function setTestName(name) {
38+
testName=name
2139
if (length(testName) > maxNameLength)
2240
maxNameLength = length(testName)
23-
if (!(testName in tests)) {
24-
tests[testName]["skip"] = 0
25-
tests[testName]["pass"] = 0
26-
tests[testName]["fail"] = 0
27-
}
2841
}
2942

30-
/^ok .*[^\\]#\s*SKIP/{
43+
# Handle skipped tests.
44+
/^ok .*[^\\]#\s*SKIP/ {
3145
tests[testName]["skip"]++
3246
}
3347

34-
/^#\s*(pass|fail)\s+[0-9]+$/ {
35-
tests[testName][$2] += $3
48+
# Handle passed (but not skipped) tests.
49+
/^ok / && !/^ok .*[^\\]#\s*SKIP/ {
50+
tests[testName]["pass"]++
51+
}
52+
53+
# Handle failed tests.
54+
/^not ok / {
55+
tests[testName]["fail"]++
3656
}
3757

3858
END {
@@ -45,8 +65,7 @@ END {
4565
printf "| %-18s %4s | %6u | %6u | %7u | %-*s |\n",
4666
(tests[name]["fail"]) ? ":x:" : ":heavy_check_mark:",
4767
(tests[name]["fail"]) ? "fail" : "pass",
48-
tests[name]["pass"] - tests[name]["skip"],
49-
tests[name]["fail"], tests[name]["skip"],
68+
tests[name]["pass"], tests[name]["fail"], tests[name]["skip"],
5069
maxNameLength, name
5170
}
5271
}

test/buzztrax-7856445010/bml.log.tap

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
ok 1 - tests/lib/bml/e-core.c:BmlCoreExamples:test_bml_setup: Passed
2+
ok 2 - tests/lib/bml/e-core.c:BmlCoreExamples:test_bml_finalize: Passed
3+
ok 3 - tests/lib/bml/e-core.c:BmlCoreExamples:test_bmln_master_info: Passed
4+
ok 4 - tests/lib/bml/e-core.c:BmlCoreExamples:test_bmln_open: Passed
5+
ok 5 - tests/lib/bml/e-class.c:BmlClassExamples:test_bmln_get_machine_info: Passed
6+
1..5
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
ok 1 - tests/ui/cmd/e-cmd-application.c:BtCmdApplicationExamples:test_bt_cmd_application_create: Passed
2+
ok 2 - tests/ui/cmd/e-cmd-application.c:BtCmdApplicationExamples:test_bt_cmd_application_play: Passed
3+
ok 3 - tests/ui/cmd/e-cmd-application.c:BtCmdApplicationExamples:test_bt_cmd_application_play_two_files: Passed
4+
ok 4 - tests/ui/cmd/e-cmd-application.c:BtCmdApplicationExamples:test_bt_cmd_application_play_incomplete_file: Passed
5+
ok 5 - tests/ui/cmd/e-cmd-application.c:BtCmdApplicationExamples:test_bt_cmd_application_info: Passed
6+
ok 6 - tests/ui/cmd/e-cmd-application.c:BtCmdApplicationExamples:test_bt_cmd_application_info_for_incomplete_file: Passed
7+
1..6

0 commit comments

Comments
 (0)