gyptest-all.py 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #!/usr/bin/env python
  2. # Copyright (c) 2009 Google Inc. All rights reserved.
  3. # Use of this source code is governed by a BSD-style license that can be
  4. # found in the LICENSE file.
  5. """
  6. Verifies file copies using an explicit build target of 'all'.
  7. """
  8. import TestGyp
  9. test = TestGyp.TestGyp()
  10. test.run_gyp('copies.gyp',
  11. '-G', 'xcode_ninja_target_pattern=^(?!copies_null)',
  12. chdir='src')
  13. test.relocate('src', 'relocate/src')
  14. test.build('copies.gyp', test.ALL, chdir='relocate/src')
  15. test.must_match(['relocate', 'src', 'copies-out', 'file1'], 'file1 contents\n')
  16. test.built_file_must_match('copies-out/file2',
  17. 'file2 contents\n',
  18. chdir='relocate/src')
  19. test.built_file_must_match('copies-out/directory/file3',
  20. 'file3 contents\n',
  21. chdir='relocate/src')
  22. test.built_file_must_match('copies-out/directory/file4',
  23. 'file4 contents\n',
  24. chdir='relocate/src')
  25. test.built_file_must_match('copies-out/directory/subdir/file5',
  26. 'file5 contents\n',
  27. chdir='relocate/src')
  28. test.built_file_must_match('copies-out/subdir/file6',
  29. 'file6 contents\n',
  30. chdir='relocate/src')
  31. test.pass_test()