full.py 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. # Copyright 2018 The Chromium Authors. All rights reserved.
  2. # Use of this source code is governed by a BSD-style license that can be
  3. # found in the LICENSE file.
  4. PYTHON_VERSION_COMPATIBILITY = 'PY3'
  5. DEPS = [
  6. 'osx_sdk',
  7. 'recipe_engine/platform',
  8. 'recipe_engine/properties',
  9. 'recipe_engine/raw_io',
  10. 'recipe_engine/step',
  11. ]
  12. def RunSteps(api):
  13. with api.osx_sdk('mac'):
  14. api.step('gn', ['gn', 'gen', 'out/Release'])
  15. api.step('ninja', ['ninja', '-C', 'out/Release'])
  16. def GenTests(api):
  17. for platform in ('linux', 'mac', 'win'):
  18. yield (api.test(platform) +
  19. api.platform.name(platform))
  20. yield api.test(
  21. 'explicit_version',
  22. api.platform.name('mac'),
  23. api.properties(**{'$depot_tools/osx_sdk': {
  24. 'sdk_version': 'deadbeef',
  25. }})
  26. )
  27. yield api.test(
  28. 'automatic_version',
  29. api.platform.name('mac'),
  30. api.step_data('find macOS version',
  31. stdout=api.raw_io.output_text('10.15.6')),
  32. )
  33. yield api.test(
  34. 'ancient_version',
  35. api.platform.name('mac'),
  36. api.step_data('find macOS version',
  37. stdout=api.raw_io.output_text('10.1.0')),
  38. )