blob: 7147fd2fc31ac64c56dd7123154c11edd0c64120 [file] [log] [blame]
Ben Murdoch097c5b22016-05-18 11:27:45 +01001#!/usr/bin/env python
2
3# Copyright (c) 2014 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"""
8Verify that running gyp in a different directory does not cause actions and
9rules to rerun.
10"""
11
12import os
13import sys
14import TestGyp
15
16test = TestGyp.TestGyp(formats=['ninja'])
17# The xcode-ninja generator handles gypfiles which are not at the
18# project root incorrectly.
19# cf. https://code.google.com/p/gyp/issues/detail?id=460
20if test.format == 'xcode-ninja':
21 test.skip_test()
22
23test.run_gyp('subdir/action-rule-hash.gyp')
24test.build('subdir/action-rule-hash.gyp', test.ALL)
25test.up_to_date('subdir/action-rule-hash.gyp')
26
27# Verify that everything is still up-to-date when we re-invoke gyp from a
28# different directory.
29test.run_gyp('action-rule-hash.gyp', '--depth=../', chdir='subdir')
30test.up_to_date('subdir/action-rule-hash.gyp')
31
32test.pass_test()