testing: Unify component integration tests structure#199
Conversation
License Check Results🚀 The license check job ran with the Bazel command: bazel run //:license-checkStatus: Click to expand output |
|
The created documentation from the pull request is available at: docu-html |
3e28bc9 to
9b6691f
Compare
There was a problem hiding this comment.
Pull request overview
This PR standardizes the naming and structure of component integration tests across the repository. The main changes include:
- Renaming test directories from language-prefixed names (
rust_test_scenarios,cpp_test_scenarios,python_test_cases) to a unified structure undertests/test_scenarios/{language}andtests/test_cases - Updating all build files, configuration files, and documentation to reference the new paths
- Removing language prefixes from binary and package names for consistency
Reviewed changes
Copilot reviewed 16 out of 41 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/test_scenarios/rust/Cargo.toml | Renamed package from rust_test_scenarios to test_scenarios |
| tests/test_scenarios/rust/BUILD | Updated binary name and visibility path to reflect new directory structure |
| tests/test_scenarios/cpp/src/test_basic.cpp | Updated namespace reference and reformatted braces (Allman style) |
| tests/test_scenarios/cpp/BUILD | Renamed binary from cpp_test_scenarios to test_scenarios |
| tests/test_cases/tests/conftest.py | Updated default target paths to new directory structure |
| tests/test_cases/requirements.txt.orig | Contains unresolved merge conflict markers |
| tests/test_cases/pyproject.toml | Renamed project from python_test_cases to test_cases |
| tests/test_cases/BUILD | Updated all target paths and comments to reference new structure |
| tests/integration_test_scenarios/init_rpi4.build | Updated commented path for QNX rust scenarios |
| tests/integration_test_scenarios/BUILD | Updated commented paths for QNX rust scenarios |
| tests/README.md | Updated all documentation paths and commands to reflect new structure |
| src/cpp/src/BUILD | Updated visibility path for test scenarios |
| MODULE.bazel | Updated requirements lock file path |
| Cargo.toml | Updated workspace member path |
| BUILD | Updated test suite target paths |
| .github/workflows/component_integration_tests.yml | Updated all workflow paths to new structure |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
9b6691f to
7fbf983
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 15 out of 40 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
imho, PYTHONPATH should be added and . removed from import statements in test files
01ef5d7 to
a9130f3
Compare
|
Squashed commits |
There was a problem hiding this comment.
Will similar changes be introduced to other repositories? Or is it per-repo?
There was a problem hiding this comment.
its already on mains in kyron and ref_int
There was a problem hiding this comment.
Should pyproject.toml that's inherently for tests cause formatting changes for a script?
There was a problem hiding this comment.
pyproject.toml is centralized python config file so it will influence any python files. We can exclude scripts directory if we want it to be only for tests.
| bazel_tools = BazelTools(option_prefix="cpp", build_timeout=build_timeout) | ||
| cpp_target_name = session.config.getoption("--cpp-target-name") | ||
| bazel_tools.build(cpp_target_name) | ||
| bazel_tools.build(cpp_target_name, "--config=per-x86_64-linux") |
There was a problem hiding this comment.
Is this a related change? What happened here?
There was a problem hiding this comment.
For some time now building cpp version of kvs needs config to be passed. It has been fixed in CICD executions but in order to make python -m pytest --build-scenarios work this change is needed.
pyproject.toml
Outdated
| "venv", | ||
| ] | ||
|
|
||
| line-length = 120 |
There was a problem hiding this comment.
This change is perfectly fine for me! I'd prefer having such change in a separate PR though, if possible.
There was a problem hiding this comment.
Ok, I can remove all ruff related stuff from pyproject.toml and move it to separate PR. This way I will keep only pytest configs in this PR.
| pytest-metadata | ||
| pytest-env | ||
| testing-utils @ git+https://github.com/eclipse-score/testing_tools.git@v0.3.0 | ||
| testing-utils @ git+https://github.com/eclipse-score/testing_tools.git@675395d4088c8eba708e21d9e5c4efbc75f6a6b0 |
There was a problem hiding this comment.
needed changes are not included in newest release yet
There was a problem hiding this comment.
Why and what are those changes?
There was a problem hiding this comment.
eclipse-score/testing_tools#14
enables passing extra options to bazel build - allows flag --build-scenarios to use necessary config
a9130f3 to
7b54870
Compare
| pytest-metadata | ||
| pytest-env | ||
| testing-utils @ git+https://github.com/eclipse-score/testing_tools.git@v0.3.0 | ||
| testing-utils @ git+https://github.com/eclipse-score/testing_tools.git@675395d4088c8eba708e21d9e5c4efbc75f6a6b0 |
There was a problem hiding this comment.
Why and what are those changes?
There was a problem hiding this comment.
I'm not convinced this file should be part of the repo. Notice that paths are local machine dependent. This file will contribute to a noise on every change.
There was a problem hiding this comment.
The file itself is needed. You can find it e.g. in docs-as-code https://github.com/eclipse-score/docs-as-code/blob/main/src/requirements.txt (they use .in and .txt, we use .txt and .txt.lock)
Local paths are inserted when automatically generating file with bazel command. Let me check if infra team how to make it look cleaner as in docs-as-code
edit: There is no way to generate this file without local paths in comments. The only way is to manually clean it up before committing.
7b54870 to
f357f46
Compare
f357f46 to
eb1d61e
Compare
…unify_cit_structure testing: Unify component integration tests structure
No description provided.