Skip to content

Consolidate tests under a common directory - #31

Merged
AlexanderLanin merged 2 commits into
eclipse-score:mainfrom
etas-contrib:refactor/test-directory-layout
Oct 8, 2026
Merged

AlexanderLanin merged 2 commits into
eclipse-score:mainfrom
etas-contrib:refactor/test-directory-layout

Conversation

@AlexanderLanin

@AlexanderLanin AlexanderLanin commented Oct 8, 2026 •

Copy link
Copy Markdown
Member

Consolidate the repository’s tests under tests/ so their location and purpose are clear instead of being spread across implementation code, repository tools and a separate integration directory.

  • Group unit tests by component under tests/unit/{score_coverage,starlark,tools} and keep Starlark fixtures together.
  • Place the complete pipeline test, controlled consumer workspace and expected LCOV data under tests/end_to_end/. Keep coverage workflow checks against real consumer projects under tests/compatibility/.
  • Update imports, Bazel labels, local module overrides, workflow names, CI artifact/JUnit paths and documentation for the new layout. Set the self-coverage instrumentation filter explicitly so moving the tests preserves coverage measurement of the implementation.

The existing test suites and runners are retained.

@github-actions

github-actions Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

License Check Results

🚀 The license check job ran with the Bazel command:

bazel run //:license-check

Status: ⚠️ Needs Review

Click to expand output
[License Check Output]
Extracting Bazel installation...
Starting local Bazel server (8.6.0) and connecting to it...
INFO: Invocation ID: 533a74e0-db98-45b9-bec8-85fbe145d1d2
Computing main repo mapping: 
Computing main repo mapping: 
Computing main repo mapping: 
Loading: 
Loading: 0 packages loaded
Loading: 0 packages loaded
Analyzing: target //:license-check (1 packages loaded, 0 targets configured)
Analyzing: target //:license-check (1 packages loaded, 0 targets configured)

Analyzing: target //:license-check (5 packages loaded, 6 targets configured)

Analyzing: target //:license-check (5 packages loaded, 6 targets configured)

Analyzing: target //:license-check (5 packages loaded, 6 targets configured)

Analyzing: target //:license-check (5 packages loaded, 6 targets configured)

Analyzing: target //:license-check (5 packages loaded, 6 targets configured)

Analyzing: target //:license-check (5 packages loaded, 6 targets configured)

Analyzing: target //:license-check (77 packages loaded, 10 targets configured)

Analyzing: target //:license-check (143 packages loaded, 620 targets configured)

Analyzing: target //:license-check (151 packages loaded, 3291 targets configured)

Analyzing: target //:license-check (151 packages loaded, 3291 targets configured)

Analyzing: target //:license-check (151 packages loaded, 3291 targets configured)

Analyzing: target //:license-check (162 packages loaded, 7972 targets configured)

Analyzing: target //:license-check (166 packages loaded, 9815 targets configured)

Analyzing: target //:license-check (173 packages loaded, 9866 targets configured)

Analyzing: target //:license-check (177 packages loaded, 11874 targets configured)

INFO: Analyzed target //:license-check (179 packages loaded, 12118 targets configured).
[5 / 14] checking cached actions
[14 / 16] JavaToolchainCompileBootClasspath external/rules_java+/toolchains/platformclasspath.jar; 0s disk-cache, processwrapper-sandbox
[15 / 16] Building tools/license.check.license_check.jar (); 0s disk-cache, multiplex-worker
INFO: Found 1 target...
Target //tools:license.check.license_check up-to-date:
  bazel-bin/tools/license.check.license_check
  bazel-bin/tools/license.check.license_check.jar
INFO: Elapsed time: 28.146s, Critical Path: 2.12s
INFO: 16 processes: 12 internal, 3 processwrapper-sandbox, 1 worker.
INFO: Build completed successfully, 16 total actions
INFO: Running command line: bazel-bin/tools/license.check.license_check tools/formatted.txt <args omitted>
usage: org.eclipse.dash.licenses.cli.Main [-batch <int>] [-cd <url>]
       [-confidence <int>] [-ef <url>] [-excludeSources <sources>] [-help] [-lic
       <url>] [-project <shortname>] [-repo <url>] [-review] [-summary <file>]
       [-timeout <seconds>] [-token <token>]

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The verification inventory reports 17 Starlark tests while its Cases column still records 16.

1 open finding
What changed in this PR

Consolidates unit, integration, and downstream tests under tests/, updating supporting Bazel, CI, coverage, and documentation paths.

