Skip to content

Commit 4f4793c

Browse files
authored
Fix FIT execution (#192)
* fix FIT after migration * switch config file ini -> toml * enable ci * add markers * update removed req
1 parent 5b82931 commit 4f4793c

6 files changed

Lines changed: 26 additions & 30 deletions

File tree

.github/workflows/test_and_docs.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,9 @@ jobs:
6868
- name: Execute Unit Tests with Coverage Analysis
6969
run: |
7070
python ./scripts/quality_runners.py
71+
- name: Execute Feature Integration Tests
72+
run: |
73+
bazel test //feature_integration_tests/test_cases:fit
7174
- name: Publish build summary
7275
if: always()
7376
run: |

bazel_common/score_python.MODULE.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ python.toolchain(
2222
python_version = PYTHON_VERSION,
2323
)
2424

25-
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip", dev_dependency = True)
25+
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
2626
pip.parse(
2727
hub_name = "pip_score_venv_test",
2828
python_version = PYTHON_VERSION,

feature_integration_tests/test_cases/BUILD

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# *******************************************************************************
1313
load("@pip_score_venv_test//:requirements.bzl", "all_requirements")
1414
load("@rules_python//python:pip.bzl", "compile_pip_requirements")
15-
load("@score_tooling//python_basics:defs.bzl", "score_py_pytest", "score_virtualenv")
15+
load("@score_tooling//python_basics:defs.bzl", "score_py_pytest")
1616

1717
# In order to update the requirements, change the `requirements.txt` file and run:
1818
# `bazel run //feature_integration_tests/python_test_cases:requirements.update`.
@@ -31,31 +31,24 @@ compile_pip_requirements(
3131
],
3232
)
3333

34-
score_virtualenv(
35-
name = "python_tc_venv",
36-
reqs = all_requirements,
37-
venv_name = ".python_tc_venv",
38-
)
39-
4034
# Tests targets
4135
score_py_pytest(
4236
name = "fit",
4337
srcs = glob(["tests/**/*.py"]) + [
44-
"conftest.py",
45-
"fit_scenario.py",
46-
"test_properties.py",
4738
],
4839
args = [
4940
"--traces=all",
5041
"--rust-target-path=$(rootpath //feature_integration_tests/test_scenarios/rust:rust_test_scenarios)",
5142
],
5243
data = [
53-
":python_tc_venv",
44+
"conftest.py",
45+
"fit_scenario.py",
46+
"test_properties.py",
5447
"//feature_integration_tests/test_scenarios/rust:rust_test_scenarios",
5548
],
5649
env = {
5750
"RUST_BACKTRACE": "1",
5851
},
59-
pytest_config = ":pytest.ini",
52+
pytest_config = "//:pyproject.toml",
6053
deps = all_requirements,
6154
)

feature_integration_tests/test_cases/pytest.ini

Lines changed: 0 additions & 15 deletions
This file was deleted.

feature_integration_tests/test_cases/tests/basic/test_orchestration_with_persistency.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323

2424
@add_test_properties(
25-
partially_verifies=["feat_req__persistency__persistency"],
25+
partially_verifies=["feat_req__persistency__store_data"],
2626
test_type="requirements-based",
2727
derivation_technique="requirements-analysis",
2828
)

pyproject.toml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,24 @@
11
[tool.pytest]
2+
addopts = ["-v"]
23
pythonpath = [
34
".",
45
"scripts/tooling",
6+
"feature_integration_tests/test_cases"
7+
]
8+
testpaths = [
9+
"scripts/tooling/tests",
10+
"feature_integration_tests/test_cases/tests"
11+
]
12+
junit_log_passing_tests = true
13+
junit_family = "xunit1"
14+
markers = [
15+
"metadata",
16+
"test_properties(dict): Add custom properties to test XML output",
17+
]
18+
filterwarnings = [
19+
'ignore:record_property is incompatible with junit_family:pytest.PytestWarning',
20+
'ignore:record_xml_attribute is an experimental feature:pytest.PytestExperimentalApiWarning',
521
]
6-
testpaths = ["scripts/tooling/tests"]
722

823
[tool.ruff]
924
# Exclude a variety of commonly ignored directories.

0 commit comments

Comments
 (0)