gyptest-cl-additional-options.py 726 B

12345678910111213141516171819202122232425262728
  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 additional manual compiler flags are extracted properly.
  7. """
  8. import TestGyp
  9. import sys
  10. if sys.platform == 'win32':
  11. test = TestGyp.TestGyp(formats=['msvs', 'ninja'])
  12. CHDIR = 'compiler-flags'
  13. test.run_gyp('additional-options.gyp', chdir=CHDIR)
  14. # Warning level not overidden, must fail.
  15. test.build('additional-options.gyp', 'test_additional_none', chdir=CHDIR,
  16. status=1)
  17. # Warning level is overridden, must succeed.
  18. test.build('additional-options.gyp', 'test_additional_one', chdir=CHDIR)
  19. test.pass_test()