feat(tests): Unify e2e test runner and enable parallel ISO 15118 execution#1940
feat(tests): Unify e2e test runner and enable parallel ISO 15118 execution#1940
Conversation
|
EVerest/everest-ci#150 will allow container to execute |
b797f9d to
a181f64
Compare
mlitre
left a comment
There was a problem hiding this comment.
Except for the small nits it looks good
| # CTRL+C at the sudo prompt cancels it and falls back to sequential execution. | ||
| if "$SETUP_SCRIPT" setup "$WORKERS" 2>/dev/null; then | ||
| ISOLATION_FLAG="--network-isolation" | ||
| elif sudo "$SETUP_SCRIPT" setup "$WORKERS"; then |
There was a problem hiding this comment.
We could probably set the -n or else it might hang here right?
There was a problem hiding this comment.
Its actually intentional for local developer use. The CI uses the non-sudo path that runs first. Its a bit fragile, which is why I added the comment above.
| if not self._active: | ||
| return | ||
|
|
||
| stripped_count = 0 |
There was a problem hiding this comment.
Do you need this, you don't do anything with it
There was a problem hiding this comment.
Good catch, removed it
tests/ocpp_tests/conftest.py
Outdated
| except ValueError: | ||
| pass |
There was a problem hiding this comment.
Maybe we should log something here or else we never know if there was an error
tests/core_tests/smoke_tests.py
Outdated
| "gcp": [Requirement("grid_connection_point", "external_limits")], | ||
| } | ||
| ) | ||
| @pytest.mark.xdist_group(name="ISO15118") |
There was a problem hiding this comment.
Why is this needed here? Isn't this basic charging
tests/core_tests/smoke_tests.py
Outdated
| "gcp": [Requirement("grid_connection_point", "external_limits")], | ||
| } | ||
| ) | ||
| @pytest.mark.xdist_group(name="ISO15118") |
a181f64 to
32131b2
Compare
0424d03 to
1ff0188
Compare
mlitre
left a comment
There was a problem hiding this comment.
The OCPP test most likely fails in the CI due to the strict timing so either we can put it in a serial run or relax the timing
| from everest.testing.core_utils import EverestConfigAdjustmentStrategy | ||
|
|
||
| # Module types that use the `device` config field for ISO 15118 communication | ||
| ISO15118_MODULE_TYPES = frozenset({"EvseV2G", "Evse15118D20", "PyEvJosev"}) |
There was a problem hiding this comment.
@Pietfried I think your missing the network isolation for the IsoMux module, so if you just do the following it should fix your issue.
| ISO15118_MODULE_TYPES = frozenset({"EvseV2G", "Evse15118D20", "PyEvJosev"}) | |
| ISO15118_MODULE_TYPES = frozenset({"EvseV2G", "Evse15118D20", "IsoMux", "PyEvJosev"}) |
There was a problem hiding this comment.
I thought so too, but its unfortunately not that easy. IsoMux connects to the -2 and -20 modules via lo on ::1 so the tests would conflict. To address this we need to make the proxy device IsoMux connects to not hardcoded but configurable. @SebaLukas fyi
@mlitre @andistorm I am putting this back to draft and will potentially add a PR for IsoMux which can then be incorporated in this PR.
…ution
Replace per-suite shell scripts with a single tests/run-tests.sh entry
point covering all test suites (core, framework, async, ocpp). CI
workflows are updated to invoke run-tests.sh directly.
ISO 15118 tests are grouped via xdist_group("ISO15118") to prevent
conflicts when running without network isolation. When veth pairs are
available (created by the new setup-network-isolation.sh),
the NetworkIsolationPlugin strips the group markers and assigns
each xdist worker a dedicated interface, enabling fully parallel
execution. The NetworkIsolationStrategy auto-injects the assigned
interface into EVerest configs for ISO 15118 modules.
pytest configuration is consolidated into tests/pytest.ini, which is
always selected via --config-file so that both the unified runner and
direct pytest invocations use the same rootdir and option definitions.
Signed-off-by: Piet Gömpel <pietgoempel@gmail.com>
Co-authored-by: Piet Gömpel <37657534+Pietfried@users.noreply.github.com>
Signed-off-by: Piet Gömpel <37657534+Pietfried@users.noreply.github.com>
Signed-off-by: Piet Gömpel <pietgoempel@gmail.com>
Signed-off-by: Piet Gömpel <pietgoempel@gmail.com>
1ff0188 to
59d5d0b
Compare
Describe your changes
Replace per-suite shell scripts with a single tests/run-tests.sh entry point covering all test suites (core, framework, async, ocpp). CI workflows are updated to invoke the new run-tests.sh directly.
ISO 15118 tests are grouped via xdist_group("ISO15118") to prevent conflicts when running without network isolation. When veth pairs are available (created by the new setup-network-isolation.sh), the NetworkIsolationPlugin strips the group markers and assigns each xdist worker a dedicated interface, enabling fully parallel execution. The NetworkIsolationStrategy auto-injects the assigned interface into EVerest configs for ISO 15118 modules.
pytest configuration is consolidated into tests/pytest.ini, which is always selected via --config-file so that both the unified runner and direct pytest invocations use the same rootdir and option definitions.
Issue ticket number and link
Checklist before requesting a review