summaryrefslogtreecommitdiffstats
path: root/media/webrtc/trunk/tools/gyp/test/ninja/s-needs-no-depfiles/gyptest-s-needs-no-depfiles.py
diff options
context:
space:
mode:
authorMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
committerMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
commit5f8de423f190bbb79a62f804151bc24824fa32d8 (patch)
tree10027f336435511475e392454359edea8e25895d /media/webrtc/trunk/tools/gyp/test/ninja/s-needs-no-depfiles/gyptest-s-needs-no-depfiles.py
parent49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff)
downloadUXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip
Add m-esr52 at 52.6.0
Diffstat (limited to 'media/webrtc/trunk/tools/gyp/test/ninja/s-needs-no-depfiles/gyptest-s-needs-no-depfiles.py')
-rwxr-xr-xmedia/webrtc/trunk/tools/gyp/test/ninja/s-needs-no-depfiles/gyptest-s-needs-no-depfiles.py42
1 files changed, 42 insertions, 0 deletions
diff --git a/media/webrtc/trunk/tools/gyp/test/ninja/s-needs-no-depfiles/gyptest-s-needs-no-depfiles.py b/media/webrtc/trunk/tools/gyp/test/ninja/s-needs-no-depfiles/gyptest-s-needs-no-depfiles.py
new file mode 100755
index 000000000..77a3245d4
--- /dev/null
+++ b/media/webrtc/trunk/tools/gyp/test/ninja/s-needs-no-depfiles/gyptest-s-needs-no-depfiles.py
@@ -0,0 +1,42 @@
+#!/usr/bin/env python
+
+# Copyright (c) 2012 Google Inc. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+"""
+Verify that .s files don't always trigger a rebuild, as would happen if depfiles
+were used for them (since clang & gcc ignore -MMD when building .s->.o on
+linux).
+"""
+
+import os
+import sys
+import TestCommon
+import TestGyp
+
+# NOTE(fischman): Each generator uses depfiles (or not) differently, so this is
+# a ninja-specific test.
+test = TestGyp.TestGyp(formats=['ninja'])
+
+if sys.platform == 'win32' or sys.platform == 'win64':
+ # This test is about clang/gcc vs. depfiles; VS gets a pass.
+ test.pass_test()
+ sys.exit(0)
+
+test.run_gyp('s-needs-no-depfiles.gyp')
+
+# Build the library, grab its timestamp, rebuild the library, ensure timestamp
+# hasn't changed.
+test.build('s-needs-no-depfiles.gyp', 'empty')
+empty_dll = test.built_file_path('empty', test.SHARED_LIB)
+test.built_file_must_exist(empty_dll)
+pre_stat = os.stat(test.built_file_path(empty_dll))
+test.sleep()
+test.build('s-needs-no-depfiles.gyp', 'empty')
+post_stat = os.stat(test.built_file_path(empty_dll))
+
+if pre_stat.st_mtime != post_stat.st_mtime:
+ test.fail_test()
+else:
+ test.pass_test()