From 26a029d407be480d791972afb5975cf62c9360a6 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 02:47:55 +0200 Subject: Adding upstream version 124.0.1. Signed-off-by: Daniel Baumann --- .../python/gyp/test/sanitize-rule-names/blah.S | 0 .../gyptest-sanitize-rule-names.py | 17 ++++++++++++++ .../python/gyp/test/sanitize-rule-names/hello.cc | 7 ++++++ .../sanitize-rule-names/sanitize-rule-names.gyp | 27 ++++++++++++++++++++++ .../python/gyp/test/sanitize-rule-names/script.py | 10 ++++++++ 5 files changed, 61 insertions(+) create mode 100644 third_party/python/gyp/test/sanitize-rule-names/blah.S create mode 100644 third_party/python/gyp/test/sanitize-rule-names/gyptest-sanitize-rule-names.py create mode 100644 third_party/python/gyp/test/sanitize-rule-names/hello.cc create mode 100644 third_party/python/gyp/test/sanitize-rule-names/sanitize-rule-names.gyp create mode 100644 third_party/python/gyp/test/sanitize-rule-names/script.py (limited to 'third_party/python/gyp/test/sanitize-rule-names') diff --git a/third_party/python/gyp/test/sanitize-rule-names/blah.S b/third_party/python/gyp/test/sanitize-rule-names/blah.S new file mode 100644 index 0000000000..e69de29bb2 diff --git a/third_party/python/gyp/test/sanitize-rule-names/gyptest-sanitize-rule-names.py b/third_party/python/gyp/test/sanitize-rule-names/gyptest-sanitize-rule-names.py new file mode 100644 index 0000000000..968a0ce5ce --- /dev/null +++ b/third_party/python/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/third_party/python/gyp/test/sanitize-rule-names/hello.cc b/third_party/python/gyp/test/sanitize-rule-names/hello.cc new file mode 100644 index 0000000000..1711567ef5 --- /dev/null +++ b/third_party/python/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/third_party/python/gyp/test/sanitize-rule-names/sanitize-rule-names.gyp b/third_party/python/gyp/test/sanitize-rule-names/sanitize-rule-names.gyp new file mode 100644 index 0000000000..184253e966 --- /dev/null +++ b/third_party/python/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/third_party/python/gyp/test/sanitize-rule-names/script.py b/third_party/python/gyp/test/sanitize-rule-names/script.py new file mode 100644 index 0000000000..ae2efa1df4 --- /dev/null +++ b/third_party/python/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:]) -- cgit v1.2.3