Changes:

  • Moves unit tests and fixtures into tests/unit/.
  • Moves consumer integration and downstream workflow tests into dedicated directories.
  • Updates Bazel labels, coverage filters, CI artifacts, imports, and documentation.
File Description
tools/​self_coverage_gate.py Updates coverage target and scope handling.
tools/​linters.bzl Includes tests in lint guidance.
tools/​BUILD Exposes the coverage gate as a library.
tests/​unit/​tools/​self_coverage_gate_test.py Relocates gate unit tests.
tests/​unit/​tools/​BUILD Defines the relocated gate test.
tests/​unit/​starlark/​fixtures/​vendor/​include/​vendored/​api.h Relocates vendored-header fixture.
tests/​unit/​starlark/​fixtures/​user.cpp Relocates C++ fixture.
tests/​unit/​starlark/​fixtures/​target_root.cpp Relocates target fixture.
tests/​unit/​starlark/​fixtures/​target_only.cpp Relocates target-only fixture.
tests/​unit/​starlark/​fixtures/​platform_dep.h Relocates platform fixture header.
tests/​unit/​starlark/​fixtures/​only.h Relocates uncompiled fixture header.
tests/​unit/​starlark/​fixtures/​mid.h Relocates intermediate header fixture.
tests/​unit/​starlark/​fixtures/​mid.cpp Relocates intermediate source fixture.
tests/​unit/​starlark/​fixtures/​main.rs Relocates Rust binary fixture.
tests/​unit/​starlark/​fixtures/​lib.rs Relocates Rust library fixture.
tests/​unit/​starlark/​fixtures/​leaf.h Relocates leaf header fixture.
tests/​unit/​starlark/​fixtures/​leaf.cpp Relocates leaf source fixture.
tests/​unit/​starlark/​fixtures/​host_root.cpp Relocates host-root fixture.
tests/​unit/​starlark/​fixtures/​host_only.cpp Relocates host-only fixture.
tests/​unit/​starlark/​fixtures/​forward.bzl Relocates forwarding-rule fixture.
tests/​unit/​starlark/​fixtures/​external_dependency/​MODULE.bazel Defines the relocated external fixture module.
tests/​unit/​starlark/​fixtures/​external_dependency/​include/​ext/​ext.h Relocates external header fixture.
tests/​unit/​starlark/​fixtures/​external_dependency/​BUILD Defines the external fixture target.
tests/​unit/​starlark/​fixtures/​BUILD Updates fixture visibility.
tests/​unit/​starlark/​coverage_scope_tests.bzl Updates fixture and package labels.
tests/​unit/​starlark/​BUILD Defines the relocated analysis suite.
tests/​unit/​score_coverage/​traceability.py Relocates requirement traceability support.
tests/​unit/​score_coverage/​reporter_test.py Updates traceability import.
tests/​unit/​score_coverage/​merger_test.py Updates traceability import.
tests/​unit/​score_coverage/​justify_test.py Updates traceability import.
tests/​unit/​score_coverage/​generate_coverage_html_test.py Updates traceability import.
tests/​unit/​score_coverage/​gcov_reporter_test.py Updates traceability import.
tests/​unit/​score_coverage/​effective_coverage_test.py Updates traceability import.
tests/​unit/​score_coverage/​coverage_summary_test.py Updates traceability import.
tests/​unit/​score_coverage/​BUILD Updates Python import root.
tests/​integration/​run_integration_test.sh Runs against the relocated consumer workspace.
tests/​integration/​expected/​expected_lcov.dat Relocates LLVM expected coverage data.
tests/​integration/​expected/​expected_lcov_gcov.dat Relocates gcov expected coverage data.
tests/​integration/​consumer/​tools/​coverage/​coverage_justifications.yaml Relocates integration justifications.
tests/​integration/​consumer/​tools/​coverage/​BUILD Relocates coverage scope/report targets.
tests/​integration/​consumer/​third_party/​forward.bzl Relocates forwarding rule.
tests/​integration/​consumer/​third_party/​BUILD Relocates third-party fixtures.
tests/​integration/​consumer/​src/​vendored/​include/​vendored/​inline_math.h Relocates vendored source fixture.
tests/​integration/​consumer/​src/​unused_api.h Relocates no-data fixture.
tests/​integration/​consumer/​src/​uncovered.h Relocates uncovered API fixture.
tests/​integration/​consumer/​src/​uncovered.cpp Relocates uncovered source fixture.
tests/​integration/​consumer/​src/​target_root.cpp Relocates target-root fixture.
tests/​integration/​consumer/​src/​platform_target.cpp Relocates target-platform fixture.
tests/​integration/​consumer/​src/​platform_host.cpp Relocates host-platform fixture.
tests/​integration/​consumer/​src/​platform_dep.h Relocates platform API fixture.
tests/​integration/​consumer/​src/​host_root.cpp Relocates host-root fixture.
tests/​integration/​consumer/​src/​empty_unit.cpp Relocates empty translation-unit fixture.
tests/​integration/​consumer/​src/​coverable.h Relocates covered API fixture.
tests/​integration/​consumer/​src/​coverable.cpp Relocates covered source fixture.
tests/​integration/​consumer/​src/​coverable_test.cpp Relocates integration test executable.
tests/​integration/​consumer/​src/​BUILD Relocates C++ integration targets.
tests/​integration/​consumer/​rust/​main.rs Relocates untested Rust fixture.
tests/​integration/​consumer/​rust/​lib.rs Relocates tested Rust fixture.
tests/​integration/​consumer/​rust/​BUILD Relocates Rust integration targets.
tests/​integration/​consumer/​platforms/​BUILD Relocates fixture platform definitions.
tests/​integration/​consumer/​MODULE.bazel Updates the local module override.
tests/​integration/​consumer/​lib/​test/​cross_pkg_test.cpp Relocates cross-package test fixture.
tests/​integration/​consumer/​lib/​test/​BUILD Relocates cross-package test target.
tests/​integration/​consumer/​lib/​cross_pkg.h Relocates cross-package API fixture.
tests/​integration/​consumer/​lib/​cross_pkg.cpp Relocates cross-package source fixture.
tests/​integration/​consumer/​lib/​BUILD Relocates cross-package library target.
tests/​integration/​consumer/​external_lib/​MODULE.bazel Relocates external integration module.
tests/​integration/​consumer/​external_lib/​include/​vext/​vext.h Relocates vendored external header.
tests/​integration/​consumer/​external_lib/​include/​extlib/​extlib.h Relocates external library header.
tests/​integration/​consumer/​external_lib/​extlib.cpp Relocates external library source.
tests/​integration/​consumer/​external_lib/​BUILD Relocates external library targets.
tests/​integration/​consumer/​BUILD Exports the nested module file.
tests/​integration/​consumer/​.bazelversion Relocates the consumer Bazel version.
tests/​integration/​consumer/​.bazelrc Relocates consumer coverage configuration.
tests/​downstream/​test_lifecycle.py Relocates lifecycle workflow test.
tests/​downstream/​test_baselibs.py Relocates baselibs workflow test.
tests/​downstream/​BUILD Defines relocated downstream tests.
tests/​downstream/​_consumer_workspace.py Relocates downstream workspace utilities.
README.md Documents the consolidated layout.
pyproject.toml Updates lint exclusions and first-party imports.
MODULE.bazel Updates the external fixture override.
docs/​verification/​verification_report.rst Updates test inventory paths and counts.
docs/​manual/​user_manual.rst Updates consumer example paths.
docs/​BUILD Updates JUnit source paths.
.gitignore Updates integration output paths.
.github/​workflows/​tests.yml Updates unit, integration, and artifact paths.
.github/​workflows/​downstream_tests.yml Updates downstream targets and artifacts.
.bazelrc Adds explicit self-coverage instrumentation scope.
.bazelignore Updates nested workspace exclusions.

🧠 Review effort: Balanced


Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.

Comment thread docs/verification/verification_report.rst Outdated
@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

Documentation preview for this pull request is available at:
pr-31: https://eclipse-score.github.io/coverage_tool/pr-31/

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The relocation and build wiring are consistent; only a minor misplaced fixture comment remains.

0 open findings

1 resolved since last review

🧠 Review effort: Balanced


Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.

@MaximilianSoerenPollak MaximilianSoerenPollak left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For me this seems like a good start to start cleaning up here and consolidating the structure so we can build ontop of it.

@AlexanderLanin

Copy link
Copy Markdown
Member Author

merging, so I can continue with other PRs

@AlexanderLanin
AlexanderLanin merged commit 6a04595 into eclipse-score:main Oct 8, 2026
10 checks passed
@AlexanderLanin
AlexanderLanin deleted the refactor/test-directory-layout branch October 8, 2026 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

3 participants