Skip to content

test: Improve code coverage of mlia#13

Merged
oluwatamilore-arm merged 5 commits into
mainfrom
feat-coverage
Dec 8, 2025
Merged

test: Improve code coverage of mlia#13
oluwatamilore-arm merged 5 commits into
mainfrom
feat-coverage

Conversation

@oluwatamilore-arm
Copy link
Copy Markdown
Contributor

Improve the code coverage of:

  • mlia/backend/manager.py
  • mlia/nn/tensorflow
  • mlia/target/registry.py
  • mlia/utils

Other than top level code handling imports and entry points code coverage is at 100%.
Add a feature to use a custom tag suffix to the versioning if desired.

oluwatamilore-arm and others added 5 commits December 8, 2025 11:46
Resolves: MLIA-1416

Change-Id: I88e894987a0c2d2e786d59c76a31db0c99290317
Reviewed-on: https://eu-gerrit-2.euhpc.arm.com/c/ml/ecosystem/mlia/+/1146142
Tested-by: expkit <svc_expkit@arm.com>
Reviewed-by: Wojciech Boncela <wojciech.boncela@arm.com>
Reviewed-by: Isabella Gottardi <isabella.gottardi@arm.com>
IP-review: Isabella Gottardi <isabella.gottardi@arm.com>
Signed-off-by: Oluwatamilore Adebayo <oluwatamilore.adebayo@arm.com>
Reviewed-on: https://eu-gerrit-2.euhpc.arm.com/c/ml/ecosystem/mlia/+/1156960
Resolves: MLIA-1428

tflite_compat.py:25:
A line of top level code about handling imports

tflite_convert.py:167:
A __name__ == '__main__' entry point

tflite_metrics.py:199:
A branch that is only reached if an unaccounted for value of
ReportClusterMode is given, of which there are none

Change-Id: Ie399e0b69e93afcd5af30d15630eb2f6ff64b70f
Reviewed-on: https://eu-gerrit-2.euhpc.arm.com/c/ml/ecosystem/mlia/+/1154593
Tested-by: expkit <svc_expkit@arm.com>
Reviewed-by: Wojciech Boncela <wojciech.boncela@arm.com>
IP-review: Isabella Gottardi <isabella.gottardi@arm.com>
Signed-off-by: Oluwatamilore Adebayo <oluwatamilore.adebayo@arm.com>
Reviewed-on: https://eu-gerrit-2.euhpc.arm.com/c/ml/ecosystem/mlia/+/1156967
Resolves: MLIA-1434
Change-Id: Ia3bfbcd270f6b90940334afd0f120eaa32219319
Reviewed-on: https://eu-gerrit-2.euhpc.arm.com/c/ml/ecosystem/mlia/+/1149054
Tested-by: expkit <svc_expkit@arm.com>
Reviewed-by: Mike Kelly <mike.kelly@arm.com>
IP-review: Mike Kelly <mike.kelly@arm.com>
Signed-off-by: Oluwatamilore Adebayo <oluwatamilore.adebayo@arm.com>
Reviewed-on: https://eu-gerrit-2.euhpc.arm.com/c/ml/ecosystem/mlia/+/1156986
Reviewed-by: Wojciech Boncela <wojciech.boncela@arm.com>
IP-review: Isabella Gottardi <isabella.gottardi@arm.com>
Resolves: MLIA-1436
Change-Id: Ic2f235b565d1a7e9d71b8d4af5d3be976baf8803
Reviewed-on: https://eu-gerrit-2.euhpc.arm.com/c/ml/ecosystem/mlia/+/1147935
Reviewed-by: Isabella Gottardi <isabella.gottardi@arm.com>
Tested-by: expkit <svc_expkit@arm.com>
Reviewed-by: Mike Kelly <mike.kelly@arm.com>
IP-review: Mike Kelly <mike.kelly@arm.com>
Signed-off-by: Oluwatamilore Adebayo <oluwatamilore.adebayo@arm.com>
Reviewed-on: https://eu-gerrit-2.euhpc.arm.com/c/ml/ecosystem/mlia/+/1157335
Reviewed-by: Wojciech Boncela <wojciech.boncela@arm.com>
IP-review: Isabella Gottardi <isabella.gottardi@arm.com>
Signed-off-by: Maksims Svecovs <maksims.svecovs@arm.com>
Change-Id: If931c24edf36007ccee3239e075b16386ea51837
Reviewed-on: https://eu-gerrit-2.euhpc.arm.com/c/ml/ecosystem/mlia/+/1149092
Reviewed-by: Isabella Gottardi <isabella.gottardi@arm.com>
IP-review: Isabella Gottardi <isabella.gottardi@arm.com>
Reviewed-on: https://eu-gerrit-2.euhpc.arm.com/c/ml/ecosystem/mlia/+/1158300
Tested-by: expkit <svc_expkit@arm.com>
@oluwatamilore-arm oluwatamilore-arm merged commit 66391c5 into main Dec 8, 2025
@oluwatamilore-arm oluwatamilore-arm deleted the feat-coverage branch December 8, 2025 15:32
IsabellaARM pushed a commit that referenced this pull request May 19, 2026
* test: Migrate to shared pytest-native e2e framework

Pull the generic MLIA end-to-end test framework out of mlia-ethos-u and integrate it into the core mlia repo.

This replaces the older bespoke tests_e2e harness with a reusable pytest-native helper under src/mlia/testing/e2e.py and moves repo-facing e2e coverage into normal tests/ modules.

- add src/mlia/testing/e2e.py with shared MLIA e2e helpers
- add src/mlia/testing/__init__.py exports and README documentation
- add tests/test_e2e.py as the thin repo-facing e2e suite
- add tests/test_e2e_helpers.py for focused helper coverage
- remove the legacy tests_e2e/ harness

The new framework is driven by environment variables instead of a custom config-file runner:

- MLIA_E2E_EXECUTIONS describes concrete CLI execution blocks in JSON
- MLIA_E2E_ARTIFACTS points at the prepared artifact tree
- MLIA_E2E_BACKENDS lists globally installed backends to prepare once
- MLIA_E2E_SHARD_INDEX and MLIA_E2E_SHARD_COUNT support test sharding

Each parametrized case now represents exactly one MLIA CLI invocation. Cases are expanded at collection time, staged into a temporary workdir, and executed independently.

* fix: Make e2e helper validation lazy and secure artifact staging

* fix: Format import test file

* fix: Ruff ruff!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants