media/webrtc/trunk/tools/gyp/test/variables/commands/gyptest-commands-repeated.py

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rwxr-xr-x

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     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 Test variable expansion of '<!()' syntax commands where they are evaluated
     9 more then once..
    10 """
    12 import TestGyp
    14 test = TestGyp.TestGyp(format='gypd')
    16 expect = test.read('commands-repeated.gyp.stdout').replace('\r\n', '\n')
    18 test.run_gyp('commands-repeated.gyp',
    19              '--debug', 'variables',
    20              stdout=expect, ignore_line_numbers=True)
    22 # Verify the commands-repeated.gypd against the checked-in expected contents.
    23 #
    24 # Normally, we should canonicalize line endings in the expected
    25 # contents file setting the Subversion svn:eol-style to native,
    26 # but that would still fail if multiple systems are sharing a single
    27 # workspace on a network-mounted file system.  Consequently, we
    28 # massage the Windows line endings ('\r\n') in the output to the
    29 # checked-in UNIX endings ('\n').
    31 contents = test.read('commands-repeated.gypd').replace('\r\n', '\n')
    32 expect = test.read('commands-repeated.gypd.golden').replace('\r\n', '\n')
    33 if not test.match(contents, expect):
    34   print "Unexpected contents of `commands-repeated.gypd'"
    35   test.diff(expect, contents, 'commands-repeated.gypd ')
    36   test.fail_test()
    38 test.pass_test()

mercurial