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/self-dependency/common.gypi | 13 ++++++++++++ .../python/gyp/test/self-dependency/dep.gyp | 23 ++++++++++++++++++++++ .../self-dependency/gyptest-self-dependency.py | 19 ++++++++++++++++++ .../gyp/test/self-dependency/self_dependency.gyp | 15 ++++++++++++++ 4 files changed, 70 insertions(+) create mode 100644 third_party/python/gyp/test/self-dependency/common.gypi create mode 100644 third_party/python/gyp/test/self-dependency/dep.gyp create mode 100755 third_party/python/gyp/test/self-dependency/gyptest-self-dependency.py create mode 100644 third_party/python/gyp/test/self-dependency/self_dependency.gyp (limited to 'third_party/python/gyp/test/self-dependency') diff --git a/third_party/python/gyp/test/self-dependency/common.gypi b/third_party/python/gyp/test/self-dependency/common.gypi new file mode 100644 index 0000000000..aae221a5dd --- /dev/null +++ b/third_party/python/gyp/test/self-dependency/common.gypi @@ -0,0 +1,13 @@ +# Copyright (c) 2013 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. + +# A common file that other .gyp files include. +# Makes every target in the project depend on dep.gyp:dep. +{ + 'target_defaults': { + 'dependencies': [ + 'dep.gyp:dep', + ], + }, +} diff --git a/third_party/python/gyp/test/self-dependency/dep.gyp b/third_party/python/gyp/test/self-dependency/dep.gyp new file mode 100644 index 0000000000..2b6c9dda85 --- /dev/null +++ b/third_party/python/gyp/test/self-dependency/dep.gyp @@ -0,0 +1,23 @@ +# Copyright (c) 2013 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. + +# dep.gyp contains a target dep, on which all the targets in the project +# depend. This means there's a self-dependency of dep on itself, which is +# pruned by setting prune_self_dependency to 1. + +{ + 'includes': [ + 'common.gypi', + ], + 'targets': [ + { + 'target_name': 'dep', + 'type': 'none', + 'variables': { + # Without this GYP will report a cycle in dependency graph. + 'prune_self_dependency': 1, + }, + }, + ], +} diff --git a/third_party/python/gyp/test/self-dependency/gyptest-self-dependency.py b/third_party/python/gyp/test/self-dependency/gyptest-self-dependency.py new file mode 100755 index 0000000000..82fab271c5 --- /dev/null +++ b/third_party/python/gyp/test/self-dependency/gyptest-self-dependency.py @@ -0,0 +1,19 @@ +#!/usr/bin/env python + +# Copyright (c) 2013 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 pulling in a dependency a second time in a conditional works for +shared_library targets. Regression test for http://crbug.com/122588 +""" + +import TestGyp + +test = TestGyp.TestGyp() + +test.run_gyp('self_dependency.gyp') + +# If running gyp worked, all is well. +test.pass_test() diff --git a/third_party/python/gyp/test/self-dependency/self_dependency.gyp b/third_party/python/gyp/test/self-dependency/self_dependency.gyp new file mode 100644 index 0000000000..0ca76c669b --- /dev/null +++ b/third_party/python/gyp/test/self-dependency/self_dependency.gyp @@ -0,0 +1,15 @@ +# Copyright (c) 2013 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. + +{ + 'includes': [ + 'common.gypi', + ], + 'targets': [ + { + 'target_name': 'a', + 'type': 'none', + }, + ], +} -- cgit v1.2.3