summaryrefslogtreecommitdiffstats
path: root/third_party/python/gyp/test/variables/commands/repeated_multidir
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
commit26a029d407be480d791972afb5975cf62c9360a6 (patch)
treef435a8308119effd964b339f76abb83a57c29483 /third_party/python/gyp/test/variables/commands/repeated_multidir
parentInitial commit. (diff)
downloadfirefox-26a029d407be480d791972afb5975cf62c9360a6.tar.xz
firefox-26a029d407be480d791972afb5975cf62c9360a6.zip
Adding upstream version 124.0.1.upstream/124.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'third_party/python/gyp/test/variables/commands/repeated_multidir')
-rw-r--r--third_party/python/gyp/test/variables/commands/repeated_multidir/dir_1/test_1.gyp13
-rw-r--r--third_party/python/gyp/test/variables/commands/repeated_multidir/dir_2/test_2.gyp13
-rw-r--r--third_party/python/gyp/test/variables/commands/repeated_multidir/main.gyp16
-rwxr-xr-xthird_party/python/gyp/test/variables/commands/repeated_multidir/print_cwd_basename.py11
-rw-r--r--third_party/python/gyp/test/variables/commands/repeated_multidir/repeated_command_common.gypi25
5 files changed, 78 insertions, 0 deletions
diff --git a/third_party/python/gyp/test/variables/commands/repeated_multidir/dir_1/test_1.gyp b/third_party/python/gyp/test/variables/commands/repeated_multidir/dir_1/test_1.gyp
new file mode 100644
index 0000000000..328fc306cd
--- /dev/null
+++ b/third_party/python/gyp/test/variables/commands/repeated_multidir/dir_1/test_1.gyp
@@ -0,0 +1,13 @@
+# Copyright 2014 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.
+
+{
+ 'variables': {
+ 'expected_value': 'dir_1',
+ 'target_name': 'target_1',
+ },
+ 'includes': [
+ '../repeated_command_common.gypi',
+ ],
+}
diff --git a/third_party/python/gyp/test/variables/commands/repeated_multidir/dir_2/test_2.gyp b/third_party/python/gyp/test/variables/commands/repeated_multidir/dir_2/test_2.gyp
new file mode 100644
index 0000000000..18e0c62c93
--- /dev/null
+++ b/third_party/python/gyp/test/variables/commands/repeated_multidir/dir_2/test_2.gyp
@@ -0,0 +1,13 @@
+# Copyright 2014 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.
+
+{
+ 'variables': {
+ 'expected_value': 'dir_2',
+ 'target_name': 'target_2',
+ },
+ 'includes': [
+ '../repeated_command_common.gypi',
+ ],
+}
diff --git a/third_party/python/gyp/test/variables/commands/repeated_multidir/main.gyp b/third_party/python/gyp/test/variables/commands/repeated_multidir/main.gyp
new file mode 100644
index 0000000000..5beeeb7244
--- /dev/null
+++ b/third_party/python/gyp/test/variables/commands/repeated_multidir/main.gyp
@@ -0,0 +1,16 @@
+# Copyright 2014 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': 'main',
+ 'type': 'none',
+ 'dependencies': [
+ 'dir_1/test_1.gyp:target_1',
+ 'dir_2/test_2.gyp:target_2',
+ ],
+ },
+ ],
+}
diff --git a/third_party/python/gyp/test/variables/commands/repeated_multidir/print_cwd_basename.py b/third_party/python/gyp/test/variables/commands/repeated_multidir/print_cwd_basename.py
new file mode 100755
index 0000000000..9b206bb3d4
--- /dev/null
+++ b/third_party/python/gyp/test/variables/commands/repeated_multidir/print_cwd_basename.py
@@ -0,0 +1,11 @@
+#!/usr/bin/env python
+
+# Copyright 2014 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.
+
+from __future__ import print_function
+import os
+import os.path
+
+print(os.path.basename(os.getcwd()))
diff --git a/third_party/python/gyp/test/variables/commands/repeated_multidir/repeated_command_common.gypi b/third_party/python/gyp/test/variables/commands/repeated_multidir/repeated_command_common.gypi
new file mode 100644
index 0000000000..74366771aa
--- /dev/null
+++ b/third_party/python/gyp/test/variables/commands/repeated_multidir/repeated_command_common.gypi
@@ -0,0 +1,25 @@
+# Copyright 2014 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.
+
+{
+ 'variables': {
+ # This command will be run from the directories of the .gyp files that
+ # include this .gypi, the subdirectories dir_1 and dir_2, so use a
+ # relative path from those directories to the script.
+ 'observed_value': '<!(python ../print_cwd_basename.py)',
+ },
+ 'targets': [
+ {
+ 'target_name': '<(target_name)',
+ 'type': 'none',
+ 'conditions': [
+ ['observed_value != expected_value', {
+ # Attempt to expand an undefined variable. This triggers a GYP
+ # error.
+ 'assertion': '<(observed_value_must_equal_expected_value)',
+ }],
+ ],
+ },
+ ],
+}