88import pytest
99from proto .import_all_protos import *
1010
11-
1211from software .simulated_tests import validation
1312from software .simulated_tests .tbots_test_runner import TbotsTestRunner
1413from software .thunderscope .thunderscope import Thunderscope
@@ -107,13 +106,12 @@ def runner(
107106 :param test_timeout_s: The timeout for the test, if any eventually_validations
108107 remain after the timeout, the test fails.
109108 :param tick_duration_s: The simulation step duration
110- :param ci_cmd_with_delay: A list consisting of a duration, and a
111- tuple forming a ci command
112- {
113- (time, command, team),
114- (time, command, team),
115- ...
116- }
109+ :param ci_cmd_with_delay: A list consisting of tuples with a duration and CI command, e.g.
110+ [
111+ (time, command, team),
112+ (time, command, team),
113+ ...
114+ ]
117115 :param run_till_end: If true, test runs till the end even if eventually validation passes
118116 If false, test stops once eventually validation passes and fails if time out
119117 """
@@ -130,7 +128,7 @@ def runner(
130128 # If delay matches time
131129 if delay <= time_elapsed_s :
132130 # send command
133- self .gamecontroller .send_ci_input ( cmd , team )
131+ self .gamecontroller .send_gc_command ( gc_command = cmd , team = team )
134132 # remove command from the list
135133 ci_cmd_with_delay .remove ((delay , cmd , team ))
136134
@@ -233,6 +231,7 @@ def run_test(
233231 test_timeout_s = 3 ,
234232 tick_duration_s = 0.0166 ,
235233 index = 0 ,
234+ ci_cmd_with_delay = [],
236235 run_till_end = True ,
237236 ** kwargs ,
238237 ):
@@ -244,6 +243,12 @@ def run_test(
244243 :param tick_duration_s: length of a tick
245244 :param index: index of the current test. default is 0 (invariant test)
246245 values can be passed in during aggregate testing for different timeout durations
246+ :param ci_cmd_with_delay: A list consisting of tuples with a duration and CI command, e.g.
247+ [
248+ (time, command, team),
249+ (time, command, team),
250+ ...
251+ ]
247252 :param run_till_end: If true, test runs till the end even if eventually validation passes
248253 If false, test stops once eventually validation passes and fails if time out
249254 """
@@ -271,7 +276,7 @@ def run_test(
271276 eventually_validation_sequence_set ,
272277 test_timeout_duration ,
273278 tick_duration_s ,
274- [] ,
279+ ci_cmd_with_delay ,
275280 run_till_end ,
276281 ],
277282 )
@@ -289,6 +294,7 @@ def run_test(
289294 eventually_validation_sequence_set ,
290295 test_timeout_duration ,
291296 tick_duration_s ,
297+ ci_cmd_with_delay = ci_cmd_with_delay ,
292298 run_till_end = run_till_end ,
293299 )
294300
0 commit comments