check_dependencies: allow passing any module name to skip
Change-Id: I53a384d54f32d766f70bd7e0bfbd9702939c8aa8
This commit is contained in:
parent
5b9c7b922a
commit
407756968c
|
@ -12,20 +12,22 @@ import pprint
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
feature_module_map = {
|
feature_module_map = {
|
||||||
'powersupply_intellinet' : ['powersupply_intellinet'],
|
'2g': ['bsc_osmo', 'bts_nanobts', 'bts_oc2g', 'bts_octphy', 'bts_osmo', 'bts_osmotrx', 'bts_osmovirtual', 'bts_sysmo', 'bts', 'bts', 'esme', 'ggsn_osmo', 'hlr_osmo', 'mgcpgw_osmo', 'mgw_osmo', 'ms_ofono', 'ms_driver', 'msc_osmo', 'nitb_osmo', 'osmo_ctrl', 'osmocon', 'pcap_recorder', 'pcu_oc2g', 'pcu_osmo', 'pcu_sysmo', 'pcu', 'sgsn_osmo', 'sms', 'smsc', 'stp_osmo'],
|
||||||
'powersupply_sispm' : ['powersupply_sispm'],
|
'4g': [],
|
||||||
'rfemu_amarisoftctrl': ['rfemu_amarisoftctrl'],
|
'srs': ['enb_srs', 'epc_srs', 'ms_srs'],
|
||||||
'rfemu_minicircuits': ['rfemu_minicircuits'],
|
'powersupply': ['powersupply', 'powersupply_intellinet', 'powersupply_sispm'],
|
||||||
|
'rfemu': ['rfemu', 'rfemu_amarisoftctrl', 'rfemu_minicircuits'],
|
||||||
}
|
}
|
||||||
|
|
||||||
def skip_features_to_skip_modules(skip_features):
|
def skip_features_to_skip_modules(skip_features):
|
||||||
skip_obj_modules = []
|
skip_obj_modules = []
|
||||||
|
|
||||||
for skip_feature in skip_features:
|
for skip_feature in skip_features:
|
||||||
if skip_feature not in feature_module_map:
|
if skip_feature in feature_module_map:
|
||||||
raise Exception('feature %s doesn\'t exist!' % skip_feature)
|
|
||||||
for skip_module in feature_module_map[skip_feature]:
|
for skip_module in feature_module_map[skip_feature]:
|
||||||
skip_obj_modules.append(skip_module)
|
skip_obj_modules.append(skip_module)
|
||||||
|
else:
|
||||||
|
skip_obj_modules.append(skip_feature)
|
||||||
return skip_obj_modules
|
return skip_obj_modules
|
||||||
|
|
||||||
def import_runtime_dependencies():
|
def import_runtime_dependencies():
|
||||||
|
@ -98,7 +100,7 @@ def print_deb_packages(modules):
|
||||||
print("\t" + mname.ljust(20) + " [" + err.rstrip() +"]")
|
print("\t" + mname.ljust(20) + " [" + err.rstrip() +"]")
|
||||||
|
|
||||||
parser = argparse.ArgumentParser(epilog=__doc__, formatter_class=argparse.RawTextHelpFormatter)
|
parser = argparse.ArgumentParser(epilog=__doc__, formatter_class=argparse.RawTextHelpFormatter)
|
||||||
parser.add_argument('-s', '--skip-feature', dest='skip_features', choices=feature_module_map.keys(), action='append',
|
parser.add_argument('-s', '--skip-feature', dest='skip_features', action='append',
|
||||||
help='''All osmo-gsm-tester features not used by the user running the script''')
|
help='''All osmo-gsm-tester features not used by the user running the script''')
|
||||||
parser.add_argument('-p', '--distro-packages', dest='distro_packages', action='store_true',
|
parser.add_argument('-p', '--distro-packages', dest='distro_packages', action='store_true',
|
||||||
help='Print distro packages installing modules')
|
help='Print distro packages installing modules')
|
||||||
|
|
Loading…
Reference in New Issue