media/webrtc/trunk/tools/gyp/test/library/gyptest-shared-obj-install-path.py

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rwxr-xr-x

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     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 .so files that are order only dependencies are specified by
     9 their install location rather than by their alias.
    10 """
    12 # Python 2.5 needs this for the with statement.
    13 from __future__ import with_statement
    15 import os
    16 import TestGyp
    18 test = TestGyp.TestGyp(formats=['make'])
    20 test.run_gyp('shared_dependency.gyp',
    21              chdir='src')
    22 test.relocate('src', 'relocate/src')
    24 test.build('shared_dependency.gyp', test.ALL, chdir='relocate/src')
    26 if test.format=='android':
    27   makefile_path = 'relocate/src/GypAndroid.mk'
    28 else:
    29   makefile_path = 'relocate/src/Makefile'
    31 with open(makefile_path) as makefile:
    32   make_contents = makefile.read()
    34 # If we remove the code to generate lib1, Make should still be able
    35 # to build lib2 since lib1.so already exists.
    36 make_contents = make_contents.replace('include lib1.target.mk', '')
    37 with open(makefile_path, 'w') as makefile:
    38   makefile.write(make_contents)
    40 test.build('shared_dependency.gyp', test.ALL, chdir='relocate/src')
    42 test.pass_test()

mercurial