diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 24bd3995..89ba63f6 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -29,7 +29,12 @@ on: types: [checks_requested] jobs: + unit-tests: + uses: ./.github/workflows/tests.yml + secrets: inherit build-docs: + needs: unit-tests + if: ${{ always() }} uses: eclipse-score/cicd-workflows/.github/workflows/docs.yml@main permissions: contents: write @@ -41,3 +46,4 @@ jobs: # the bazel-target depends on your repo specific docs_targets configuration (e.g. "suffix") bazel-target: "//:docs -- --github_user=${{ github.repository_owner }} --github_repo=${{ github.event.repository.name }}" retention-days: 3 + tests-report-artifact: bazel-testlogs diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index eb1459ba..a7843bf4 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -13,10 +13,11 @@ name: Tests on: - pull_request_target: + pull_request: types: [opened, reopened, synchronize] merge_group: types: [checks_requested] + workflow_call: jobs: test: name: "Run tests" @@ -25,4 +26,5 @@ jobs: contents: read pull-requests: read with: - bazel-target: 'test //src/...' + bazel-target: 'test //src/... //tests/...' + upload-name: 'bazel-testlogs' diff --git a/BUILD b/BUILD index ec623137..fbd0df03 100644 --- a/BUILD +++ b/BUILD @@ -54,6 +54,7 @@ use_format_targets() docs( data = [ + "@score_platform//:needs_json", "@score_process//:needs_json", # This allows linking to requirements (wp__requirements_comp, etc.) from the process_description repository. ], source_dir = "docs", diff --git a/MODULE.bazel b/MODULE.bazel index 55e00748..0459a782 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -28,10 +28,16 @@ bazel_dep(name = "googletest", version = "1.17.0.bcr.1") # S-CORE process rules bazel_dep(name = "score_bazel_platforms", version = "0.0.4") -bazel_dep(name = "score_docs_as_code", version = "2.3.0") +bazel_dep(name = "score_docs_as_code", version = "2.3.3") bazel_dep(name = "score_tooling", version = "1.1.0") bazel_dep(name = "score_rust_policies", version = "0.0.3") +# Temporary workaround until everything is migrated to docs_as_code v3 +single_version_override( + module_name = "score_docs_as_code", + version = "2.3.3", +) + bazel_dep(name = "score_process", version = "1.4.0", dev_dependency = True) bazel_dep(name = "score_platform", version = "0.5.1", dev_dependency = True) diff --git a/MODULE.bazel.lock b/MODULE.bazel.lock index 74fc81f2..2250b849 100644 --- a/MODULE.bazel.lock +++ b/MODULE.bazel.lock @@ -34,7 +34,6 @@ "https://bcr.bazel.build/modules/aspect_bazel_lib/2.7.7/MODULE.bazel": "491f8681205e31bb57892d67442ce448cda4f472a8e6b3dc062865e29a64f89c", "https://bcr.bazel.build/modules/aspect_bazel_lib/2.8.1/MODULE.bazel": "812d2dd42f65dca362152101fbec418029cc8fd34cbad1a2fde905383d705838", "https://bcr.bazel.build/modules/aspect_bazel_lib/2.9.3/MODULE.bazel": "66baf724dbae7aff4787bf2245cc188d50cb08e07789769730151c0943587c14", - "https://bcr.bazel.build/modules/aspect_bazel_lib/2.9.4/MODULE.bazel": "ccc41028429f894b02fde7ef67d416cba3ba5084ed9ddb9bb6107aa82d118776", "https://bcr.bazel.build/modules/aspect_rules_esbuild/0.21.0/MODULE.bazel": "77dc393c43ad79398b05865444c5200c6f1aae6765615544f2c7730b5858d533", "https://bcr.bazel.build/modules/aspect_rules_esbuild/0.21.0/source.json": "062b1d3dba8adcfeb28fe60c185647f5a53ec0487ffe93cf0ae91566596e4b49", "https://bcr.bazel.build/modules/aspect_rules_js/1.33.1/MODULE.bazel": "db3e7f16e471cf6827059d03af7c21859e7a0d2bc65429a3a11f005d46fc501b", @@ -44,12 +43,8 @@ "https://bcr.bazel.build/modules/aspect_rules_js/2.3.8/source.json": "411ec9d79d6f5fe8a083359588c21d01a5b48d88a2cbd334a4c90365015b7836", "https://bcr.bazel.build/modules/aspect_rules_lint/0.12.0/MODULE.bazel": "e767c5dbfeb254ec03275a7701b5cfde2c4d2873676804bc7cb27ddff3728fed", "https://bcr.bazel.build/modules/aspect_rules_lint/1.0.3/MODULE.bazel": "ed0fe929647ba21d2041e14ea3d757133ca306b72d4998e8a3d0d2f515196765", - "https://bcr.bazel.build/modules/aspect_rules_lint/1.3.1/MODULE.bazel": "06ce330900a7d6403bc8d88e5dfad6aeeb8ae40179f66bb89e69c8bf6f6b1a0b", - "https://bcr.bazel.build/modules/aspect_rules_lint/1.4.2/MODULE.bazel": "78d025facf6fa675fd6f0b62fd6a9a2bec7ef5ae1e288e5b53f4383b98017105", - "https://bcr.bazel.build/modules/aspect_rules_lint/1.4.4/MODULE.bazel": "24459eeeeb084bc3e7628c338e494746718bc17b3a3cbd94415c8df5c7c6dc37", "https://bcr.bazel.build/modules/aspect_rules_lint/1.5.3/MODULE.bazel": "7fee71b11be63f1cf0458cd8c731712a0e672d0bb6df8879ed70249bf8dfdfdc", "https://bcr.bazel.build/modules/aspect_rules_lint/1.5.3/source.json": "b05f2377bb1239cd92053bb45d5e9fe8570e68d6bc5775099cf6d572312caaf2", - "https://bcr.bazel.build/modules/aspect_rules_py/1.0.0/MODULE.bazel": "8eb29876512d3242af50a424300bec5c5f8957b455963df5f618cb7fd4e8ae19", "https://bcr.bazel.build/modules/aspect_rules_py/1.4.0/MODULE.bazel": "6fd29b93207a31445d5d3ab9d9882fd5511e43c95e8e82e7492872663720fd44", "https://bcr.bazel.build/modules/aspect_rules_py/1.4.0/source.json": "fb1ba946478fb6dbb26d49307d756b0fd2ff88be339af23c39c0397d59143d2c", "https://bcr.bazel.build/modules/aspect_rules_ts/3.6.0/MODULE.bazel": "d0045b5eabb012be550a609589b3e5e47eba682344b19cfd9365d4d896ed07df", @@ -308,14 +303,11 @@ "https://bcr.bazel.build/modules/rules_java/7.3.2/MODULE.bazel": "50dece891cfdf1741ea230d001aa9c14398062f2b7c066470accace78e412bc2", "https://bcr.bazel.build/modules/rules_java/7.4.0/MODULE.bazel": "a592852f8a3dd539e82ee6542013bf2cadfc4c6946be8941e189d224500a8934", "https://bcr.bazel.build/modules/rules_java/7.6.1/MODULE.bazel": "2f14b7e8a1aa2f67ae92bc69d1ec0fa8d9f827c4e17ff5e5f02e91caa3b2d0fe", - "https://bcr.bazel.build/modules/rules_java/8.11.0/MODULE.bazel": "c3d280bc5ff1038dcb3bacb95d3f6b83da8dd27bba57820ec89ea4085da767ad", - "https://bcr.bazel.build/modules/rules_java/8.13.0/MODULE.bazel": "0444ebf737d144cf2bb2ccb368e7f1cce735264285f2a3711785827c1686625e", "https://bcr.bazel.build/modules/rules_java/8.14.0/MODULE.bazel": "717717ed40cc69994596a45aec6ea78135ea434b8402fb91b009b9151dd65615", "https://bcr.bazel.build/modules/rules_java/8.15.1/MODULE.bazel": "5071eebf0fd602ab0617f846e0e0d8f388d66c961513c736e0ac4a1dcde3ff2c", "https://bcr.bazel.build/modules/rules_java/8.15.1/source.json": "e48286d5819767bc5b3d457539ae7f94e28a9b3e55d092d5c47176cb6a2a289b", "https://bcr.bazel.build/modules/rules_java/8.3.2/MODULE.bazel": "7336d5511ad5af0b8615fdc7477535a2e4e723a357b6713af439fe8cf0195017", "https://bcr.bazel.build/modules/rules_java/8.5.1/MODULE.bazel": "d8a9e38cc5228881f7055a6079f6f7821a073df3744d441978e7a43e20226939", - "https://bcr.bazel.build/modules/rules_java/8.6.3/MODULE.bazel": "e90505b7a931d194245ffcfb6ff4ca8ef9d46b4e830d12e64817752e0198e2ed", "https://bcr.bazel.build/modules/rules_jvm_external/4.4.2/MODULE.bazel": "a56b85e418c83eb1839819f0b515c431010160383306d13ec21959ac412d2fe7", "https://bcr.bazel.build/modules/rules_jvm_external/5.1/MODULE.bazel": "33f6f999e03183f7d088c9be518a63467dfd0be94a11d0055fe2d210f89aa909", "https://bcr.bazel.build/modules/rules_jvm_external/5.2/MODULE.bazel": "d9351ba35217ad0de03816ef3ed63f89d411349353077348a45348b096615036", @@ -334,7 +326,6 @@ "https://bcr.bazel.build/modules/rules_multirun/0.9.0/MODULE.bazel": "32d628ef586b5b23f67e55886b7bc38913ea4160420d66ae90521dda2ff37df0", "https://bcr.bazel.build/modules/rules_multirun/0.9.0/source.json": "e882ba77962fa6c5fe68619e5c7d0374ec9a219fb8d03c42eadaf6d0243771bd", "https://bcr.bazel.build/modules/rules_multitool/0.4.0/MODULE.bazel": "15517987d5c00c9e7faab41fbe22ee67a350b6eabcc1e08baded5c6d9025897f", - "https://bcr.bazel.build/modules/rules_multitool/1.2.0/MODULE.bazel": "8d818d6104f4030930291bbbbc5684702c237dbcdee7229097543e6a6035adaa", "https://bcr.bazel.build/modules/rules_multitool/1.9.0/MODULE.bazel": "8a042b0dbf35e4aaa94c28ad69efa75c9e673e9ea4bd5c0fb70bab75ef9c636b", "https://bcr.bazel.build/modules/rules_multitool/1.9.0/source.json": "d9a01604a8b5c4a0e9430824dd34ca5b1b3f5b25277b755e8f3ae91f2c9362a3", "https://bcr.bazel.build/modules/rules_nodejs/5.8.2/MODULE.bazel": "6bc03c8f37f69401b888023bf511cb6ee4781433b0cb56236b2e55a21e3a026a", @@ -373,7 +364,6 @@ "https://bcr.bazel.build/modules/rules_python/1.4.1/source.json": "8ec8c90c70ccacc4de8ca1b97f599e756fb59173e898ee08b733006650057c07", "https://bcr.bazel.build/modules/rules_shell/0.2.0/MODULE.bazel": "fda8a652ab3c7d8fee214de05e7a9916d8b28082234e8d2c0094505c5268ed3c", "https://bcr.bazel.build/modules/rules_shell/0.3.0/MODULE.bazel": "de4402cd12f4cc8fda2354fce179fdb068c0b9ca1ec2d2b17b3e21b24c1a937b", - "https://bcr.bazel.build/modules/rules_shell/0.4.0/MODULE.bazel": "0f8f11bb3cd11755f0b48c1de0bbcf62b4b34421023aa41a2fc74ef68d9584f0", "https://bcr.bazel.build/modules/rules_shell/0.4.1/MODULE.bazel": "00e501db01bbf4e3e1dd1595959092c2fadf2087b2852d3f553b5370f5633592", "https://bcr.bazel.build/modules/rules_shell/0.5.0/MODULE.bazel": "8c8447370594d45539f66858b602b0bb2cb2d3401a4ebb9ad25830c59c0f366d", "https://bcr.bazel.build/modules/rules_shell/0.5.0/source.json": "3038276f07cbbdd1c432d1f80a2767e34143ffbb03cfa043f017e66adbba324c", @@ -444,7 +434,6 @@ "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/aspect_bazel_lib/2.7.7/MODULE.bazel": "not found", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/aspect_bazel_lib/2.8.1/MODULE.bazel": "not found", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/aspect_bazel_lib/2.9.3/MODULE.bazel": "not found", - "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/aspect_bazel_lib/2.9.4/MODULE.bazel": "not found", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/aspect_rules_esbuild/0.21.0/MODULE.bazel": "not found", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/aspect_rules_js/1.33.1/MODULE.bazel": "not found", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/aspect_rules_js/1.40.0/MODULE.bazel": "not found", @@ -452,11 +441,7 @@ "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/aspect_rules_js/2.3.8/MODULE.bazel": "not found", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/aspect_rules_lint/0.12.0/MODULE.bazel": "not found", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/aspect_rules_lint/1.0.3/MODULE.bazel": "not found", - "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/aspect_rules_lint/1.3.1/MODULE.bazel": "not found", - "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/aspect_rules_lint/1.4.2/MODULE.bazel": "not found", - "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/aspect_rules_lint/1.4.4/MODULE.bazel": "not found", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/aspect_rules_lint/1.5.3/MODULE.bazel": "not found", - "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/aspect_rules_py/1.0.0/MODULE.bazel": "not found", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/aspect_rules_py/1.4.0/MODULE.bazel": "not found", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/aspect_rules_ts/3.6.0/MODULE.bazel": "not found", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/aspect_tools_telemetry/0.2.5/MODULE.bazel": "not found", @@ -650,13 +635,10 @@ "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/rules_java/7.3.2/MODULE.bazel": "not found", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/rules_java/7.4.0/MODULE.bazel": "not found", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/rules_java/7.6.1/MODULE.bazel": "not found", - "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/rules_java/8.11.0/MODULE.bazel": "not found", - "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/rules_java/8.13.0/MODULE.bazel": "not found", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/rules_java/8.14.0/MODULE.bazel": "not found", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/rules_java/8.15.1/MODULE.bazel": "not found", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/rules_java/8.3.2/MODULE.bazel": "not found", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/rules_java/8.5.1/MODULE.bazel": "not found", - "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/rules_java/8.6.3/MODULE.bazel": "not found", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/rules_jvm_external/4.4.2/MODULE.bazel": "not found", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/rules_jvm_external/5.1/MODULE.bazel": "not found", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/rules_jvm_external/5.2/MODULE.bazel": "not found", @@ -671,7 +653,6 @@ "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/rules_license/1.0.0/MODULE.bazel": "not found", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/rules_multirun/0.9.0/MODULE.bazel": "not found", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/rules_multitool/0.4.0/MODULE.bazel": "not found", - "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/rules_multitool/1.2.0/MODULE.bazel": "not found", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/rules_multitool/1.9.0/MODULE.bazel": "not found", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/rules_nodejs/5.8.2/MODULE.bazel": "not found", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/rules_nodejs/6.2.0/MODULE.bazel": "not found", @@ -705,7 +686,6 @@ "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/rules_python/1.4.1/MODULE.bazel": "not found", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/rules_shell/0.2.0/MODULE.bazel": "not found", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/rules_shell/0.3.0/MODULE.bazel": "not found", - "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/rules_shell/0.4.0/MODULE.bazel": "not found", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/rules_shell/0.4.1/MODULE.bazel": "not found", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/rules_shell/0.5.0/MODULE.bazel": "not found", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/rules_swift/1.16.0/MODULE.bazel": "not found", @@ -721,50 +701,20 @@ "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_bazel_platforms/0.0.3/MODULE.bazel": "14c96e378c08705a46abe0799d6236fe3095c342c34f83f8d1b3f6046ce00651", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_bazel_platforms/0.0.4/MODULE.bazel": "57dce05e4eb4ac25250d67e47caef99f4cbaedf38083de26aa53979ee6a3ae4b", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_bazel_platforms/0.0.4/source.json": "28caa2c12a50a72ea75494113d0e4bdb559a9324543c930665f5968b87fce134", - "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_cr_checker/0.2.2/MODULE.bazel": "dc36d9c35543db918c3fb5b93a8e684431f56c7c784cf2a1b90f35802a373c98", - "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_cr_checker/0.3.1/MODULE.bazel": "f49e037d7fbc0b2a8b2734fc6b47334e8cc8589ca7a5aa0f3ccca85cc5f79fac", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_crates/0.0.5/MODULE.bazel": "ca3d1ec0f80d134c5459c17043de2613e1a30d3018b1eeb402a5dd381769200d", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_crates/0.0.6/MODULE.bazel": "da72d24b2afb4456377f7ee13d0d95fb6bfc70dbfb949c7b8676618e661edf61", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_crates/0.0.7/MODULE.bazel": "4b08e2124d1627b08a9a5ce86e3693fe6eea302d0aad98c05216d26da3fced89", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_crates/0.0.7/source.json": "60d33c4f55b32a21f79fffbe4f81fef0fd71a24cc8e4cff857a1005eba61e41d", - "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_dash_license_checker/0.1.1/MODULE.bazel": "76681dbd2d45b5c540869a2337174086c56c54953aab1d02cd878b59d31d13a5", - "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_docs_as_code/0.2.4/MODULE.bazel": "ea4801e96c87e2b8650a0fa9e5fed9b8bdbef05c1bc3e30003ba527d5af60a43", - "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_docs_as_code/0.2.6/MODULE.bazel": "1af2963e91c6472555e222f0aba3dc2f5492d04598298209a361978ee3e321e3", - "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_docs_as_code/0.3.3/MODULE.bazel": "95d2b7d44d461c1cf9bd016605f740716fd4ea1303f5f2ed93de3566b90feb1b", - "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_docs_as_code/1.0.0-RC1/MODULE.bazel": "e118b5cbdc453cde83b5ce481107d8e4a713d3458550b9d10445046d4bba2ff3", - "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_docs_as_code/1.0.0/MODULE.bazel": "a3ad204b7412c02a899034d78de62b5549bafba5530a256d1007cb3f4ed20a11", - "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_docs_as_code/1.0.2-CW1/MODULE.bazel": "08d30eba6a1c502096abd65ebb759afb35f988b31e4b72ab5866177703cfec77", - "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_docs_as_code/1.0.2/MODULE.bazel": "259894df09b4aa6bb5152717b03c3c06a3fd4ad583a7119c52f3a2f0d277b857", - "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_docs_as_code/1.2.0/MODULE.bazel": "a2b10950d585e14b09a6266025c0624b42101f72d3c4efe9591716b8713ede47", - "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_docs_as_code/2.0.0/MODULE.bazel": "0c850a488fd50067b28726bfd7330a6970e36b63e67ea06efd5fbbc813e7be5c", - "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_docs_as_code/2.0.2/MODULE.bazel": "eda1324a672604fedee96e29ca3324d585085df54a2e49e30527db410c98ff03", - "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_docs_as_code/2.0.3/MODULE.bazel": "9b945514727190d4c381d8965b972884ba04ce105260ffd2b3c9df51f206ebfe", - "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_docs_as_code/2.2.0/MODULE.bazel": "467d9b7f70f3c4f9ba84b5e9718da0272dcf8e30a737173bf79a48f017927744", - "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_docs_as_code/2.3.0/MODULE.bazel": "e215b29e2a737316af099d2f1372e303641b0720a67a104a286efeb66c92ff14", - "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_docs_as_code/2.3.0/source.json": "3dfe1c6593e9acab12c6d7ca62bbaf9abbfe7d1c4a5e722dd8bc72f2b5e8fa4f", - "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_format_checker/0.1.1/MODULE.bazel": "1acc254faa90e9f97b79ac69af25b6c21c561f8d6079914f6352b9b20d26bd37", - "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_platform/0.1.0/MODULE.bazel": "cc9eae86e76f2a930510ed6e50ec991bb5661687e24881685b39c322087adf6f", - "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_platform/0.1.1/MODULE.bazel": "eb086ba99f9319371fbbd0a9252dfd27b0817039b88bd4d691602974b1ada005", + "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_docs_as_code/2.3.3/MODULE.bazel": "9b89c71a57d47e7f25136879d866bcffc0b95e01d9415ad7a360f19f14050020", + "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_docs_as_code/2.3.3/source.json": "6ffedb6f6fcf9f26b131dc7240aaac782a55d0662468ba76436903de11ccc58d", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_platform/0.5.1/MODULE.bazel": "fbd360b4b83b15a5e1e2f5f4478b880bcc77add4d7cf50846091bf44e54346a3", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_platform/0.5.1/source.json": "96f1eaae09f059fe7727a0e128be72b30e5e5036be9d173bde0a64fbe439c72c", - "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_process/1.0.4/MODULE.bazel": "f74302cb90a7c4878db302276afae82966878099861dcfca3ef43256131dab52", - "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_process/1.0.5/MODULE.bazel": "ed17c232ebd65e9d50fd5c1832f90f95ffe95b2a1113d63a176295a2af64d111", - "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_process/1.1.0/MODULE.bazel": "97dd927309f87ecb73629725683028a5dbb37a49b1159c771292e6993569055b", - "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_process/1.1.1-Beta/MODULE.bazel": "7ab8931f4b2754b728101ed5a2afda458b82b885f5cfdb9d8c4c62b5c1a2da7e", - "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_process/1.1.1/MODULE.bazel": "35c84c7cec7d15678f63145054bb74367afb65929724c2115095d5e1b96fca94", - "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_process/1.2.0/MODULE.bazel": "ec092bf01731a1866352d7b8aaa0e30cae319667abc8cf7a86aec0bdb8555a0e", - "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_process/1.3.1/MODULE.bazel": "29666e38fbc76eddd6676e594f225e474d130dce9c3a9d224e59ae7a499c4575", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_process/1.3.2/MODULE.bazel": "a32390ef217cef9a811408b0a1c5aeed1398c377aa846f5d5416d7b95b4e4366", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_process/1.4.0/MODULE.bazel": "917f4b0357c8c96622699222821b9d9e9f1aa870116dee84105b22c71221d210", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_process/1.4.0/source.json": "55fa012a8b4db59fe2c9696aca9b4ae24d1bab84c28892dce2d9e2faa3eb046e", - "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_python_basics/0.3.0/MODULE.bazel": "785ddd5295213e36c31ab86bdc34f29c0f7d1b72e9abd931bb08f42c0e48e2e9", - "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_python_basics/0.3.1/MODULE.bazel": "99c491109937542e61df090222666a8613ef946fa7bb2b2d5ba648b2baba03ad", - "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_python_basics/0.3.2/MODULE.bazel": "f25490f64035a0e3a0d53ad9cb6164e8325ce6cf2a7ee68c6ae153840cb2497e", - "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_python_basics/0.3.4/MODULE.bazel": "53bd16dfbb1fb8ecf6822fb26f9f4e8333bac7b14d12bb02bf84078063820a31", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_rust_policies/0.0.2/MODULE.bazel": "ade2bad4a331b02d9b7e7d9842e8de8c6fded6186486e02c4f7db5cd4b71d34d", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_rust_policies/0.0.3/MODULE.bazel": "9e8310a75c13ccebc49fb9cbf7acc6c1b75654292b2ca907fb5d513133dbf6f3", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_rust_policies/0.0.3/source.json": "412696b5dd50c86538d96970d2f01a1909a2624e7da41e3597f9b83e0e67e40a", - "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_starpls_lsp/0.1.0/MODULE.bazel": "b2f8c4c8d8e851706255ff9002b448bff6e040b8f0c6adedbde2a09375aa16cc", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_toolchains_rust/0.4.0/MODULE.bazel": "e48f2aca62f92a44a939e1347715e7d767b647fc9f8e664e598c56d1d057ad49", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_toolchains_rust/0.4.0/source.json": "dcaa0e66166906ed54dc4feb28d02dda54be87b7c4018415d0d7b7190f56f5bb", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_tooling/1.0.2/MODULE.bazel": "e70f396375b9d612b4f41ebceff7f18f68ab423b14625c138a354cc01bc62a10", diff --git a/docs/conf.py b/docs/conf.py index cf13475a..504b779f 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -16,6 +16,11 @@ # For the full list of built-in configuration values, see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html +import os +from pathlib import Path + +from docutils import nodes +from docutils.parsers.rst import Directive # -- Project information ----------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information @@ -54,3 +59,46 @@ # Enable numref numfig = True + + +class DisplayTestLogs(Directive): + """Find and display the raw content of all test.log files.""" + + def run(self): + env = self.state.document.settings.env + ws_root = Path(env.app.srcdir).parent + + result_nodes = [] + for dirname in ["bazel-testlogs", "tests-report"]: + candidate = ws_root / dirname + if not candidate.is_dir(): + continue + for root, _, files in sorted(os.walk(candidate)): + if "test.log" in files: + log_path = Path(root) / "test.log" + rel_path = log_path.relative_to(ws_root) + + title = nodes.rubric(text=str(rel_path)) + result_nodes.append(title) + + try: + content = log_path.read_text(encoding="utf-8") + except Exception as e: + content = f"Error reading file: {e}" + + code = nodes.literal_block(content, content) + code["language"] = "text" + code["source"] = str(rel_path) + result_nodes.append(code) + + if not result_nodes: + para = nodes.paragraph( + text="No test.log files found in bazel-testlogs or tests-report." + ) + result_nodes.append(para) + + return result_nodes + + +def setup(app): + app.add_directive("display-test-logs", DisplayTestLogs) diff --git a/docs/index.rst b/docs/index.rst index 6f70b540..3dfd4d99 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -21,6 +21,7 @@ Lifecycle :titlesonly: module/*/index + statistics.rst Overview -------- diff --git a/docs/statistics.rst b/docs/statistics.rst new file mode 100644 index 00000000..e02c0358 --- /dev/null +++ b/docs/statistics.rst @@ -0,0 +1,122 @@ +.. _statistics: + +Component Requirements Statistics +================================= + +Overview +-------- + +.. needpie:: Requirements Status + :labels: not valid, valid but not tested, valid and tested + :colors: red, yellow, green + + type == 'comp_req' and status == 'invalid' + type == 'comp_req' and testlink == '' and (status == 'valid' or status == 'invalid') + type == 'comp_req' and testlink != '' and (status == 'valid' or status == 'invalid') + +In Detail +--------- + +.. grid:: 2 + :class-container: score-grid + + .. grid-item-card:: + + .. needpie:: Requirements marked as Valid + :labels: not valid, valid + :colors: red, orange, green + + type == 'comp_req' and status == 'invalid' + type == 'comp_req' and status == 'valid' + + .. grid-item-card:: + + .. needpie:: Requirements with Codelinks + :labels: no codelink, with codelink + :colors: red, green + + type == 'comp_req' and source_code_link == '' + type == 'comp_req' and source_code_link != '' + + .. grid-item-card:: + + .. needpie:: Test Results + :labels: passed, failed, skipped + :colors: green, red, orange + + type == 'testcase' and result == 'passed' + type == 'testcase' and result == 'failed' + type == 'testcase' and result == 'skipped' + +.. grid:: 2 + + .. grid-item-card:: + + Failed Tests + + *Hint: This table should be empty. Before a PR can be merged all tests have to be successful.* + + .. needtable:: FAILED TESTS + :filter: result == "failed" + :tags: TEST + :columns: name as "testcase";result;fully_verifies;partially_verifies;test_type;derivation_technique;id as "link" + + .. grid-item-card:: + + Skipped / Disabled Tests + + .. needtable:: SKIPPED/DISABLED TESTS + :filter: result != "failed" and result != "passed" + :tags: TEST + :columns: name as "testcase";result;fully_verifies;partially_verifies;test_type;derivation_technique;id as "link" + + + + +All passed Tests +----------------- + +.. needtable:: SUCCESSFUL TESTS + :filter: result == "passed" + :tags: TEST + :columns: name as "testcase";result;fully_verifies;partially_verifies;test_type;derivation_technique;id as "link" + + +Details About Testcases +------------------------ + +.. needpie:: Test Types Used In Testcases + :labels: static-code-analysis, structural-statement-coverage, structural-branch-coverage, walkthrough, inspection, interface-test, requirements-based, resource-usage, control-flow-analysis, data-flow-analysis, fault-injection, struct-func-cov, struct-call-cov + :legend: + + type == 'testcase' and test_type == 'static-code-analysis' + type == 'testcase' and test_type == 'structural-statement-coverage' + type == 'testcase' and test_type == 'structural-branch-coverage' + type == 'testcase' and test_type == 'walkthrough' + type == 'testcase' and test_type == 'inspection' + type == 'testcase' and test_type == 'interface-test' + type == 'testcase' and test_type == 'requirements-based' + type == 'testcase' and test_type == 'resource-usage' + type == 'testcase' and test_type == 'control-flow-analysis' + type == 'testcase' and test_type == 'data-flow-analysis' + type == 'testcase' and test_type == 'fault-injection' + type == 'testcase' and test_type == 'struct-func-cov' + type == 'testcase' and test_type == 'struct-call-cov' + + +.. needpie:: Derivation Techniques Used In Testcases + :labels: requirements-analysis, boundary-values, equivalence-classes, fuzz-testing, error-guessing, explorative-testing + :legend: + + type == 'testcase' and derivation_technique == 'requirements-analysis' + type == 'testcase' and derivation_technique == 'boundary-values' + type == 'testcase' and derivation_technique == 'equivalence-classes' + type == 'testcase' and derivation_technique == 'fuzz-testing' + type == 'testcase' and derivation_technique == 'error-guessing' + type == 'testcase' and derivation_technique == 'explorative-testing' + + +Test Log Files +-------------- + +.. display-test-logs:: diff --git a/src/health_monitoring_lib/cpp/tests/health_monitor_test.cpp b/src/health_monitoring_lib/cpp/tests/health_monitor_test.cpp index 32d76085..83ad1a9d 100644 --- a/src/health_monitoring_lib/cpp/tests/health_monitor_test.cpp +++ b/src/health_monitoring_lib/cpp/tests/health_monitor_test.cpp @@ -21,11 +21,18 @@ using ::testing::_; class HealthMonitorTest : public ::testing::Test { + protected: + void SetUp() override + { + RecordProperty("TestType", "requirements-based"); + RecordProperty("DerivationTechnique", "requirements-analysis"); + } }; // For first review round, only single test case to show up API TEST_F(HealthMonitorTest, TestName) { + RecordProperty("Description", "This test demonstrates the usage of HealthMonitor and DeadlineMonitor APIs. It creates a HealthMonitor with a DeadlineMonitor, retrieves the DeadlineMonitor, and tests starting a deadline."); auto builder_mon = deadline::DeadlineMonitorBuilder() .add_deadline(IdentTag("deadline_1"), TimeRange(std::chrono::milliseconds(100), std::chrono::milliseconds(200))) diff --git a/src/launch_manager_daemon/process_state_client_lib/src/processstateclient_UT.cpp b/src/launch_manager_daemon/process_state_client_lib/src/processstateclient_UT.cpp index 83eba4b1..be62ddfc 100644 --- a/src/launch_manager_daemon/process_state_client_lib/src/processstateclient_UT.cpp +++ b/src/launch_manager_daemon/process_state_client_lib/src/processstateclient_UT.cpp @@ -24,6 +24,8 @@ using score::lcm::ProcessStateReceiver; class ProcessStateClient_UT : public ::testing::Test { protected: void SetUp() override { + RecordProperty("TestType", "requirements-based"); + RecordProperty("DerivationTechnique", "requirements-analysis"); notifier_ = std::make_unique(); receiver_ = notifier_->constructReceiver(); } @@ -37,11 +39,13 @@ class ProcessStateClient_UT : public ::testing::Test { }; TEST_F(ProcessStateClient_UT, ProcessStateClient_ConstructReceiver_Succeeds) { + RecordProperty("Description", "This test verifies that the ProcessStateNotifier can successfully construct a ProcessStateReceiver instance."); ASSERT_NE(notifier_, nullptr); ASSERT_NE(receiver_, nullptr); } TEST_F(ProcessStateClient_UT, ProcessStateClient_QueueOneProcess_Succeeds) { + RecordProperty("Description", "This test verifies that a single PosixProcess can be successfully queued using the ProcessStateNotifier and retrieved using the ProcessStateReceiver."); PosixProcess process1{ .id = score::lcm::IdentifierHash("Process1"), .processStateId = score::lcm::ProcessState::kRunning, @@ -67,6 +71,7 @@ TEST_F(ProcessStateClient_UT, ProcessStateClient_QueueOneProcess_Succeeds) { } TEST_F(ProcessStateClient_UT, ProcessStateClient_QueueMaxNumberOfProcesses_Succeeds) { + RecordProperty("Description", "This test verifies that the ProcessStateNotifier can successfully queue the maximum number of PosixProcess instances defined by the buffer size, and that they can be retrieved using the ProcessStateReceiver."); // Queue maximum number of processes for (size_t i = 0; i < static_cast(BufferConstants::BUFFER_QUEUE_SIZE); ++i) { PosixProcess process{ @@ -93,6 +98,7 @@ TEST_F(ProcessStateClient_UT, ProcessStateClient_QueueMaxNumberOfProcesses_Succe } TEST_F(ProcessStateClient_UT, ProcessStateClient_QueueOneProcessTooMany_Fails) { + RecordProperty("Description", "This test verifies that attempting to queue a PosixProcess when the buffer is already at maximum capacity results in a failure, and that no additional processes can be retrieved from the receiver."); PosixProcess process1{ .id = score::lcm::IdentifierHash("Process1"), .processStateId = score::lcm::ProcessState::kRunning, diff --git a/tests/ut/identifier_hash_UT/identifier_hash_UT.cpp b/tests/ut/identifier_hash_UT/identifier_hash_UT.cpp index c3dbb658..fb668ae5 100644 --- a/tests/ut/identifier_hash_UT/identifier_hash_UT.cpp +++ b/tests/ut/identifier_hash_UT/identifier_hash_UT.cpp @@ -20,8 +20,21 @@ using std::stringstream; using score::lcm::IdentifierHash; -TEST(IdentifierHashTest, IdentifierHash_with_string_view_created) +class IdentifierHashTest : public ::testing::Test { + protected: + void SetUp() override + { + RecordProperty("TestType", "requirements-based"); + RecordProperty("DerivationTechnique", "requirements-analysis"); + } +}; + +TEST_F(IdentifierHashTest, IdentifierHash_with_string_view_created) +{ + RecordProperty("Description", + "This test verifies that an IdentifierHash can be successfully created using a std::string_view, " + "and that its string representation can be retrieved correctly."); std::string_view idStrView = "ProcessGroup1/Startup"; IdentifierHash identifierHash(idStrView); stringstream strStream; @@ -29,8 +42,11 @@ TEST(IdentifierHashTest, IdentifierHash_with_string_view_created) ASSERT_EQ(strStream.str(), idStrView); } -TEST(IdentifierHashTest, IdentifierHash_with_string_created) +TEST_F(IdentifierHashTest, IdentifierHash_with_string_created) { + RecordProperty("Description", + "This test verifies that an IdentifierHash can be successfully created using a std::string, and " + "that its string representation can be retrieved correctly."); std::string idStr = "ProcessGroup1/Startup"; IdentifierHash identifierHash(idStr); stringstream strStream; @@ -38,16 +54,22 @@ TEST(IdentifierHashTest, IdentifierHash_with_string_created) ASSERT_EQ(strStream.str(), idStr); } -TEST(IdentifierHashTest, IdentifierHash_default_created) +TEST_F(IdentifierHashTest, IdentifierHash_default_created) { + RecordProperty("Description", + "This test verifies that a default-constructed IdentifierHash can be created, and that its string " + "representation is empty."); IdentifierHash identifierHash; stringstream strStream; strStream << identifierHash; ASSERT_EQ(strStream.str(), ""); } -TEST(IdentifierHashTest, IdentifierHash_invalid_hash_no_string_representation) +TEST_F(IdentifierHashTest, IdentifierHash_invalid_hash_no_string_representation) { + RecordProperty("Description", + "This test verifies that if an IdentifierHash is created with a string that is not registered in " + "the registry, its string representation indicates that it is unknown and includes the hash value."); std::string idStr = "MainFG"; IdentifierHash identifierHash(idStr); @@ -60,8 +82,12 @@ TEST(IdentifierHashTest, IdentifierHash_invalid_hash_no_string_representation) ASSERT_TRUE(strStream.str().find(std::to_string(identifierHash.data())) != std::string::npos); } -TEST(IdentifierHashTest, IdentifierHash_no_dangling_pointer_after_source_string_dies) +TEST_F(IdentifierHashTest, IdentifierHash_no_dangling_pointer_after_source_string_dies) { + RecordProperty("Description", + "This test verifies that an IdentifierHash created from a std::string does not have a dangling " + "pointer to the original string after it goes out of scope, and that its string representation can " + "still be retrieved correctly."); std::unique_ptr hash_ptr; std::string_view idStrView = "this string will be destroyed";