Sha256: a5e3737fad3a9593997fd1b2a031e616a7a795fa1fa858116e9de54ec07fc336

Contents?: true

Size: 1.56 KB

Versions: 39

Compression:

Stored size: 1.56 KB

Contents

#!/usr/bin/env python

# Copyright (c) 2011 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 a failing postbuild step lets the build fail.
"""

import TestGyp

import sys

if sys.platform == 'darwin':
  # set |match| to ignore build stderr output.
  test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode'],
                         match = lambda a, b: True)

  test.run_gyp('test.gyp', chdir='postbuild-fail')

  build_error_code = {
    'xcode': 1,
    'make': 2,
    'ninja': 1,
  }[test.format]


  # If a postbuild fails, all postbuilds should be re-run on the next build.
  # However, even if the first postbuild fails the other postbuilds are still
  # executed.


  # Non-bundles
  test.build('test.gyp', 'nonbundle', chdir='postbuild-fail',
             status=build_error_code)
  test.built_file_must_exist('static_touch',
                             chdir='postbuild-fail')
  # Check for non-up-to-date-ness by checking if building again produces an
  # error.
  test.build('test.gyp', 'nonbundle', chdir='postbuild-fail',
             status=build_error_code)


  # Bundles
  test.build('test.gyp', 'bundle', chdir='postbuild-fail',
             status=build_error_code)
  test.built_file_must_exist('dynamic_touch',
                             chdir='postbuild-fail')
  # Check for non-up-to-date-ness by checking if building again produces an
  # error.
  test.build('test.gyp', 'bundle', chdir='postbuild-fail',
             status=build_error_code)

  test.pass_test()

Version data entries

39 entries across 39 versions & 5 rubygems

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