Sha256: 9a8337c43e585f522714f4c982f6ec8ba295e537e4099bf278557f761c8a1180

Contents?: true

Size: 1.29 KB

Versions: 23

Compression:

Stored size: 1.29 KB

Contents

#!/usr/bin/env python

# Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

"""
Verifies that missing 'sources' files are treated as fatal errors when the
the generator flag 'msvs_error_on_missing_sources' is set.
"""

import TestGyp
import os

test = TestGyp.TestGyp(formats=['msvs'], workdir='workarea_all')

# With the flag not set
test.run_gyp('hello_missing.gyp')

# With the flag explicitly set to 0
try:
  os.environ['GYP_GENERATOR_FLAGS'] = 'msvs_error_on_missing_sources=0'
  test.run_gyp('hello_missing.gyp')
finally:
  del os.environ['GYP_GENERATOR_FLAGS']

# With the flag explicitly set to 1
try:
  os.environ['GYP_GENERATOR_FLAGS'] = 'msvs_error_on_missing_sources=1'
  # Test to make sure GYP raises an exception (exit status 1). Since this will
  # also print a backtrace, ensure that TestGyp is not checking that stderr is
  # empty by specifying None, which means do not perform any checking.
  # Instead, stderr is checked below to ensure it contains the expected
  # output.
  test.run_gyp('hello_missing.gyp', status=1, stderr=None)
finally:
  del os.environ['GYP_GENERATOR_FLAGS']
test.must_contain_any_line(test.stderr(),
                           ["Missing input files:"])

test.pass_test()

Version data entries

23 entries across 23 versions & 3 rubygems

Version Path
libv8-3.16.14.19.1 vendor/gyp/test/msvs/missing_sources/gyptest-missing.py
libv8-3.16.14.19 vendor/gyp/test/msvs/missing_sources/gyptest-missing.py
libv8-3.16.14.18 vendor/gyp/test/msvs/missing_sources/gyptest-missing.py
arcabouco-0.2.13 vendor/bundle/gems/libv8-3.16.14.17/vendor/gyp/test/msvs/missing_sources/gyptest-missing.py
libv8-3.16.14.17 vendor/gyp/test/msvs/missing_sources/gyptest-missing.py
libv8-3.16.14.16 vendor/gyp/test/msvs/missing_sources/gyptest-missing.py
libv8-3.16.14.15 vendor/gyp/test/msvs/missing_sources/gyptest-missing.py
libv8-3.16.14.14 vendor/gyp/test/msvs/missing_sources/gyptest-missing.py
libv8-tmpfork-3.16.14.13 vendor/gyp/test/msvs/missing_sources/gyptest-missing.py
libv8-3.16.14.13 vendor/gyp/test/msvs/missing_sources/gyptest-missing.py
libv8-3.16.14.12 vendor/gyp/test/msvs/missing_sources/gyptest-missing.py
libv8-3.16.14.11 vendor/gyp/test/msvs/missing_sources/gyptest-missing.py
libv8-3.16.14.10 vendor/gyp/test/msvs/missing_sources/gyptest-missing.py
libv8-3.16.14.8 vendor/gyp/test/msvs/missing_sources/gyptest-missing.py
libv8-3.16.14.8.rc1 vendor/gyp/test/msvs/missing_sources/gyptest-missing.py
libv8-3.16.14.7 vendor/gyp/test/msvs/missing_sources/gyptest-missing.py
libv8-3.16.14.6 vendor/gyp/test/msvs/missing_sources/gyptest-missing.py
libv8-3.16.14.5 vendor/gyp/test/msvs/missing_sources/gyptest-missing.py
libv8-3.16.14.4 vendor/gyp/test/msvs/missing_sources/gyptest-missing.py
libv8-3.16.14.3 vendor/gyp/test/msvs/missing_sources/gyptest-missing.py