summaryrefslogtreecommitdiffstats
path: root/media/webrtc/trunk/tools/gyp/test/toplevel-dir
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/toplevel-dir
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/toplevel-dir')
-rwxr-xr-xmedia/webrtc/trunk/tools/gyp/test/toplevel-dir/gyptest-toplevel-dir.py31
-rw-r--r--media/webrtc/trunk/tools/gyp/test/toplevel-dir/src/sub1/main.gyp18
-rw-r--r--media/webrtc/trunk/tools/gyp/test/toplevel-dir/src/sub1/prog1.c7
-rw-r--r--media/webrtc/trunk/tools/gyp/test/toplevel-dir/src/sub2/prog2.c7
-rw-r--r--media/webrtc/trunk/tools/gyp/test/toplevel-dir/src/sub2/prog2.gyp15
5 files changed, 78 insertions, 0 deletions
diff --git a/media/webrtc/trunk/tools/gyp/test/toplevel-dir/gyptest-toplevel-dir.py b/media/webrtc/trunk/tools/gyp/test/toplevel-dir/gyptest-toplevel-dir.py
new file mode 100755
index 000000000..9e69512dd
--- /dev/null
+++ b/media/webrtc/trunk/tools/gyp/test/toplevel-dir/gyptest-toplevel-dir.py
@@ -0,0 +1,31 @@
+#!/usr/bin/env python
+
+# Copyright (c) 2009 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.
+
+"""
+Verifies building a subsidiary dependent target from a .gyp file in a
+subdirectory, without specifying an explicit output build directory,
+and using the subdirectory's solution or project file as the entry point.
+"""
+
+import TestGyp
+import errno
+
+test = TestGyp.TestGyp(formats=['ninja', 'make'])
+
+# We want our Makefile to be one dir up from main.gyp.
+test.run_gyp('main.gyp', '--toplevel-dir=..', chdir='src/sub1')
+
+toplevel_dir = 'src'
+
+test.build('sub1/main.gyp', test.ALL, chdir=toplevel_dir)
+
+test.built_file_must_exist('prog1', type=test.EXECUTABLE, chdir=toplevel_dir)
+
+test.run_built_executable('prog1',
+ chdir=toplevel_dir,
+ stdout="Hello from prog1.c\n")
+
+test.pass_test()
diff --git a/media/webrtc/trunk/tools/gyp/test/toplevel-dir/src/sub1/main.gyp b/media/webrtc/trunk/tools/gyp/test/toplevel-dir/src/sub1/main.gyp
new file mode 100644
index 000000000..33219010e
--- /dev/null
+++ b/media/webrtc/trunk/tools/gyp/test/toplevel-dir/src/sub1/main.gyp
@@ -0,0 +1,18 @@
+# Copyright (c) 2009 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': 'prog1',
+ 'type': 'executable',
+ 'dependencies': [
+ '<(DEPTH)/../sub2/prog2.gyp:prog2',
+ ],
+ 'sources': [
+ 'prog1.c',
+ ],
+ },
+ ],
+}
diff --git a/media/webrtc/trunk/tools/gyp/test/toplevel-dir/src/sub1/prog1.c b/media/webrtc/trunk/tools/gyp/test/toplevel-dir/src/sub1/prog1.c
new file mode 100644
index 000000000..218e99401
--- /dev/null
+++ b/media/webrtc/trunk/tools/gyp/test/toplevel-dir/src/sub1/prog1.c
@@ -0,0 +1,7 @@
+#include <stdio.h>
+
+int main(void)
+{
+ printf("Hello from prog1.c\n");
+ return 0;
+}
diff --git a/media/webrtc/trunk/tools/gyp/test/toplevel-dir/src/sub2/prog2.c b/media/webrtc/trunk/tools/gyp/test/toplevel-dir/src/sub2/prog2.c
new file mode 100644
index 000000000..12a31883b
--- /dev/null
+++ b/media/webrtc/trunk/tools/gyp/test/toplevel-dir/src/sub2/prog2.c
@@ -0,0 +1,7 @@
+#include <stdio.h>
+
+int main(void)
+{
+ printf("Hello from prog2.c\n");
+ return 0;
+}
diff --git a/media/webrtc/trunk/tools/gyp/test/toplevel-dir/src/sub2/prog2.gyp b/media/webrtc/trunk/tools/gyp/test/toplevel-dir/src/sub2/prog2.gyp
new file mode 100644
index 000000000..593454836
--- /dev/null
+++ b/media/webrtc/trunk/tools/gyp/test/toplevel-dir/src/sub2/prog2.gyp
@@ -0,0 +1,15 @@
+# Copyright (c) 2009 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': 'prog2',
+ 'type': 'executable',
+ 'sources': [
+ 'prog2.c',
+ ],
+ },
+ ],
+}