gyptest-dependencies.py 662 B

1234567891011121314151617181920212223242526
  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 .d files and all.deps are properly generated.
  7. """
  8. import TestGyp
  9. # .d files are only used by the make build.
  10. test = TestGyp.TestGyp(formats=['make'])
  11. test.run_gyp('dependencies.gyp')
  12. test.build('dependencies.gyp', test.ALL)
  13. deps_file = test.built_file_path(".deps/out/Default/obj.target/main/main.o.d")
  14. test.must_contain(deps_file, "main.h")
  15. # Build a second time to make sure we generate all.deps.
  16. test.build('dependencies.gyp', test.ALL)
  17. test.pass_test()