@@ -191,3 +191,50 @@ set(ERASURE_CODE_HEADERS
191
191
192
192
# Add to main extern headers list
193
193
list (APPEND EXTERN_HEADERS ${ERASURE_CODE_HEADERS} )
194
+
195
+ # Add test applications for erasure_code module
196
+ if (BUILD_TESTS)
197
+ # Check tests (unit tests that are run by CTest)
198
+ set (ERASURE_CODE_CHECK_TESTS
199
+ gf_vect_mul_test
200
+ erasure_code_test
201
+ gf_inverse_test
202
+ erasure_code_update_test
203
+ )
204
+
205
+ # Unit tests (additional unit tests)
206
+ set (ERASURE_CODE_UNIT_TESTS
207
+ gf_vect_mul_base_test
208
+ gf_vect_dot_prod_base_test
209
+ gf_vect_dot_prod_test
210
+ gf_vect_mad_test
211
+ erasure_code_base_test
212
+ )
213
+
214
+ # Other tests
215
+ set (ERASURE_CODE_OTHER_TESTS
216
+ gen_rs_matrix_limits
217
+ )
218
+
219
+ # Create check test executables
220
+ foreach (test ${ERASURE_CODE_CHECK_TESTS} )
221
+ add_executable (${test} erasure_code/${test} .c)
222
+ target_link_libraries (${test} PRIVATE isal)
223
+ target_include_directories (${test} PRIVATE include )
224
+ add_test (NAME ${test} COMMAND ${test} )
225
+ endforeach ()
226
+
227
+ # Create unit test executables
228
+ foreach (test ${ERASURE_CODE_UNIT_TESTS} )
229
+ add_executable (${test} erasure_code/${test} .c)
230
+ target_link_libraries (${test} PRIVATE isal)
231
+ target_include_directories (${test} PRIVATE include )
232
+ endforeach ()
233
+
234
+ # Create other test executables
235
+ foreach (test ${ERASURE_CODE_OTHER_TESTS} )
236
+ add_executable (${test} erasure_code/${test} .c)
237
+ target_link_libraries (${test} PRIVATE isal)
238
+ target_include_directories (${test} PRIVATE include )
239
+ endforeach ()
240
+ endif ()
0 commit comments