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.
8
Verifies --generator-output= behavior when using rules.
13
test = TestGyp.TestGyp()
15
test.writable(test.workpath('rules'), False)
17
test.run_gyp('rules.gyp',
18
'--generator-output=' + test.workpath('gypfiles'),
21
test.writable(test.workpath('rules'), True)
23
test.relocate('rules', 'relocate/rules')
24
test.relocate('gypfiles', 'relocate/gypfiles')
26
test.writable(test.workpath('relocate/rules'), False)
28
test.writable(test.workpath('relocate/rules/build'), True)
29
test.writable(test.workpath('relocate/rules/subdir1/build'), True)
30
test.writable(test.workpath('relocate/rules/subdir2/build'), True)
31
test.writable(test.workpath('relocate/rules/subdir2/rules-out'), True)
33
test.build('rules.gyp', test.ALL, chdir='relocate/gypfiles')
37
Hello from function1.in1
38
Hello from function2.in1
39
Hello from define3.in0
40
Hello from define4.in0
43
if test.format == 'xcode':
44
chdir = 'relocate/rules/subdir1'
46
chdir = 'relocate/gypfiles'
47
test.run_built_executable('program', chdir=chdir, stdout=expect)
49
test.must_match('relocate/rules/subdir2/rules-out/file1.out',
50
"Hello from file1.in0\n")
51
test.must_match('relocate/rules/subdir2/rules-out/file2.out',
52
"Hello from file2.in0\n")
53
test.must_match('relocate/rules/subdir2/rules-out/file3.out',
54
"Hello from file3.in1\n")
55
test.must_match('relocate/rules/subdir2/rules-out/file4.out',
56
"Hello from file4.in1\n")