@@ -160,8 +160,8 @@ TEST(TaskQueueTest, HighConcurrency) {
160160 return TaskFinishedResponse::ContinueExecution;
161161 };
162162
163+ const char *Args[] = {" test" , nullptr };
163164 for (int i = 0 ; i < 50 ; i++) {
164- const char *Args[] = {" test" , nullptr };
165165 TQ.addTask (" /bin/echo" , Args, llvm::ArrayRef<const char *>(), nullptr , false );
166166 }
167167
@@ -193,8 +193,8 @@ TEST(TaskQueueTest, TaskBeganCallback) {
193193 return TaskFinishedResponse::ContinueExecution;
194194 };
195195
196+ const char *Args[] = {" echo" , " test" , nullptr };
196197 for (int i = 0 ; i < 3 ; i++) {
197- const char *Args[] = {" echo" , " test" , nullptr };
198198 TQ.addTask (" /bin/echo" , Args, llvm::ArrayRef<const char *>(), nullptr , false );
199199 }
200200
@@ -230,8 +230,8 @@ TEST(TaskQueueTest, StopExecutionOnFailure) {
230230 return TaskFinishedResponse::ContinueExecution;
231231 };
232232
233+ const char *Args[] = {" test" , nullptr };
233234 for (int i = 0 ; i < 10 ; i++) {
234- const char *Args[] = {" test" , nullptr };
235235 TQ.addTask (" /bin/echo" , Args, llvm::ArrayRef<const char *>(), nullptr , false );
236236 }
237237
0 commit comments