media/webrtc/trunk/tools/gyp/test/standalone/gyptest-standalone.py

Wed, 31 Dec 2014 13:27:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 13:27:57 +0100
branch
TOR_BUG_3246
changeset 6
8bccb770b82d
permissions
-rw-r--r--

Ignore runtime configuration files generated during quality assurance.

     1 #!/usr/bin/env python
     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.
     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 """
    12 import TestGyp
    13 import os
    15 test = TestGyp.TestGyp()
    17 test.run_gyp('standalone.gyp', '-Gstandalone')
    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()
    33 test.pass_test()

mercurial