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

Side by Side Diff: test/ninja/s-needs-no-depfiles/gyptest-s-needs-no-depfiles.py

Issue 11186038: Don't try to use -MMD / .o.d depfiles for ninja with .s files. (Closed) Base URL: http://git.chromium.org/external/gyp.git@master
Patch Set: Give win32/64 a free pass. Created 8 years, 2 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
« no previous file with comments | « pylib/gyp/generator/ninja.py ('k') | test/ninja/s-needs-no-depfiles/s-needs-no-depfiles.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #!/usr/bin/env python
2
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
5 # found in the LICENSE file.
6
7 """
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).
Nico 2012/10/18 18:09:39 "when building .s->o on linux" (doesn't happen on
Ami GONE FROM CHROMIUM 2012/10/18 18:14:38 Are you sure? The interwebz tell me otherwise. (
Nico 2012/10/18 18:30:21 Pretty sure. See the ninja-build thread on this, w
10 """
11
12 import os
13 import sys
14 import TestCommon
15 import TestGyp
16
17 # NOTE(fischman): Each generator uses depfiles (or not) differently, so this is
18 # a ninja-specific test.
19 test = TestGyp.TestGyp(formats=['ninja'])
20
21 if sys.platform == 'win32' or sys.platform == 'win64':
22 # This test is about clang/gcc vs. depfiles; VS gets a pass.
23 test.pass_test()
24 sys.exit(0)
25
26 test.run_gyp('s-needs-no-depfiles.gyp')
27
28 # Build the library, grab its timestamp, rebuild the library, ensure timestamp
29 # hasn't changed.
30 test.write(os.path.join(test.workdir, 'empty.s'), '')
Nico 2012/10/18 18:09:39 Can't you just check in an empty 'empty.s'?
Ami GONE FROM CHROMIUM 2012/10/18 18:14:38 I did that with an earlier revision, but it made g
Nico 2012/10/18 18:30:21 "# This file intentionally left empty." Regular bo
31 test.build('s-needs-no-depfiles.gyp', 'empty')
32 empty_dll = test.built_file_path('empty', test.SHARED_LIB)
33 test.built_file_must_exist(empty_dll)
34 pre_stat = os.stat(test.built_file_path(empty_dll))
35 test.sleep()
36 test.build('s-needs-no-depfiles.gyp', 'empty')
37 post_stat = os.stat(test.built_file_path(empty_dll))
38
39 if pre_stat.st_mtime != post_stat.st_mtime:
40 test.fail_test()
41 else:
42 test.pass_test()
OLDNEW
« no previous file with comments | « pylib/gyp/generator/ninja.py ('k') | test/ninja/s-needs-no-depfiles/s-needs-no-depfiles.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698