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

Side by Side Diff: test/ninja/s-needs-no-depfiles/gyptest-s-needs-no-depfiles.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 Verify that .s files don't always trigger a rebuild, as would happen if depfiles 8 Verify that .s files don't always trigger a rebuild, as would happen if depfiles
9 were used for them (since clang & gcc ignore -MMD when building .s->.o on 9 were used for them (since clang & gcc ignore -MMD when building .s->.o on
10 linux). 10 linux).
11 """ 11 """
12 12
13 import os 13 import os
14 import sys 14 import sys
15 import TestCommon 15 import TestCommon
16 import TestGyp 16 import TestGyp
17 17
18 # NOTE(fischman): Each generator uses depfiles (or not) differently, so this is 18 # NOTE(fischman): Each generator uses depfiles (or not) differently, so this is
19 # a ninja-specific test. 19 # a ninja-specific test.
20 test = TestGyp.TestGyp(formats=['ninja']) 20 test = TestGyp.TestGyp(formats=['ninja'])
21 21
22 if sys.platform == 'win32' or sys.platform == 'win64': 22 if sys.platform == 'win32' or sys.platform == 'win64':
23 # This test is about clang/gcc vs. depfiles; VS gets a pass. 23 # This test is about clang/gcc vs. depfiles; VS gets a pass.
24 test.pass_test() 24 test.pass_test()
25 sys.exit(0) 25 sys.exit(0)
26 26
27 test.run_gyp('s-needs-no-depfiles.gyp') 27 test.run_gyp('s-needs-no-depfiles.gyp', '-G', 'xcode_ninja_target_pattern=^.*$')
28 28
29 # Build the library, grab its timestamp, rebuild the library, ensure timestamp 29 # Build the library, grab its timestamp, rebuild the library, ensure timestamp
30 # hasn't changed. 30 # hasn't changed.
31 test.build('s-needs-no-depfiles.gyp', 'empty') 31 test.build('s-needs-no-depfiles.gyp', 'empty')
32 empty_dll = test.built_file_path('empty', test.SHARED_LIB) 32 empty_dll = test.built_file_path('empty', test.SHARED_LIB)
33 test.built_file_must_exist(empty_dll) 33 test.built_file_must_exist(empty_dll)
34 pre_stat = os.stat(test.built_file_path(empty_dll)) 34 pre_stat = os.stat(test.built_file_path(empty_dll))
35 test.sleep() 35 test.sleep()
36 test.build('s-needs-no-depfiles.gyp', 'empty') 36 test.build('s-needs-no-depfiles.gyp', 'empty')
37 post_stat = os.stat(test.built_file_path(empty_dll)) 37 post_stat = os.stat(test.built_file_path(empty_dll))
38 38
39 if pre_stat.st_mtime != post_stat.st_mtime: 39 if pre_stat.st_mtime != post_stat.st_mtime:
40 test.fail_test() 40 test.fail_test()
41 else: 41 else:
42 test.pass_test() 42 test.pass_test()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698