gyptest-default.py 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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 the build tool default.
  7. """
  8. import TestGyp
  9. test = TestGyp.TestGyp()
  10. test.run_gyp('copies.gyp', chdir='src')
  11. test.relocate('src', 'relocate/src')
  12. test.build('copies.gyp', chdir='relocate/src')
  13. test.must_match(['relocate', 'src', 'copies-out', 'file1'], 'file1 contents\n')
  14. test.built_file_must_match('copies-out/file2',
  15. 'file2 contents\n',
  16. chdir='relocate/src')
  17. test.built_file_must_match('copies-out/directory/file3',
  18. 'file3 contents\n',
  19. chdir='relocate/src')
  20. test.built_file_must_match('copies-out/directory/file4',
  21. 'file4 contents\n',
  22. chdir='relocate/src')
  23. test.built_file_must_match('copies-out/directory/subdir/file5',
  24. 'file5 contents\n',
  25. chdir='relocate/src')
  26. test.built_file_must_match('copies-out/subdir/file6',
  27. 'file6 contents\n',
  28. chdir='relocate/src')
  29. test.pass_test()