@@ -39,7 +39,6 @@ assert(chip_build_tests)
39
39
#
40
40
# public_deps = [
41
41
# "${chip_root}/src/lib/foo", # add dependencies here
42
- # "${nlunit_test_root}:nlunit-test",
43
42
# ]
44
43
# }
45
44
#
@@ -57,7 +56,6 @@ assert(chip_build_tests)
57
56
#
58
57
# public_deps = [
59
58
# "${chip_root}/src/lib/foo", # add dependencies here
60
- # "${nlunit_test_root}:nlunit-test",
61
59
# ]
62
60
#
63
61
# tests = [
@@ -94,6 +92,8 @@ template("chip_test_suite") {
94
92
public_deps = []
95
93
}
96
94
95
+ deps = [ dir_pw_unit_test ]
96
+
97
97
if (current_os != " zephyr" && current_os != " mbed" ) {
98
98
# Depend on stdio logging, and have it take precedence over the default platform backend
99
99
public_deps += [ " ${ chip_root } /src/platform/logging:force_stdio" ]
@@ -106,6 +106,11 @@ template("chip_test_suite") {
106
106
foreach (_test , invoker .test_sources ) {
107
107
_test_name = string_replace (_test , " .cpp" , " " )
108
108
109
+ _test_output_dir = " ${ root_out_dir } /tests"
110
+ if (defined (invoker .output_dir )) {
111
+ _test_output_dir = invoker .output_dir
112
+ }
113
+
109
114
pw_test (_test_name ) {
110
115
forward_variables_from (invoker ,
111
116
[
@@ -116,13 +121,19 @@ template("chip_test_suite") {
116
121
])
117
122
public_deps += [ " :${ _suite_name } .lib" ]
118
123
sources = [ _test ]
124
+ output_dir = _test_output_dir
119
125
}
120
126
tests += [ _test_name ]
121
127
}
122
128
}
123
129
124
130
if (defined (invoker .tests )) {
125
131
foreach (_test , invoker .tests ) {
132
+ _test_output_dir = " ${ root_out_dir } /tests"
133
+ if (defined (invoker .output_dir )) {
134
+ _test_output_dir = invoker .output_dir
135
+ }
136
+
126
137
pw_test (_test ) {
127
138
forward_variables_from (invoker ,
128
139
[
@@ -137,6 +148,7 @@ template("chip_test_suite") {
137
148
" ${ _test } .cpp" ,
138
149
" ${ _test } Driver.cpp" ,
139
150
]
151
+ output_dir = _test_output_dir
140
152
}
141
153
tests += [ _test ]
142
154
}
@@ -164,7 +176,7 @@ template("chip_test_suite") {
164
176
}
165
177
}
166
178
167
- # TODO: remove this once transition away from nlunit-test is completed
179
+ # TODO [PW_MIGRATION] : remove this once transition away from nlunit-test is completed
168
180
template (" chip_test_suite_using_nltest" ) {
169
181
_suite_name = target_name
170
182
0 commit comments