Home | History | Annotate | Download | only in chained-dependency
      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 """
      8 Verifies that files generated by two-steps-removed actions are built before
      9 dependent compile steps.
     10 """
     11 
     12 import os
     13 import sys
     14 import 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 
     20 test = TestGyp.TestGyp(formats=['ninja'])
     21 test.run_gyp('chained-dependency.gyp')
     22 objext = '.obj' if sys.platform == 'win32' else '.o'
     23 test.build('chained-dependency.gyp',
     24            os.path.join('obj', 'chained.chained' + objext))
     25 # The test passes if the .o file builds successfully.
     26 test.pass_test()
     27