gyptest-cl-runtime-checks.py 798 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. Make sure RTC 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 = 'compiler-flags'
  13. test.run_gyp('runtime-checks.gyp', chdir=CHDIR)
  14. # Runtime checks disabled, should fail.
  15. test.build('runtime-checks.gyp', 'test_brc_none', chdir=CHDIR, status=1)
  16. # Runtime checks enabled, should pass.
  17. test.build('runtime-checks.gyp', 'test_brc_1', chdir=CHDIR)
  18. # TODO(scottmg): There are other less frequently used/partial options, but
  19. # it's not clear how to verify them, so ignore for now.
  20. test.pass_test()