|
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 a project hierarchy created with the --generator-output= |
|
9 option can be built even when it's relocated to a different path. |
|
10 """ |
|
11 |
|
12 import TestGyp |
|
13 import os |
|
14 |
|
15 test = TestGyp.TestGyp() |
|
16 |
|
17 test.run_gyp('standalone.gyp', '-Gstandalone') |
|
18 |
|
19 # Look at all the files in the tree to make sure none |
|
20 # of them reference the gyp file. |
|
21 for root, dirs, files in os.walk("."): |
|
22 for file in files: |
|
23 # ignore ourself |
|
24 if os.path.splitext(__file__)[0] in file: |
|
25 continue |
|
26 file = os.path.join(root, file) |
|
27 contents = open(file).read() |
|
28 if 'standalone.gyp' in contents: |
|
29 print 'gyp file referenced in generated output: %s' % file |
|
30 test.fail_test() |
|
31 |
|
32 |
|
33 test.pass_test() |