copy_test_data_ios.gypi 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. # Copyright (c) 2012 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. # This file is meant to be included into an action to copy test data files into
  5. # an iOS app bundle. To use this the following variables need to be defined:
  6. # test_data_files: list: paths to test data files or directories
  7. # test_data_prefix: string: a directory prefix that will be prepended to each
  8. # output path. Generally, this should be the base
  9. # directory of the gypi file containing the unittest
  10. # target (e.g. "base" or "chrome").
  11. #
  12. # To use this, create a gyp target with the following form:
  13. # {
  14. # 'target_name': 'my_unittests',
  15. # 'conditions': [
  16. # ['OS == "ios"', {
  17. # 'actions': [
  18. # {
  19. # 'action_name': 'copy_test_data',
  20. # 'variables': {
  21. # 'test_data_files': [
  22. # 'path/to/datafile.txt',
  23. # 'path/to/data/directory/',
  24. # ]
  25. # 'test_data_prefix' : 'prefix',
  26. # },
  27. # 'includes': ['path/to/this/gypi/file'],
  28. # },
  29. # ],
  30. # }],
  31. # }
  32. #
  33. {
  34. 'inputs': [
  35. '<!@pymod_do_main(copy_test_data_ios --inputs <(test_data_files))',
  36. ],
  37. 'outputs': [
  38. '<!@pymod_do_main(copy_test_data_ios -o <(PRODUCT_DIR)/<(_target_name).app/<(test_data_prefix) --outputs <(test_data_files))',
  39. ],
  40. 'action': [
  41. 'python',
  42. '<(DEPTH)/build/copy_test_data_ios.py',
  43. '-o', '<(PRODUCT_DIR)/<(_target_name).app/<(test_data_prefix)',
  44. '<(_inputs)',
  45. ],
  46. }