gyptest-link-large-address-aware.py 896 B

1234567891011121314151617181920212223242526272829303132333435
  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. Make sure largeaddressaware setting is extracted properly.
  7. """
  8. import TestGyp
  9. import sys
  10. if sys.platform == 'win32':
  11. test = TestGyp.TestGyp(formats=['msvs', 'ninja'])
  12. CHDIR = 'linker-flags'
  13. test.run_gyp('large-address-aware.gyp', chdir=CHDIR)
  14. test.build('large-address-aware.gyp', test.ALL, chdir=CHDIR)
  15. def GetHeaders(exe):
  16. return test.run_dumpbin('/headers', test.built_file_path(exe, chdir=CHDIR))
  17. MARKER = 'Application can handle large (>2GB) addresses'
  18. # Explicitly off.
  19. if MARKER in GetHeaders('test_large_address_aware_no.exe'):
  20. test.fail_test()
  21. # Explicitly on.
  22. if MARKER not in GetHeaders('test_large_address_aware_yes.exe'):
  23. test.fail_test()
  24. test.pass_test()