Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build_and_test_on_every_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,4 @@ jobs:
done < ci/showcase_targets_run.txt
- name: Feature Integration Tests
run: |
bazel test --config bl-x86_64-linux //feature_integration_tests/python_test_cases:fit
bazel test --config bl-x86_64-linux //feature_integration_tests/test_cases:fit
2 changes: 1 addition & 1 deletion MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip", dev_depen
pip.parse(
hub_name = "pip_score_venv_test",
python_version = PYTHON_VERSION,
requirements_lock = "//feature_integration_tests/python_test_cases:requirements.txt.lock",
requirements_lock = "//feature_integration_tests/test_cases:requirements.txt.lock",
)

use_repo(pip, "pip_score_venv_test")
Expand Down
19 changes: 10 additions & 9 deletions feature_integration_tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,16 @@ This directory contains Feature Integration Tests for the S-CORE project. It inc

## Structure

- `python_test_cases/` — Python-based integration test cases
- `test_cases/` — Python-based integration test cases
- `conftest.py` — Pytest configuration and fixtures
- `fit_scenario.py` — Base scenario class
- `requirements.txt` — Python dependencies
- `BUILD` — Bazel build and test definitions
- `tests/` — Test cases (e.g., orchestration with persistency)
- `rust_test_scenarios/` — Rust-based integration test scenarios
- `src/` — Rust source code for test scenarios
- `BUILD` — Bazel build definitions
- `test_scenarios/` — Location of test scenarios
- `rust/` — Rust-based integration test scenarios
- `src/` — Rust source code for test scenarios
- `BUILD` — Bazel build definitions

## Running Tests

Expand All @@ -21,25 +22,25 @@ This directory contains Feature Integration Tests for the S-CORE project. It inc
Python tests are managed with Bazel and Pytest. To run the main test target:

```sh
bazel test //feature_integration_tests/python_test_cases:fit
bazel test //feature_integration_tests/test_cases:fit
```

### Rust Test Scenarios

Rust test scenarios are defined in `rust_test_scenarios/src/scenarios`. Build and run them using Bazel:
Rust test scenarios are defined in `test_scenarios/rust/src/scenarios`. Build and run them using Bazel:

```sh
bazel build //feature_integration_tests/rust_test_scenarios
bazel build //feature_integration_tests/test_scenarios/rust:rust_test_scenarios
```

```sh
bazel run //feature_integration_tests/rust_test_scenarios -- --list-scenarios
bazel run //feature_integration_tests/test_scenarios/rust:rust_test_scenarios -- --list-scenarios
```

## Updating Python Requirements

To update Python dependencies:

```sh
bazel run //feature_integration_tests/python_test_cases:requirements.update
bazel run //feature_integration_tests/test_cases:requirements.update
```
9 changes: 0 additions & 9 deletions feature_integration_tests/python_test_cases/pytest.ini

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ score_py_pytest(
srcs = glob(["tests/**/*.py"]) + ["conftest.py", "fit_scenario.py", "test_properties.py"],
args = [
"--traces=all",
"--rust-target-path=$(rootpath //feature_integration_tests/rust_test_scenarios)",
"--rust-target-path=$(rootpath //feature_integration_tests/test_scenarios/rust:rust_test_scenarios)",
],
data = [
":python_tc_venv",
"//feature_integration_tests/rust_test_scenarios",
"//feature_integration_tests/test_scenarios/rust:rust_test_scenarios",
],
env = {
"RUST_BACKTRACE": "1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,20 +64,3 @@ def pytest_sessionstart(session):

except Exception as e:
pytest.exit(str(e), returncode=1)


def pytest_collection_modifyitems(items: list[pytest.Function]):
markers_to_process = (
"PartiallyVerifies",
"FullyVerifies",
"Description",
"TestType",
"DerivationTechnique",
)
for item in items:
# Add custom markers info to XML report
for marker in item.iter_markers():
if marker.name not in markers_to_process:
continue

item.user_properties.append((marker.name, marker.args[0]))
3 changes: 3 additions & 0 deletions feature_integration_tests/test_cases/pytest.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[pytest]
addopts = -v
testpaths = tests
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ load("@rules_rust//rust:defs.bzl", "rust_binary")
rust_binary(
name = "rust_test_scenarios",
srcs = glob(["src/**/*.rs"]),
visibility = ["//feature_integration_tests/python_test_cases:__pkg__"],
visibility = ["//feature_integration_tests/test_cases:__pkg__"],
tags = [
"manual",
],
Expand All @@ -31,4 +31,4 @@ rust_binary(
"@score_crates//:serde",
"@score_crates//:serde_json",
],
)
)
3 changes: 1 addition & 2 deletions feature_showcase/rust/orchestration_persistency/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,10 @@ fn detect_object_component_design() -> Result<Design, CommonErrors> {

fn main() {
// Setup any logging framework you want to use.
let logger = LogAndTraceBuilder::new()
let _logger = LogAndTraceBuilder::new()
.global_log_level(logging_tracing::Level::INFO)
.enable_logging(true)
.build();
// logger.init_log_trace();

// Create runtime
let (builder, _engine_id) = kyron::runtime::RuntimeBuilder::new().with_engine(
Expand Down
Loading