media/webrtc/trunk/tools/gyp/test/include_dirs/gyptest-all.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
-rwxr-xr-x

Ignore runtime configuration files generated during quality assurance.

michael@0 1 #!/usr/bin/env python
michael@0 2
michael@0 3 # Copyright (c) 2009 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 use of include_dirs when using an explicit build target of 'all'.
michael@0 9 """
michael@0 10
michael@0 11 import TestGyp
michael@0 12
michael@0 13 test = TestGyp.TestGyp()
michael@0 14
michael@0 15 if test.format == 'scons':
michael@0 16 test.skip_test('TODO: http://code.google.com/p/gyp/issues/detail?id=176\n')
michael@0 17
michael@0 18 test.run_gyp('includes.gyp', chdir='src')
michael@0 19
michael@0 20 test.relocate('src', 'relocate/src')
michael@0 21
michael@0 22 test.build('includes.gyp', test.ALL, chdir='relocate/src')
michael@0 23
michael@0 24 expect = """\
michael@0 25 Hello from includes.c
michael@0 26 Hello from inc.h
michael@0 27 Hello from include1.h
michael@0 28 Hello from subdir/inc2/include2.h
michael@0 29 Hello from shadow2/shadow.h
michael@0 30 """
michael@0 31 test.run_built_executable('includes', stdout=expect, chdir='relocate/src')
michael@0 32
michael@0 33 if test.format == 'xcode':
michael@0 34 chdir='relocate/src/subdir'
michael@0 35 else:
michael@0 36 chdir='relocate/src'
michael@0 37
michael@0 38 expect = """\
michael@0 39 Hello from subdir/subdir_includes.c
michael@0 40 Hello from subdir/inc.h
michael@0 41 Hello from include1.h
michael@0 42 Hello from subdir/inc2/include2.h
michael@0 43 """
michael@0 44 test.run_built_executable('subdir_includes', stdout=expect, chdir=chdir)
michael@0 45
michael@0 46 test.pass_test()

mercurial