made markers argument in ParseArguments a boolean instead of an int

This commit is contained in:
2025-08-05 11:49:53 +02:00
parent d83e9385ed
commit 595bf38605
2 changed files with 4 additions and 4 deletions

View File

@@ -73,7 +73,7 @@ def startCmdTestsForAll(args, fp):
if __name__ == '__main__': if __name__ == '__main__':
args = ParseArguments(description='Automated tests with the virtual detector servers', default_num_mods=1, markers=1, general_tests_option=True) args = ParseArguments(description='Automated tests with the virtual detector servers', default_num_mods=1, markers=True, general_tests_option=True)
if args.num_mods > 1: if args.num_mods > 1:
raise RuntimeException(f'Cannot support multiple modules at the moment (except Eiger).') raise RuntimeException(f'Cannot support multiple modules at the moment (except Eiger).')

View File

@@ -255,7 +255,7 @@ def loadBasicSettings(name, d, fp):
except Exception as e: except Exception as e:
raise RuntimeException(f'Could not load config for {name}. Error: {str(e)}') from e raise RuntimeException(f'Could not load config for {name}. Error: {str(e)}') from e
def ParseArguments(description, default_num_mods=1, markers=0, general_tests_option=False): def ParseArguments(description, default_num_mods=1, markers=False, general_tests_option=False):
parser = argparse.ArgumentParser(description) parser = argparse.ArgumentParser(description)
parser.add_argument('rx_hostname', nargs='?', default='localhost', parser.add_argument('rx_hostname', nargs='?', default='localhost',
@@ -268,7 +268,7 @@ def ParseArguments(description, default_num_mods=1, markers=0, general_tests_opt
help='Number of frames to test with') help='Number of frames to test with')
parser.add_argument('-s', '--servers', nargs='*', parser.add_argument('-s', '--servers', nargs='*',
help='Detector servers to run') help='Detector servers to run')
if markers == 1: if markers:
parser.add_argument('-m', '--markers', nargs='?', default ='[.cmdcall]', parser.add_argument('-m', '--markers', nargs='?', default ='[.cmdcall]',
help = 'Markers to use for cmd tests, default: [.cmdcall]') help = 'Markers to use for cmd tests, default: [.cmdcall]')
@@ -298,7 +298,7 @@ def ParseArguments(description, default_num_mods=1, markers=0, general_tests_opt
f"num_mods: '{args.num_mods}'\n" f"num_mods: '{args.num_mods}'\n"
f"num_frames: '{args.num_frames}'" f"num_frames: '{args.num_frames}'"
) )
if markers == 1: if markers:
msg += f"\nmarkers: '{args.markers}'" msg += f"\nmarkers: '{args.markers}'"
if general_tests_option: if general_tests_option: