ios_app_settings.py 721 B

12345678910111213141516171819
  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(
  6. {'OS_VERSION': 1, 'DEVICES': -1},
  7. args
  8. )
  9. if tail:
  10. ymake.report_configure_error('Bad IOS_COMMON_SETTINGS usage - unknown data: ' + str(tail))
  11. if kv.get('OS_VERSION', []):
  12. unit.onios_app_common_flags(['--minimum-deployment-target', kv.get('OS_VERSION', [])[0]])
  13. unit.onios_app_assets_flags(['--filter-for-device-os-version', kv.get('OS_VERSION', [])[0]])
  14. devices_flags = []
  15. for device in kv.get('DEVICES', []):
  16. devices_flags += ['--target-device', device]
  17. if devices_flags:
  18. unit.onios_app_common_flags(devices_flags)