1#!/usr/bin/env python 2 3# Copyright (c) 2012 Google Inc. All rights reserved. 4# Use of this source code is governed by a BSD-style license that can be 5# found in the LICENSE file. 6 7""" 8Verifies that files generated by two-steps-removed actions are built before 9dependent compile steps. 10""" 11 12import os 13import sys 14import TestGyp 15 16# This test is Ninja-specific in that: 17# - the bug only showed nondeterministically in parallel builds; 18# - it relies on a ninja-specific output file path. 19 20test = TestGyp.TestGyp(formats=['ninja']) 21# xcode-ninja doesn't support building single object files by design. 22if test.format == 'xcode-ninja': 23 test.skip_test() 24 25test.run_gyp('chained-dependency.gyp') 26objext = '.obj' if sys.platform == 'win32' else '.o' 27test.build('chained-dependency.gyp', 28 os.path.join('obj', 'chained.chained' + objext)) 29# The test passes if the .o file builds successfully. 30test.pass_test() 31