You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: test/README.md
+64Lines changed: 64 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -97,3 +97,67 @@ IMG_MGR ECC P256 Test completed successfully!
97
97
IMG_MGR AES128 CMAC Test completed successfully!
98
98
IMG_MGR RSA2048 Test completed successfully!
99
99
```
100
+
101
+
## Code Coverage
102
+
103
+
The test suite supports code coverage analysis using gcovr. To generate coverage reports:
104
+
105
+
**Note**: The coverage directory must exist before generating reports. The `make coverage` target creates this automatically, but if running gcovr manually, create it first with:
106
+
```bash
107
+
mkdir -p ../coverage
108
+
```
109
+
110
+
### Running Coverage
111
+
112
+
Use the convenient coverage target:
113
+
```bash
114
+
make coverage
115
+
```
116
+
117
+
This will:
118
+
1. Clean previous build artifacts
119
+
2. Rebuild with coverage instrumentation enabled
120
+
3. Run the test suite
121
+
4. Generate an HTML coverage report
122
+
123
+
The coverage report will be generated at `../coverage/index.html`.
124
+
125
+
### Manual Coverage Workflow
126
+
127
+
Alternatively, you can run coverage manually:
128
+
129
+
```bash
130
+
# Build with coverage enabled
131
+
make clean
132
+
make COVERAGE=1 DEBUG=1
133
+
134
+
# Run tests
135
+
make run
136
+
137
+
# Create coverage directory and generate report (from repository root)
0 commit comments