media/webrtc/trunk/tools/gyp/test/rules-dirname/gyptest-dirname.py

Fri, 16 Jan 2015 18:13:44 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Fri, 16 Jan 2015 18:13:44 +0100
branch
TOR_BUG_9701
changeset 14
925c144e1f1f
permissions
-rwxr-xr-x

Integrate suggestion from review to improve consistency with existing code.

     1 #!/usr/bin/env python
     3 # Copyright (c) 2011 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 simple rules when using an explicit build target of 'all'.
     9 """
    11 import TestGyp
    13 test = TestGyp.TestGyp(formats=['make', 'ninja', 'xcode'])
    15 test.run_gyp('actions.gyp', chdir='src')
    17 test.relocate('src', 'relocate/src')
    19 test.build('actions.gyp', chdir='relocate/src')
    21 expect = """\
    22 hi c
    23 hello baz
    24 """
    25 if test.format == 'xcode':
    26   chdir = 'relocate/src/subdir'
    27 else:
    28   chdir = 'relocate/src'
    29 test.run_built_executable('gencc_int_output', chdir=chdir, stdout=expect)
    31 if test.format == 'msvs':
    32   test.must_exist('relocate/src/subdir/foo/bar/baz.printed')
    33   test.must_exist('relocate/src/subdir/a/b/c.printed')
    34 else:
    35   test.must_match('relocate/src/subdir/foo/bar/baz.printed', 'foo/bar')
    36   test.must_match('relocate/src/subdir/a/b/c.printed', 'a/b')
    38 test.pass_test()

mercurial