• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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'])
21test.run_gyp('chained-dependency.gyp')
22objext = '.obj' if sys.platform == 'win32' else '.o'
23test.build('chained-dependency.gyp',
24           os.path.join('obj', 'chained.chained' + objext))
25# The test passes if the .o file builds successfully.
26test.pass_test()
27