summaryrefslogtreecommitdiff
path: root/test/ninja/action-rule-hash/gyptest-action-rule-hash.py
blob: 631e176af5063ff756200d0049ec86ce43095350 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/usr/bin/env python

# Copyright (c) 2014 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.

"""
Verify that running gyp in a different directory does not cause actions and
rules to rerun.
"""

import os
import sys
import TestGyp

test = TestGyp.TestGyp(formats=['ninja'])

test.run_gyp('subdir/action-rule-hash.gyp')
test.build('subdir/action-rule-hash.gyp', test.ALL)
test.up_to_date('subdir/action-rule-hash.gyp')

# Verify that everything is still up-to-date when we re-invoke gyp from a
# different directory.
test.run_gyp('action-rule-hash.gyp', '--depth=../', chdir='subdir')
test.up_to_date('subdir/action-rule-hash.gyp')

test.pass_test()