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.

michael@0 1 #!/usr/bin/env python
michael@0 2
michael@0 3 # Copyright (c) 2012 Google Inc. All rights reserved.
michael@0 4 # Use of this source code is governed by a BSD-style license that can be
michael@0 5 # found in the LICENSE file.
michael@0 6
michael@0 7 """
michael@0 8 Verifies that a project hierarchy created with the --generator-output=
michael@0 9 option can be built even when it's relocated to a different path.
michael@0 10 """
michael@0 11
michael@0 12 import TestGyp
michael@0 13 import os
michael@0 14
michael@0 15 test = TestGyp.TestGyp()
michael@0 16
michael@0 17 test.run_gyp('standalone.gyp', '-Gstandalone')
michael@0 18
michael@0 19 # Look at all the files in the tree to make sure none
michael@0 20 # of them reference the gyp file.
michael@0 21 for root, dirs, files in os.walk("."):
michael@0 22 for file in files:
michael@0 23 # ignore ourself
michael@0 24 if os.path.splitext(__file__)[0] in file:
michael@0 25 continue
michael@0 26 file = os.path.join(root, file)
michael@0 27 contents = open(file).read()
michael@0 28 if 'standalone.gyp' in contents:
michael@0 29 print 'gyp file referenced in generated output: %s' % file
michael@0 30 test.fail_test()
michael@0 31
michael@0 32
michael@0 33 test.pass_test()

mercurial