@@ -33,8 +33,8 @@ assert(chip_build_tests)
33
33
# ]
34
34
#
35
35
# test_sources = [
36
- # "TestFoo.cpp", # Files are parsed for `CHIP_REGISTER_TEST_SUITE(...)`
37
- # "TestBar.cpp", # and a driver is created automatically
36
+ # "TestFoo.cpp",
37
+ # "TestBar.cpp",
38
38
# ]
39
39
#
40
40
# public_deps = [
@@ -175,100 +175,3 @@ template("chip_test_suite") {
175
175
}
176
176
}
177
177
}
178
-
179
- # TODO [PW_MIGRATION]: remove this once transition away from nlunit-test is completed
180
- template (" chip_test_suite_using_nltest" ) {
181
- _suite_name = target_name
182
-
183
- # Ensures that the common library has sources containing both common
184
- # and individual unit tests.
185
- if (! defined (invoker .sources )) {
186
- invoker .sources = []
187
- }
188
-
189
- if (defined (invoker .test_sources )) {
190
- invoker .sources += invoker .test_sources
191
- }
192
-
193
- if (chip_build_test_static_libraries ) {
194
- _target_type = " static_library"
195
- } else {
196
- _target_type = " source_set"
197
- }
198
- target (_target_type , " ${ _suite_name } .lib" ) {
199
- forward_variables_from (invoker , " *" , [ " tests" ])
200
-
201
- output_dir = " ${ root_out_dir } /lib"
202
-
203
- if (! defined (invoker .public_deps )) {
204
- public_deps = []
205
- }
206
-
207
- if (current_os != " zephyr" && current_os != " mbed" ) {
208
- # Depend on stdio logging, and have it take precedence over the default platform backend
209
- public_deps += [ " ${ chip_root } /src/platform/logging:force_stdio" ]
210
- }
211
- }
212
- if (chip_link_tests ) {
213
- tests = []
214
-
215
- if (defined (invoker .test_sources )) {
216
- foreach (_test , invoker .test_sources ) {
217
- _test_name = string_replace (_test , " .cpp" , " " )
218
-
219
- _driver_name = " ${ root_gen_dir } /${ _test_name } .driver.cpp"
220
-
221
- action (" ${ _test_name } _generate_driver" ) {
222
- script = " ${ chip_root } /scripts/gen_test_driver.py"
223
-
224
- inputs = [ _test ]
225
- outputs = [ _driver_name ]
226
- args = [
227
- " --input_file=" + rebase_path (_test , root_build_dir ),
228
- " --output_file=" + rebase_path (_driver_name , root_build_dir ),
229
- ]
230
- }
231
-
232
- chip_test (_test_name ) {
233
- sources = [ _driver_name ]
234
- public_deps = [
235
- " :${ _suite_name } .lib" ,
236
- " :${ _test_name } _generate_driver" ,
237
- ]
238
- }
239
- tests += [ _test_name ]
240
- }
241
- }
242
-
243
- if (defined (invoker .tests )) {
244
- foreach (_test , invoker .tests ) {
245
- chip_test (_test ) {
246
- sources = [ " ${ _test } Driver.cpp" ]
247
-
248
- public_deps = [ " :${ _suite_name } .lib" ]
249
- }
250
- tests += [ _test ]
251
- }
252
- }
253
-
254
- group (_suite_name ) {
255
- deps = []
256
- foreach (_test , tests ) {
257
- deps += [ " :${ _test } " ]
258
- }
259
- }
260
-
261
- if (chip_pw_run_tests ) {
262
- group (" ${ _suite_name } _run" ) {
263
- deps = []
264
- foreach (_test , tests ) {
265
- deps += [ " :${ _test } .run" ]
266
- }
267
- }
268
- }
269
- } else {
270
- group (_suite_name ) {
271
- deps = [ " :${ _suite_name } .lib" ]
272
- }
273
- }
274
- }
0 commit comments