gyptest-action-envvars.py 859 B

123456789101112131415161718192021222324252627282930
  1. #!/usr/bin/env python
  2. # Copyright (c) 2012 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 that env vars work with actions, with relative directory paths.
  7. """
  8. import TestGyp
  9. import sys
  10. if sys.platform == 'darwin':
  11. test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode'])
  12. CHDIR = 'action-envvars'
  13. test.run_gyp('action/action.gyp', chdir=CHDIR)
  14. test.build('action/action.gyp', 'action', chdir=CHDIR, SYMROOT='../build')
  15. result_file = test.built_file_path('result', chdir=CHDIR)
  16. test.must_exist(result_file)
  17. test.must_contain(result_file, 'Test output')
  18. other_result_file = test.built_file_path('other_result', chdir=CHDIR)
  19. test.must_exist(other_result_file)
  20. test.must_contain(other_result_file, 'Other output')
  21. test.pass_test()