aboutsummaryrefslogtreecommitdiff
path: root/test cases
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2021-03-15 11:53:34 +0200
committerJussi Pakkanen <jpakkane@gmail.com>2021-03-17 15:10:30 +0200
commitfe4ddb5268dd00b229b2b15e80169aee827b8add (patch)
tree9753340c6ce6a2c670bcf0ac8bab6f7df70e18c5 /test cases
parent639063db7f095d7e1c1b5054a488fb6992b1051d (diff)
downloadmeson-fe4ddb5268dd00b229b2b15e80169aee827b8add.zip
meson-fe4ddb5268dd00b229b2b15e80169aee827b8add.tar.gz
meson-fe4ddb5268dd00b229b2b15e80169aee827b8add.tar.bz2
Warn when grabbing internals of subprojects with include_directories.
Diffstat (limited to 'test cases')
-rw-r--r--test cases/common/240 includedir violation/meson.build7
-rw-r--r--test cases/common/240 includedir violation/subprojects/sub/include/placeholder.h3
-rw-r--r--test cases/common/240 includedir violation/subprojects/sub/meson.build3
-rw-r--r--test cases/common/240 includedir violation/test.json7
4 files changed, 20 insertions, 0 deletions
diff --git a/test cases/common/240 includedir violation/meson.build b/test cases/common/240 includedir violation/meson.build
new file mode 100644
index 0000000..a82069e
--- /dev/null
+++ b/test cases/common/240 includedir violation/meson.build
@@ -0,0 +1,7 @@
+project('foo', 'c')
+
+# This is here rather than in failing because this needs a
+# transition period to avoid breaking existing projects.
+# Once this becomes an error, move this under failing tests.
+
+inc = include_directories('subprojects/sub/include')
diff --git a/test cases/common/240 includedir violation/subprojects/sub/include/placeholder.h b/test cases/common/240 includedir violation/subprojects/sub/include/placeholder.h
new file mode 100644
index 0000000..196f917
--- /dev/null
+++ b/test cases/common/240 includedir violation/subprojects/sub/include/placeholder.h
@@ -0,0 +1,3 @@
+#pragma once
+
+// Git can not handle empty directories, so there must be something here.
diff --git a/test cases/common/240 includedir violation/subprojects/sub/meson.build b/test cases/common/240 includedir violation/subprojects/sub/meson.build
new file mode 100644
index 0000000..7211018
--- /dev/null
+++ b/test cases/common/240 includedir violation/subprojects/sub/meson.build
@@ -0,0 +1,3 @@
+project('subproj', 'c')
+
+# This is never actually executed, just here for completeness.
diff --git a/test cases/common/240 includedir violation/test.json b/test cases/common/240 includedir violation/test.json
new file mode 100644
index 0000000..d6e56a3
--- /dev/null
+++ b/test cases/common/240 includedir violation/test.json
@@ -0,0 +1,7 @@
+{
+ "stdout": [
+ {
+ "line": "WARNING: include_directories sandbox violation!"
+ }
+ ]
+}