~ubuntu-branches/ubuntu/raring/qtwebkit-source/raring-proposed

« back to all changes in this revision

Viewing changes to Source/ThirdParty/gyp/test/same-name/gyptest-default.py

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2013-02-18 14:24:18 UTC
  • Revision ID: package-import@ubuntu.com-20130218142418-eon0jmjg3nj438uy
Tags: upstream-2.3
ImportĀ upstreamĀ versionĀ 2.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/env python
 
2
 
 
3
# Copyright (c) 2009 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.
 
6
 
 
7
"""
 
8
Build a .gyp with two targets that share a common .c source file.
 
9
"""
 
10
 
 
11
import TestGyp
 
12
 
 
13
test = TestGyp.TestGyp()
 
14
 
 
15
test.run_gyp('all.gyp', chdir='src')
 
16
 
 
17
test.relocate('src', 'relocate/src')
 
18
 
 
19
test.build('all.gyp', chdir='relocate/src')
 
20
 
 
21
expect1 = """\
 
22
Hello from prog1.c
 
23
Hello prog1 from func.c
 
24
"""
 
25
 
 
26
expect2 = """\
 
27
Hello from prog2.c
 
28
Hello prog2 from func.c
 
29
"""
 
30
 
 
31
test.run_built_executable('prog1', chdir='relocate/src', stdout=expect1)
 
32
test.run_built_executable('prog2', chdir='relocate/src', stdout=expect2)
 
33
 
 
34
test.pass_test()