fixed imagesize ctb issue (out values not transferred, setting any dbit values was not recalculatign image size in generaldata)

This commit is contained in:
2025-08-04 12:12:30 +02:00
parent 6389692c16
commit 956103bbd4
9 changed files with 280 additions and 181 deletions

View File

@@ -73,7 +73,7 @@ def startCmdTestsForAll(args, fp):
if __name__ == '__main__':
args = ParseArguments('Automated tests with the virtual detector servers', 1, 1)
args = ParseArguments(description='Automated tests with the virtual detector servers', default_num_mods=1, markers=1, general_tests_option=True)
if args.num_mods > 1:
raise RuntimeException(f'Cannot support multiple modules at the moment (except Eiger).')
@@ -81,7 +81,8 @@ if __name__ == '__main__':
with open(MAIN_LOG_FNAME, 'w') as fp:
try:
startGeneralTests(fp)
if args.general_tests:
startGeneralTests(fp)
startCmdTestsForAll(args, fp)
cleanup(fp)
except Exception as e:

View File

@@ -252,7 +252,7 @@ def loadBasicSettings(name, d, fp):
except Exception as e:
raise RuntimeException(f'Could not load config for {name}. Error: {str(e)}') from e
def ParseArguments(description, default_num_mods=1, markers=0):
def ParseArguments(description, default_num_mods=1, markers=0, general_tests_option=False):
parser = argparse.ArgumentParser(description)
parser.add_argument('rx_hostname', nargs='?', default='localhost',
@@ -269,6 +269,10 @@ def ParseArguments(description, default_num_mods=1, markers=0):
parser.add_argument('-m', '--markers', nargs='?', default ='[.cmdcall]',
help = 'Markers to use for cmd tests, default: [.cmdcall]')
if general_tests_option:
parser.add_argument('-g', '--general_tests', action='store_true',
help = 'Enable general tests (no value needed)')
args = parser.parse_args()
# Set default server list if not provided
@@ -293,6 +297,10 @@ def ParseArguments(description, default_num_mods=1, markers=0):
)
if markers == 1:
msg += f"\nmarkers: '{args.markers}'"
if general_tests_option:
msg += f"\ngeneral_tests: '{args.general_tests}'"
Log(LogLevel.INFO, msg)