Index: suite_leahi/tst_headerbar_information_popup/test.py =================================================================== diff -u -r2eb99d3d5db7c53fca759d79b73a096682c5c3e5 -r57c9777c3d6cf91c6a3bb03a4d3f65098997e4fc --- suite_leahi/tst_headerbar_information_popup/test.py (.../test.py) (revision 2eb99d3d5db7c53fca759d79b73a096682c5c3e5) +++ suite_leahi/tst_headerbar_information_popup/test.py (.../test.py) (revision 57c9777c3d6cf91c6a3bb03a4d3f65098997e4fc) @@ -12,6 +12,7 @@ # 7 Set and Compare Information Parameters at their values Below the Minimum Allowed import names +import subprocess from configuration import config from leahi_dialin.ui.td_messaging import TD_Messaging from leahi_dialin.ui import utils @@ -60,6 +61,22 @@ return None +def get_aut_version(aut_path): + """ + Executes the AUT with the --version argument and captures the output. + """ + command = [aut_path, "--version"] + # Running the command and capturing the output. + result = subprocess.run( + command, + capture_output=True, + text=True, + ) + aut_name_and_version = result.stdout.strip() + aut_version = aut_name_and_version.split(" ") + aut_version_only = aut_version[1] + return aut_version_only + def verify_td_and_dd_versions( td_major, td_minor, @@ -127,10 +144,12 @@ compatibility_rev = dd_compatibility_rev ) dd_simulator.dd_serial(dd_serial) + + ui_version = get_aut_version(config.AUT_PATH) version_details = { "OS Version" : "123.123.123.20230628230011", - "UI Version" : "staging-09241954-0", + "UI Version" : ui_version, "TD Version" : None, "TD FPGA Version" : None, "TD Serial Number": None,