Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(425)

Side by Side Diff: test/mac/gyptest-copies.py

Issue 421453003: Add TestGypXcodeNinja to run tests against the xcode-ninja generator (Closed) Base URL: https://chromium.googlesource.com/external/gyp.git@master
Patch Set: Rebase onto origin/master Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 2
3 # Copyright (c) 2012 Google Inc. All rights reserved. 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 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 """ 7 """
8 Verifies that 'copies' with app bundles are handled correctly. 8 Verifies that 'copies' with app bundles are handled correctly.
9 """ 9 """
10 10
11 import TestGyp 11 import TestGyp
12 12
13 import os 13 import os
14 import sys 14 import sys
15 import time 15 import time
16 16
17 if sys.platform == 'darwin': 17 if sys.platform == 'darwin':
18 test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode']) 18 test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode'])
19 19
20 test.run_gyp('framework.gyp', chdir='framework') 20 test.run_gyp('framework.gyp',
21 '-G', 'xcode_ninja_target_pattern=^copy_target$',
22 chdir='framework')
21 23
22 test.build('framework.gyp', 'copy_target', chdir='framework') 24 test.build('framework.gyp', 'copy_target', chdir='framework')
23 25
24 # Check that the copy succeeded. 26 # Check that the copy succeeded.
25 test.built_file_must_exist( 27 test.built_file_must_exist(
26 'Test Framework.framework/foo/Dependency Bundle.framework', 28 'Test Framework.framework/foo/Dependency Bundle.framework',
27 chdir='framework') 29 chdir='framework')
28 test.built_file_must_exist( 30 test.built_file_must_exist(
29 'Test Framework.framework/foo/Dependency Bundle.framework/Versions/A', 31 'Test Framework.framework/foo/Dependency Bundle.framework/Versions/A',
30 chdir='framework') 32 chdir='framework')
31 test.built_file_must_exist( 33 test.built_file_must_exist(
32 'Test Framework.framework/Versions/A/Libraries/empty.c', 34 'Test Framework.framework/Versions/A/Libraries/empty.c',
33 chdir='framework') 35 chdir='framework')
34 36
35 37
36 # Check that rebuilding the target a few times works. 38 # Check that rebuilding the target a few times works.
37 dep_bundle = test.built_file_path('Dependency Bundle.framework', 39 dep_bundle = test.built_file_path('Dependency Bundle.framework',
38 chdir='framework') 40 chdir='framework')
39 mtime = os.path.getmtime(dep_bundle) 41 mtime = os.path.getmtime(dep_bundle)
40 atime = os.path.getatime(dep_bundle) 42 atime = os.path.getatime(dep_bundle)
41 for i in range(3): 43 for i in range(3):
42 os.utime(dep_bundle, (atime + i * 1000, mtime + i * 1000)) 44 os.utime(dep_bundle, (atime + i * 1000, mtime + i * 1000))
43 test.build('framework.gyp', 'copy_target', chdir='framework') 45 test.build('framework.gyp', 'copy_target', chdir='framework')
44 46
45 47
46 # Check that actions ran. 48 # Check that actions ran.
47 test.built_file_must_exist('action_file', chdir='framework') 49 test.built_file_must_exist('action_file', chdir='framework')
48 50
49 test.pass_test() 51 test.pass_test()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698