Reorganize Tests and Documentation Structure#93
Merged
Conversation
nradakovic
force-pushed
the
nira_examples_refactor
branch
9 times, most recently
from
July 7, 2026 13:24
6c98b9b to
d0439d6
Compare
Move tests from examples/ to dedicated tests/ directory with comprehensive test suite documentation in docs/test_suite.md. Add platform-aware linkstatic configuration for cross-compilation compatibility.
nradakovic
force-pushed
the
nira_examples_refactor
branch
from
July 7, 2026 13:31
d0439d6 to
b47f769
Compare
8 tasks
nradakovic
marked this pull request as ready for review
July 7, 2026 13:38
nradakovic
requested review from
AlexanderLanin,
antonkri and
dcalavrezo-qorix
as code owners
July 7, 2026 13:38
antonkri
approved these changes
Jul 7, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR restructures the repository’s toolchain validation approach by moving the former examples/-based tests into a dedicated standalone tests/ Bazel workspace, consolidating test documentation, and updating CI workflows to run the new test suites.
Changes:
- Introduces a standalone
tests/workspace (MODULE/.bazelrc/BUILD) with organized test suites underfeature_verification/andlanguage_and_standards/. - Adds centralized test documentation in
docs/test_suite.mdand simplifies README entry points. - Updates GitHub Actions workflows to run builds/tests from
./testswith the new suite targets and configs.
Reviewed changes
Copilot reviewed 45 out of 48 changed files in this pull request and generated 48 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/README.md | Adds a top-level quick reference for the new tests workspace. |
| tests/MODULE.bazel.lock | Updates the tests workspace module lockfile. |
| tests/MODULE.bazel | Defines the standalone tests workspace module and toolchain setup. |
| tests/.bazelversion | Pins Bazel version for the tests workspace. |
| tests/.bazelrc | Renames/defines host & target configs for the tests workspace (e.g. x86_64-linux, aarch64-qnx). |
| tests/BUILD | Adds root test_suite aggregations for feature and language test groups. |
| tests/feature_verification/BUILD | Declares feature-verification libraries/tests and platform-aware linkstatic. |
| tests/feature_verification/README.md | Adds feature-verification quick reference (needs command updates to match new configs/labels). |
| tests/feature_verification/feature_test.h | Adds shared header for feature tests (defines/include-path related). |
| tests/feature_verification/feature_test.cpp | Implements shared helpers for feature tests. |
| tests/feature_verification/defines_test.cpp | Adds define/flag validation test. |
| tests/feature_verification/include_paths_test.cpp | Adds include-path handling validation test. |
| tests/feature_verification/warnings_test.cpp | Adds warnings configuration validation test. |
| tests/feature_verification/coverage_test.cpp | Adds coverage instrumentation validation test (includes a user-facing hint string). |
| tests/feature_verification/pic_test.cpp | Adds PIC behavior validation test driver. |
| tests/feature_verification/pic_test_lib.h | Adds PIC test library API surface. |
| tests/feature_verification/pic_test_lib.cpp | Implements PIC test library. |
| tests/feature_verification/pthread_test.cpp | Adds pthread validation test driver. |
| tests/feature_verification/pthread_test_lib.h | Adds pthread test library API surface. |
| tests/feature_verification/pthread_test_lib.cpp | Implements pthread test library. |
| tests/feature_verification/multifile_test.cpp | Adds multi-object static library + link validation test driver. |
| tests/feature_verification/multifile_lib.h | Declares types/utilities for the multifile static library test. |
| tests/feature_verification/multifile_lib_matrix.cpp | Implements matrix portion of multifile library. |
| tests/feature_verification/multifile_lib_vector.cpp | Implements vector portion of multifile library. |
| tests/feature_verification/multifile_lib_geometry.cpp | Implements geometry portion of multifile library. |
| tests/feature_verification/whole_archive_test.cpp | Adds whole-archive linking validation test driver. |
| tests/feature_verification/whole_archive_lib.h | Declares whole-archive library functions. |
| tests/feature_verification/whole_archive_lib.cpp | Implements whole-archive library functions. |
| tests/language_and_standards/BUILD | Declares C/C++ standard conformance compilation tests. |
| tests/language_and_standards/README.md | Adds language/standards quick reference (needs command updates to match new configs/labels). |
| tests/language_and_standards/c_lang_test.c | Adds C language support test. |
| tests/language_and_standards/cpp11_test.cpp | Adds C++11 feature test (needs a missing include). |
| tests/language_and_standards/cpp14_test.cpp | Adds C++14 feature test (needs a missing include). |
| tests/language_and_standards/cpp17_test.cpp | Adds C++17 feature test (needs missing includes). |
| tests/language_and_standards/cpp20_test.cpp | Adds C++20 feature test (needs missing includes). |
| docs/test_suite.md | Adds consolidated test-suite documentation (needs command updates to match new configs/labels). |
| README.md | Updates top-level docs references to point to the test suite documentation. |
| examples/README.md | Updates examples documentation to point to the new tests workspace (needs command updates). |
| examples/BUILD | Removes prior example test targets, leaving examples as a placeholder for future sample apps. |
| examples/test.sh | Removes the old example-based test runner script. |
| examples/asan_test.cpp | Removes old sanitizer test from examples workspace. |
| examples/tsan_test.cpp | Removes old sanitizer test from examples workspace. |
| examples/math_lib.h | Removes old example math library header. |
| examples/main_pthread.cpp | Removes old pthread example binary source. |
| .github/workflows/x86_64-linux.yml | Updates CI to run from ./tests and execute the new root test suites. |
| .github/workflows/aarch64-linux.yml | Updates CI to build the new root test suites from ./tests. |
| .github/workflows/aarch64-ebclfsa.yml | Updates CI to build the new root test suites from ./tests under the ebclfsa config. |
| .github/workflows/autosd.yml | Updates CI to build the new root test suites from ./tests under the autosd config. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+17
to
+20
| #include <iostream> | ||
| #include <cassert> | ||
| #include <memory> | ||
| #include <vector> |
Comment on lines
+17
to
+21
| #include <iostream> | ||
| #include <cassert> | ||
| #include <optional> | ||
| #include <variant> | ||
| #include <string_view> |
Comment on lines
+17
to
+22
| #include <iostream> | ||
| #include <cassert> | ||
| #include <span> | ||
| #include <concepts> | ||
| #include <ranges> | ||
| #include <vector> |
Comment on lines
+17
to
+20
| #include <iostream> | ||
| #include <memory> | ||
| #include <cassert> | ||
| #include <vector> |
Comment on lines
+33
to
+36
| cc_test( | ||
| name = "c_lang_test", | ||
| srcs = ["c_lang_test.c"], | ||
| ) |
|
|
||
| ```bash | ||
| # Solution: Get detailed timeout information | ||
| bazel test --config host_config_1 --test_verbose_timeout_warnings //tests/... |
|
|
||
| ```bash | ||
| # Solution: Run with full output for debugging | ||
| bazel test --config host_config_1 --test_output=all //tests/language_and_standards:cpp20_test |
|
|
||
| ```bash | ||
| # Full validation (native + cross-compilation builds) | ||
| bazel test --config host_config_1 //tests/language_and_standards/... |
| ```bash | ||
| # Full validation (native + cross-compilation builds) | ||
| bazel test --config host_config_1 //tests/language_and_standards/... | ||
| bazel build --config target_config_1 //tests/feature_verification/... |
| bazel build --config target_config_1 //tests/feature_verification/... | ||
|
|
||
| # Generate test reports | ||
| bazel test --config host_config_1 --test_summary=detailed //tests/... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
BREAKING CHANGE: Tests have been moved from examples/ to tests/ directory
Test Reorganization:
(defines, include paths, coverage, warnings, PIC, pthread, multifile, whole-archive)
(C99, C++11, C++14, C++17, C++20)
Documentation Consolidation:
Cross-Compilation Fixes:
proper PIC testing on supported platforms
CI/CD Updates:
Update all GitHub Actions workflows to reference new test paths
(aarch64-ebclfsa.yml, aarch64-linux.yml, autosd.yml, x86_64-linux.yml)
resolves Reorganize Test Suite and Consolidate Documentation #94