summaryrefslogtreecommitdiffstats
path: root/media/webrtc/trunk/tools/gyp/test/sanitize-rule-names
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/sanitize-rule-names
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/sanitize-rule-names')
-rw-r--r--media/webrtc/trunk/tools/gyp/test/sanitize-rule-names/blah.S0
-rw-r--r--media/webrtc/trunk/tools/gyp/test/sanitize-rule-names/gyptest-sanitize-rule-names.py17
-rw-r--r--media/webrtc/trunk/tools/gyp/test/sanitize-rule-names/hello.cc7
-rw-r--r--media/webrtc/trunk/tools/gyp/test/sanitize-rule-names/sanitize-rule-names.gyp27
-rw-r--r--media/webrtc/trunk/tools/gyp/test/sanitize-rule-names/script.py10
5 files changed, 61 insertions, 0 deletions
diff --git a/media/webrtc/trunk/tools/gyp/test/sanitize-rule-names/blah.S b/media/webrtc/trunk/tools/gyp/test/sanitize-rule-names/blah.S
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/media/webrtc/trunk/tools/gyp/test/sanitize-rule-names/blah.S
diff --git a/media/webrtc/trunk/tools/gyp/test/sanitize-rule-names/gyptest-sanitize-rule-names.py b/media/webrtc/trunk/tools/gyp/test/sanitize-rule-names/gyptest-sanitize-rule-names.py
new file mode 100644
index 000000000..968a0ce5c
--- /dev/null
+++ b/media/webrtc/trunk/tools/gyp/test/sanitize-rule-names/gyptest-sanitize-rule-names.py
@@ -0,0 +1,17 @@
+#!/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.
+
+"""
+Make sure rule names with non-"normal" characters in them don't cause
+broken build files. This test was originally causing broken .ninja files.
+"""
+
+import TestGyp
+
+test = TestGyp.TestGyp()
+test.run_gyp('sanitize-rule-names.gyp')
+test.build('sanitize-rule-names.gyp', test.ALL)
+test.pass_test()
diff --git a/media/webrtc/trunk/tools/gyp/test/sanitize-rule-names/hello.cc b/media/webrtc/trunk/tools/gyp/test/sanitize-rule-names/hello.cc
new file mode 100644
index 000000000..1711567ef
--- /dev/null
+++ b/media/webrtc/trunk/tools/gyp/test/sanitize-rule-names/hello.cc
@@ -0,0 +1,7 @@
+// 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.
+
+int main() {
+ return 0;
+}
diff --git a/media/webrtc/trunk/tools/gyp/test/sanitize-rule-names/sanitize-rule-names.gyp b/media/webrtc/trunk/tools/gyp/test/sanitize-rule-names/sanitize-rule-names.gyp
new file mode 100644
index 000000000..184253e96
--- /dev/null
+++ b/media/webrtc/trunk/tools/gyp/test/sanitize-rule-names/sanitize-rule-names.gyp
@@ -0,0 +1,27 @@
+# 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.
+
+{
+ 'targets': [
+ {
+ 'target_name': 's_test',
+ 'type': 'executable',
+ 'rules': [
+ {
+ # Make sure this rule name doesn't cause an invalid ninja file.
+ 'rule_name': 'rule name with odd characters ()/',
+ 'extension': 'S',
+ 'outputs': ['outfile'],
+ 'msvs_cygwin_shell': 0,
+ 'msvs_quote_cmd': 0,
+ 'action': ['python', 'script.py', '<(RULE_INPUT_PATH)', 'outfile'],
+ },
+ ],
+ 'sources': [
+ 'blah.S',
+ 'hello.cc',
+ ],
+ },
+ ],
+}
diff --git a/media/webrtc/trunk/tools/gyp/test/sanitize-rule-names/script.py b/media/webrtc/trunk/tools/gyp/test/sanitize-rule-names/script.py
new file mode 100644
index 000000000..ae2efa1df
--- /dev/null
+++ b/media/webrtc/trunk/tools/gyp/test/sanitize-rule-names/script.py
@@ -0,0 +1,10 @@
+#!/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.
+
+import shutil
+import sys
+
+shutil.copyfile(*sys.argv[1:])