media/webrtc/trunk/tools/gyp/test/same-source-file-name/gyptest-default.py

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/media/webrtc/trunk/tools/gyp/test/same-source-file-name/gyptest-default.py	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,34 @@
     1.4 +#!/usr/bin/env python
     1.5 +
     1.6 +# Copyright (c) 2009 Google Inc. All rights reserved.
     1.7 +# Use of this source code is governed by a BSD-style license that can be
     1.8 +# found in the LICENSE file.
     1.9 +
    1.10 +"""
    1.11 +Build a .gyp with two targets that share a common .c source file.
    1.12 +"""
    1.13 +
    1.14 +import TestGyp
    1.15 +
    1.16 +test = TestGyp.TestGyp()
    1.17 +
    1.18 +test.run_gyp('all.gyp', chdir='src')
    1.19 +
    1.20 +test.relocate('src', 'relocate/src')
    1.21 +
    1.22 +test.build('all.gyp', chdir='relocate/src')
    1.23 +
    1.24 +expect1 = """\
    1.25 +Hello from prog1.c
    1.26 +Hello prog1 from func.c
    1.27 +"""
    1.28 +
    1.29 +expect2 = """\
    1.30 +Hello from prog2.c
    1.31 +Hello prog2 from func.c
    1.32 +"""
    1.33 +
    1.34 +test.run_built_executable('prog1', chdir='relocate/src', stdout=expect1)
    1.35 +test.run_built_executable('prog2', chdir='relocate/src', stdout=expect2)
    1.36 +
    1.37 +test.pass_test()

mercurial