summaryrefslogtreecommitdiff
path: root/deps/gyp/test/msvs/list_excluded
diff options
context:
space:
mode:
authorMike Morris <michael.patrick.morris@gmail.com>2015-12-04 13:29:51 -0500
committerMike Morris <michael.patrick.morris@gmail.com>2015-12-07 15:48:34 -0800
commitd467ae6e7867044b8d7b466776fb37089292c52b (patch)
tree730ee0656e6bf9f0dff33346f07acd800e83ab25 /deps/gyp/test/msvs/list_excluded
parent59ef8da69549cf6308078c6f656affba96e9439e (diff)
downloadqtlocation-mapboxgl-d467ae6e7867044b8d7b466776fb37089292c52b.tar.gz
[core] upgrade gyp to git commit 6fb8bd8
https://chromium.googlesource.com/external/gyp/+/6fb8bd829f0ca8fd432fd85ede788b6881c4f09f
Diffstat (limited to 'deps/gyp/test/msvs/list_excluded')
-rw-r--r--deps/gyp/test/msvs/list_excluded/gyptest-all.py51
-rw-r--r--deps/gyp/test/msvs/list_excluded/hello.cpp10
-rw-r--r--deps/gyp/test/msvs/list_excluded/hello_exclude.gyp19
-rw-r--r--deps/gyp/test/msvs/list_excluded/hello_mac.cpp10
4 files changed, 90 insertions, 0 deletions
diff --git a/deps/gyp/test/msvs/list_excluded/gyptest-all.py b/deps/gyp/test/msvs/list_excluded/gyptest-all.py
new file mode 100644
index 0000000000..5a370f6b47
--- /dev/null
+++ b/deps/gyp/test/msvs/list_excluded/gyptest-all.py
@@ -0,0 +1,51 @@
+#!/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.
+
+"""
+Verifies that msvs_list_excluded_files=0 doesn't list files that would
+normally be in _excluded_files, and that if that flag is not set, then they
+are still listed.
+"""
+
+import os
+import TestGyp
+
+test = TestGyp.TestGyp(formats=['msvs'], workdir='workarea_all')
+
+
+# with the flag set to 0
+try:
+ os.environ['GYP_GENERATOR_FLAGS'] = 'msvs_list_excluded_files=0'
+ test.run_gyp('hello_exclude.gyp')
+finally:
+ del os.environ['GYP_GENERATOR_FLAGS']
+if test.uses_msbuild:
+ test.must_not_contain('hello.vcxproj', 'hello_mac')
+else:
+ test.must_not_contain('hello.vcproj', 'hello_mac')
+
+
+# with the flag not set
+test.run_gyp('hello_exclude.gyp')
+if test.uses_msbuild:
+ test.must_contain('hello.vcxproj', 'hello_mac')
+else:
+ test.must_contain('hello.vcproj', 'hello_mac')
+
+
+# with the flag explicitly set to 1
+try:
+ os.environ['GYP_GENERATOR_FLAGS'] = 'msvs_list_excluded_files=1'
+ test.run_gyp('hello_exclude.gyp')
+finally:
+ del os.environ['GYP_GENERATOR_FLAGS']
+if test.uses_msbuild:
+ test.must_contain('hello.vcxproj', 'hello_mac')
+else:
+ test.must_contain('hello.vcproj', 'hello_mac')
+
+
+test.pass_test()
diff --git a/deps/gyp/test/msvs/list_excluded/hello.cpp b/deps/gyp/test/msvs/list_excluded/hello.cpp
new file mode 100644
index 0000000000..bc0c0265b5
--- /dev/null
+++ b/deps/gyp/test/msvs/list_excluded/hello.cpp
@@ -0,0 +1,10 @@
+// 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.
+
+#include <stdio.h>
+
+int main(void) {
+ printf("Hello, world!\n");
+ return 0;
+}
diff --git a/deps/gyp/test/msvs/list_excluded/hello_exclude.gyp b/deps/gyp/test/msvs/list_excluded/hello_exclude.gyp
new file mode 100644
index 0000000000..aa160f2367
--- /dev/null
+++ b/deps/gyp/test/msvs/list_excluded/hello_exclude.gyp
@@ -0,0 +1,19 @@
+# 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': 'hello',
+ 'type': 'executable',
+ 'sources': [
+ 'hello.cpp',
+ 'hello_mac.cpp',
+ ],
+ 'conditions': [
+ ['OS!="mac"', {'sources!': ['hello_mac.cpp']}],
+ ]
+ },
+ ],
+}
diff --git a/deps/gyp/test/msvs/list_excluded/hello_mac.cpp b/deps/gyp/test/msvs/list_excluded/hello_mac.cpp
new file mode 100644
index 0000000000..b9f6242c4b
--- /dev/null
+++ b/deps/gyp/test/msvs/list_excluded/hello_mac.cpp
@@ -0,0 +1,10 @@
+// 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.
+
+#include <stdio.h>
+
+int hello2() {
+ printf("Hello, two!\n");
+ return 0;
+}