Updated tests to use new function passing system for capture. All full tests now run without fail.

feature/EBB_Regression_Tests
EmbeddedMan 2024-03-30 13:30:18 -05:00
rodzic 6d253323c6
commit 230a99d530
2 zmienionych plików z 15 dodań i 6 usunięć
EBB_firmware/Analysis/firmware tests/scripts

Wyświetl plik

@ -67,8 +67,12 @@ def test_ISR_math_run(test_input_path : str):
if (param[0] != '0'):
test_log.tl_print("test_ISR_math: " + param[2] + ": ", False)
test_dir = os.path.join(output_filepath, param[2])
#capture_command(param[1], test_dir, float(param[3]), param[4])
capture_command(param[1], test_dir, float(param[3]), the_port)
def ebb_command_function():
# Send all the command
query(the_port, param[1] + '\r')
capture_command(ebb_command_function, test_dir, float(param[3]), the_port)
# Now perform the type of analysis appropriate for this test
# In this case, extract the debug UART data

Wyświetl plik

@ -31,6 +31,10 @@ from test_ISR_math import test_ISR_math_run
from test_global_step_counter import test_global_step_counter_run
from test_shortest_move import test_shortest_move_run
if len(sys.argv) == 1:
print("Error: required parameter missing - try 'all'")
sys.exit()
# Start off assuming all will pass. Any that fail will flip this
all_tests_pass = True
@ -38,19 +42,20 @@ all_tests_pass = True
test_log.tl_init()
# Test ISR math
if sys.argv[1] == "" or sys.argv[1] == "test_ISR_math":
if sys.argv[1] == "all" or sys.argv[1] == "test_ISR_math":
test_log.tl_print("Run test: test_ISR_math")
if test_ISR_math_run("..\\test input data\\test_inputs_simple.csv") == False:
#if test_ISR_math_run("..\\test input data\\test_inputs_simple.csv") == False:
if test_ISR_math_run("..\\test input data\\test_inputs.csv") == False:
all_tests_pass = False
# Test global step counter
if sys.argv[1] == "" or sys.argv[1] == "test_global_step_counter":
if sys.argv[1] == "all" or sys.argv[1] == "test_global_step_counter":
test_log.tl_print("Run test: test_global_step_counter")
if test_global_step_counter_run() == False:
all_tests_pass = False
# Test shortest move
if sys.argv[1] == "" or sys.argv[1] == "test_shortest_move":
if sys.argv[1] == "all" or sys.argv[1] == "test_shortest_move":
test_log.tl_print("Run test: test_shortest_move")
if test_shortest_move_run() == False:
all_tests_pass = False