File tree Expand file tree Collapse file tree 2 files changed +30
-0
lines changed Expand file tree Collapse file tree 2 files changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -122,6 +122,28 @@ The you can run the tests with
122
122
pytest -c /dev/null -v -n auto backends/arm/test --arm_quantize_io --arm_run_corstoneFVP
123
123
```
124
124
125
+ ### Code coverage
126
+
127
+ To get code coverage:
128
+
129
+ ```
130
+ coverage run --source=<SRC> --rcfile=backends/arm/test/.coveragerc -m pytest \
131
+ --config-file=/dev/null backends/arm/test/
132
+ ```
133
+
134
+ All files in ` SRC ` and its child directories will be analysed for code coverage,
135
+ unless explicitly exluded in the .coveragerc file. If using venv this might be
136
+ under ` env/lib/python<VERSION_NUMBER>/site-packages/executorch/ ` . To get the
137
+ absolute path, run:
138
+
139
+ ```
140
+ python -c "import executorch; print(executorch.__path__)"
141
+ ```
142
+
143
+ This contains a list of paths where the source directory is located. Pick the
144
+ one that is located in ` env/lib ` . If that does not work try the others. Add
145
+ ` backends/arm ` to the path in ` --source ` to only get code coverage for the Arm
146
+ backend.
125
147
126
148
### A note on unit tests
127
149
Original file line number Diff line number Diff line change
1
+ [run]
2
+ omit =
3
+ *__init__.py*
4
+
5
+ [report]
6
+ skip_covered = true
7
+ exclude_also =
8
+ raise NotImplementedError
You can’t perform that action at this time.
0 commit comments