gyptest-rules-variables.py 681 B

1234567891011121314151617181920212223242526
  1. #!/usr/bin/env python
  2. # Copyright (c) 2011 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 rules related variables are expanded.
  7. """
  8. import TestGyp
  9. test = TestGyp.TestGyp(formats=['ninja'])
  10. test.relocate('src', 'relocate/src')
  11. test.run_gyp('variables.gyp', chdir='relocate/src')
  12. test.build('variables.gyp', chdir='relocate/src')
  13. test.run_built_executable('all_rule_variables',
  14. chdir='relocate/src',
  15. stdout="input_root\ninput_dirname\ninput_path\n" +
  16. "input_ext\ninput_name\n")
  17. test.pass_test()