ios_app_settings.py 700 B

1234567891011121314151617
  1. import _common as common
  2. import ymake
  3. import os
  4. def onios_app_settings(unit, *args):
  5. tail, kv = common.sort_by_keywords({'OS_VERSION': 1, 'DEVICES': -1}, args)
  6. if tail:
  7. ymake.report_configure_error('Bad IOS_COMMON_SETTINGS usage - unknown data: ' + str(tail))
  8. if kv.get('OS_VERSION', []):
  9. unit.onios_app_common_flags(['--minimum-deployment-target', kv.get('OS_VERSION', [])[0]])
  10. unit.onios_app_assets_flags(['--filter-for-device-os-version', kv.get('OS_VERSION', [])[0]])
  11. devices_flags = []
  12. for device in kv.get('DEVICES', []):
  13. devices_flags += ['--target-device', device]
  14. if devices_flags:
  15. unit.onios_app_common_flags(devices_flags)