initial import
[vuplus_webkit] / Source / ThirdParty / gyp / test / copies / gyptest-all.py
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 Verifies file copies using an explicit build target of 'all'.
9 """
10
11 import TestGyp
12
13 test = TestGyp.TestGyp()
14
15 test.run_gyp('copies.gyp', chdir='src')
16
17 test.relocate('src', 'relocate/src')
18
19 test.build('copies.gyp', test.ALL, chdir='relocate/src')
20
21 test.must_match(['relocate', 'src', 'copies-out', 'file1'], 'file1 contents\n')
22
23 test.built_file_must_match('copies-out/file2',
24                            'file2 contents\n',
25                            chdir='relocate/src')
26
27 test.built_file_must_match('copies-out/directory/file3',
28                            'file3 contents\n',
29                            chdir='relocate/src')
30 test.built_file_must_match('copies-out/directory/file4',
31                            'file4 contents\n',
32                            chdir='relocate/src')
33 test.built_file_must_match('copies-out/directory/subdir/file5',
34                            'file5 contents\n',
35                            chdir='relocate/src')
36 test.built_file_must_match('copies-out/subdir/file6',
37                            'file6 contents\n',
38                            chdir='relocate/src')
39
40 test.pass_test()