Skip to content

Reorganize Tests and Documentation Structure#93

Merged
nradakovic merged 1 commit into
mainfrom
nira_examples_refactor
Jul 7, 2026
Merged

Reorganize Tests and Documentation Structure#93
nradakovic merged 1 commit into
mainfrom
nira_examples_refactor

Conversation

@nradakovic

@nradakovic nradakovic commented Jul 7, 2026

Copy link
Copy Markdown
Member

BREAKING CHANGE: Tests have been moved from examples/ to tests/ directory

Test Reorganization:

  • Move all tests from examples/ to dedicated tests/ directory
  • Split tests into two categories:
    • tests/feature_verification/ - 8 tests validating toolchain features
      (defines, include paths, coverage, warnings, PIC, pthread, multifile, whole-archive)
    • tests/language_and_standards/ - 5 tests validating language support
      (C99, C++11, C++14, C++17, C++20)
  • Create comprehensive BUILD files for both test categories
  • Add test_suite grouping for batch execution

Documentation Consolidation:

  • Create docs/test_suite.md (395 lines) with comprehensive test documentation
    • Detailed descriptions of all 13 tests
    • Feature coverage matrix (34/43 features implemented)
    • Running instructions for different platforms
    • Cross-compilation guidance with manual tags
    • Troubleshooting guide
    • Guidelines for adding new tests
  • Simplify individual test READMEs with quick references pointing to docs/test_suite.md
  • Update root README.md to reference test_suite.md documentation
  • Update examples/README.md to indicate tests have moved and point to docs

Cross-Compilation Fixes:

  • Add platform-aware linkstatic configuration using select() statements
    • linkstatic = True only for aarch64-linux-sdk_0.1.0-ebclfsa
    • linkstatic = False (default) for other platforms
    • Prevents shared library linking issues on ebclfsa while preserving
      proper PIC testing on supported platforms

CI/CD Updates:

@nradakovic nradakovic self-assigned this Jul 7, 2026
@nradakovic nradakovic added wip Work in progress example Add or update examples p3 Medium/Low - handle it within normal process deprecated cleanup Remove deprecated targets labels Jul 7, 2026
@nradakovic
nradakovic force-pushed the nira_examples_refactor branch 9 times, most recently from 6c98b9b to d0439d6 Compare July 7, 2026 13:24
@nradakovic nradakovic changed the title Refactor examples Reorganize Tests and Documentation Structure Jul 7, 2026
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
nradakovic force-pushed the nira_examples_refactor branch from d0439d6 to b47f769 Compare July 7, 2026 13:31
@nradakovic nradakovic linked an issue Jul 7, 2026 that may be closed by this pull request
8 tasks
@nradakovic
nradakovic marked this pull request as ready for review July 7, 2026 13:38
Copilot AI review requested due to automatic review settings July 7, 2026 13:38
@nradakovic
nradakovic merged commit 55a4995 into main Jul 7, 2026
12 checks passed
@nradakovic
nradakovic deleted the nira_examples_refactor branch July 7, 2026 13:47
@github-project-automation github-project-automation Bot moved this from In Progress to Done in INF - Infrastructure Community Jul 7, 2026

Copilot AI 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.

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 under feature_verification/ and language_and_standards/.
  • Adds centralized test documentation in docs/test_suite.md and simplifies README entry points.
  • Updates GitHub Actions workflows to run builds/tests from ./tests with 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"],
)
Comment thread docs/test_suite.md

```bash
# Solution: Get detailed timeout information
bazel test --config host_config_1 --test_verbose_timeout_warnings //tests/...
Comment thread docs/test_suite.md

```bash
# Solution: Run with full output for debugging
bazel test --config host_config_1 --test_output=all //tests/language_and_standards:cpp20_test
Comment thread docs/test_suite.md

```bash
# Full validation (native + cross-compilation builds)
bazel test --config host_config_1 //tests/language_and_standards/...
Comment thread docs/test_suite.md
```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/...
Comment thread docs/test_suite.md
bazel build --config target_config_1 //tests/feature_verification/...

# Generate test reports
bazel test --config host_config_1 --test_summary=detailed //tests/...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

deprecated cleanup Remove deprecated targets example Add or update examples p3 Medium/Low - handle it within normal process wip Work in progress

Projects

Development

Successfully merging this pull request may close these issues.

Reorganize Test Suite and Consolidate Documentation

3 participants