[rtems-central commit] qdp: Produce coverage reports

Sebastian Huber sebh at rtems.org
Tue Nov 21 13:35:41 UTC 2023


Module:    rtems-central
Branch:    master
Commit:    f6daa77900534c1961e7814fd11d9647863e099e
Changeset: http://git.rtems.org/rtems-central/commit/?id=f6daa77900534c1961e7814fd11d9647863e099e

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Tue Nov 21 11:13:17 2023 +0100

qdp: Produce coverage reports

---

 spec-qdp/qdp/build/gcda-qual-only-board.yml        | 15 +++++++
 spec-qdp/qdp/build/gcda-qual-only-simulator.yml    | 15 +++++++
 spec-qdp/qdp/deployment/coverage-board-html.yml    | 19 ++++++++
 spec-qdp/qdp/deployment/coverage-board-json.yml    | 19 ++++++++
 .../qdp/deployment/coverage-simulator-html.yml     | 19 ++++++++
 .../qdp/deployment/coverage-simulator-json.yml     | 19 ++++++++
 spec-qdp/qdp/package-build.yml                     |  8 ++++
 spec-qdp/qdp/steps/gcda-qual-only-board.yml        | 27 ++++++++++++
 spec-qdp/qdp/steps/gcda-qual-only-simulator.yml    | 27 ++++++++++++
 spec-qdp/qdp/steps/gcovr-qual-only-board.yml       | 51 ++++++++++++++++++++++
 spec-qdp/qdp/steps/gcovr-qual-only-simulator.yml   | 51 ++++++++++++++++++++++
 11 files changed, 270 insertions(+)

diff --git a/spec-qdp/qdp/build/gcda-qual-only-board.yml b/spec-qdp/qdp/build/gcda-qual-only-board.yml
new file mode 100644
index 00000000..adcc133d
--- /dev/null
+++ b/spec-qdp/qdp/build/gcda-qual-only-board.yml
@@ -0,0 +1,15 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2022 embedded brains GmbH & Co. KG
+copyrights-by-license: {}
+directory: ${../variant:/build-directory}/gcov-bsp-qual-only-board
+directory-state-type: generic
+enabled-by: true
+files: []
+hash: null
+links: []
+patterns:
+- exclude: []
+  include: '**/*.gc??'
+qdp-type: directory-state
+type: qdp
diff --git a/spec-qdp/qdp/build/gcda-qual-only-simulator.yml b/spec-qdp/qdp/build/gcda-qual-only-simulator.yml
new file mode 100644
index 00000000..50ab0179
--- /dev/null
+++ b/spec-qdp/qdp/build/gcda-qual-only-simulator.yml
@@ -0,0 +1,15 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2022 embedded brains GmbH & Co. KG
+copyrights-by-license: {}
+directory: ${../variant:/build-directory}/gcov-bsp-qual-only-simulator
+directory-state-type: generic
+enabled-by: true
+files: []
+hash: null
+links: []
+patterns:
+- exclude: []
+  include: '**/*.gc??'
+qdp-type: directory-state
+type: qdp
diff --git a/spec-qdp/qdp/deployment/coverage-board-html.yml b/spec-qdp/qdp/deployment/coverage-board-html.yml
new file mode 100644
index 00000000..44dda140
--- /dev/null
+++ b/spec-qdp/qdp/deployment/coverage-board-html.yml
@@ -0,0 +1,19 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2023 embedded brains GmbH & Co. KG
+copyrights-by-license: {}
+directory: ${../variant:/deployment-directory}/doc/coverage/board
+directory-state-type: generic
+enabled-by: target/evaluation-board
+files: []
+hash: null
+links:
+- hash: null
+  name: member
+  role: input-to
+  uid: ../steps/archive
+patterns:
+- exclude: []
+  include: '**/*'
+qdp-type: directory-state
+type: qdp
diff --git a/spec-qdp/qdp/deployment/coverage-board-json.yml b/spec-qdp/qdp/deployment/coverage-board-json.yml
new file mode 100644
index 00000000..72bf20d7
--- /dev/null
+++ b/spec-qdp/qdp/deployment/coverage-board-json.yml
@@ -0,0 +1,19 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2022 embedded brains GmbH & Co. KG
+copyrights-by-license: {}
+directory: ${../variant:/deployment-directory}/doc/coverage
+directory-state-type: generic
+enabled-by: target/evaluation-board
+files:
+- file: board.json
+  hash: null
+hash: null
+links:
+- hash: null
+  name: member
+  role: input-to
+  uid: ../steps/archive
+patterns: []
+qdp-type: directory-state
+type: qdp
diff --git a/spec-qdp/qdp/deployment/coverage-simulator-html.yml b/spec-qdp/qdp/deployment/coverage-simulator-html.yml
new file mode 100644
index 00000000..72feb3f6
--- /dev/null
+++ b/spec-qdp/qdp/deployment/coverage-simulator-html.yml
@@ -0,0 +1,19 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2023 embedded brains GmbH & Co. KG
+copyrights-by-license: {}
+directory: ${../variant:/deployment-directory}/doc/coverage/simulator
+directory-state-type: generic
+enabled-by: target/simulator
+files: []
+hash: null
+links:
+- hash: null
+  name: member
+  role: input-to
+  uid: ../steps/archive
+patterns:
+- exclude: []
+  include: '**/*'
+qdp-type: directory-state
+type: qdp
diff --git a/spec-qdp/qdp/deployment/coverage-simulator-json.yml b/spec-qdp/qdp/deployment/coverage-simulator-json.yml
new file mode 100644
index 00000000..eb9f8699
--- /dev/null
+++ b/spec-qdp/qdp/deployment/coverage-simulator-json.yml
@@ -0,0 +1,19 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2022 embedded brains GmbH & Co. KG
+copyrights-by-license: {}
+directory: ${../variant:/deployment-directory}/doc/coverage
+directory-state-type: generic
+enabled-by: target/simulator
+files:
+- file: simulator.json
+  hash: null
+hash: null
+links:
+- hash: null
+  name: member
+  role: input-to
+  uid: ../steps/archive
+patterns: []
+qdp-type: directory-state
+type: qdp
diff --git a/spec-qdp/qdp/package-build.yml b/spec-qdp/qdp/package-build.yml
index 4e01fc37..29978db7 100644
--- a/spec-qdp/qdp/package-build.yml
+++ b/spec-qdp/qdp/package-build.yml
@@ -39,6 +39,14 @@ links:
   uid: steps/test-extra-simulator
 - role: build-step
   uid: steps/test-extra-board
+- role: build-step
+  uid: steps/gcda-qual-only-board
+- role: build-step
+  uid: steps/gcda-qual-only-simulator
+- role: build-step
+  uid: steps/gcovr-qual-only-board
+- role: build-step
+  uid: steps/gcovr-qual-only-simulator
 - role: build-step
   uid: steps/doxygen-tagfile
 - role: build-step
diff --git a/spec-qdp/qdp/steps/gcda-qual-only-board.yml b/spec-qdp/qdp/steps/gcda-qual-only-board.yml
new file mode 100644
index 00000000..4c8d5eb1
--- /dev/null
+++ b/spec-qdp/qdp/steps/gcda-qual-only-board.yml
@@ -0,0 +1,27 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+build-step-type: gcda-producer
+copyrights:
+- Copyright (C) 2022 embedded brains GmbH & Co. KG
+description: |
+  Produce gcda files from the test log.
+enabled-by: target/evaluation-board
+gcov-tool: ${../deployment/rtems-tool-suite:/directory}/bin/${../variant:/arch}-rtems${../variant:/rtems-version}-gcov-tool
+links:
+- hash: null
+  name: build
+  role: input
+  uid: ../build/bsp-qual-only-coverage
+- hash: null
+  name: tools
+  role: input
+  uid: ../deployment/rtems-tool-suite
+- hash: null
+  name: log
+  role: input
+  uid: ../test-logs/qual-only-coverage-board
+- name: destination
+  role: output
+  uid: ../build/gcda-qual-only-board
+qdp-type: build-step
+type: qdp
+working-directory: ${../variant:/build-directory}
diff --git a/spec-qdp/qdp/steps/gcda-qual-only-simulator.yml b/spec-qdp/qdp/steps/gcda-qual-only-simulator.yml
new file mode 100644
index 00000000..d8235a25
--- /dev/null
+++ b/spec-qdp/qdp/steps/gcda-qual-only-simulator.yml
@@ -0,0 +1,27 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+build-step-type: gcda-producer
+copyrights:
+- Copyright (C) 2022 embedded brains GmbH & Co. KG
+description: |
+  Produce gcda files from the test log.
+enabled-by: target/simulator
+gcov-tool: ${../deployment/rtems-tool-suite:/directory}/bin/${../variant:/arch}-rtems${../variant:/rtems-version}-gcov-tool
+links:
+- hash: null
+  name: build
+  role: input
+  uid: ../build/bsp-qual-only-coverage
+- hash: null
+  name: tools
+  role: input
+  uid: ../deployment/rtems-tool-suite
+- hash: null
+  name: log
+  role: input
+  uid: ../test-logs/qual-only-coverage-simulator
+- name: destination
+  role: output
+  uid: ../build/gcda-qual-only-simulator
+qdp-type: build-step
+type: qdp
+working-directory: ${../variant:/build-directory}
diff --git a/spec-qdp/qdp/steps/gcovr-qual-only-board.yml b/spec-qdp/qdp/steps/gcovr-qual-only-board.yml
new file mode 100644
index 00000000..73c6196a
--- /dev/null
+++ b/spec-qdp/qdp/steps/gcovr-qual-only-board.yml
@@ -0,0 +1,51 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+actions:
+- action: subprocess
+  enabled-by: true
+  command:
+  - mkdir
+  - -p
+  - ${../deployment/coverage-board-html:/directory}
+  env: []
+  expected-return-code: null
+  working-directory: ${../source/rtems-qual-only:/directory}
+- action: subprocess
+  enabled-by: true
+  command:
+  - gcovr
+  - --json-summary
+  - ${../deployment/coverage-board-json:/file}
+  - --json-summary-pretty
+  - --gcov-executable=${../deployment/rtems-tool-suite:/directory}/bin/${../variant:/arch}-rtems${../variant:/rtems-version}-gcov
+  - --html-details
+  - ${../deployment/coverage-board-html:/directory}/index.html
+  - --html-medium-threshold
+  - '80.0'
+  - --html-high-threshold
+  - '100.0'
+  - --object-directory
+  - ${../build/gcda-qual-only-board:/directory}/${../variant:/arch}/${../variant:/bsp}-qual-only-coverage
+  - ${../build/gcda-qual-only-board:/directory}/${../variant:/arch}/${../variant:/bsp}-qual-only-coverage
+  env: []
+  expected-return-code: 0
+  working-directory: ${../source/rtems-qual-only:/directory}
+build-step-type: run-actions
+copyrights:
+- Copyright (C) 2022 embedded brains GmbH & Co. KG
+description: |
+  Runs gcovr to produce a coverage report.
+enabled-by: target/evaluation-board
+links:
+- hash: null
+  name: source
+  role: input
+  uid: ../build/gcda-qual-only-board
+- name: html
+  role: output
+  uid: ../deployment/coverage-board-html
+- name: json
+  role: output
+  uid: ../deployment/coverage-board-json
+params: {}
+qdp-type: build-step
+type: qdp
diff --git a/spec-qdp/qdp/steps/gcovr-qual-only-simulator.yml b/spec-qdp/qdp/steps/gcovr-qual-only-simulator.yml
new file mode 100644
index 00000000..cdc933cd
--- /dev/null
+++ b/spec-qdp/qdp/steps/gcovr-qual-only-simulator.yml
@@ -0,0 +1,51 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+actions:
+- action: subprocess
+  enabled-by: true
+  command:
+  - mkdir
+  - -p
+  - ${../deployment/coverage-simulator-html:/directory}
+  env: []
+  expected-return-code: null
+  working-directory: ${../source/rtems-qual-only:/directory}
+- action: subprocess
+  enabled-by: true
+  command:
+  - gcovr
+  - --json-summary
+  - ${../deployment/coverage-simulator-json:/file}
+  - --json-summary-pretty
+  - --gcov-executable=${../deployment/rtems-tool-suite:/directory}/bin/${../variant:/arch}-rtems${../variant:/rtems-version}-gcov
+  - --html-details
+  - ${../deployment/coverage-simulator-html:/directory}/index.html
+  - --html-medium-threshold
+  - '80.0'
+  - --html-high-threshold
+  - '100.0'
+  - --object-directory
+  - ${../build/gcda-qual-only-simulator:/directory}/${../variant:/arch}/${../variant:/bsp}-qual-only-coverage
+  - ${../build/gcda-qual-only-simulator:/directory}/${../variant:/arch}/${../variant:/bsp}-qual-only-coverage
+  env: []
+  expected-return-code: 0
+  working-directory: ${../source/rtems-qual-only:/directory}
+build-step-type: run-actions
+copyrights:
+- Copyright (C) 2022 embedded brains GmbH & Co. KG
+description: |
+  Runs gcovr to produce a coverage report.
+enabled-by: target/simulator
+links:
+- hash: null
+  name: source
+  role: input
+  uid: ../build/gcda-qual-only-simulator
+- name: html
+  role: output
+  uid: ../deployment/coverage-simulator-html
+- name: json
+  role: output
+  uid: ../deployment/coverage-simulator-json
+params: {}
+qdp-type: build-step
+type: qdp



More information about the vc mailing list