aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFredrik Salomonsson <plattfot@posteo.net>2022-04-13 12:27:42 -0700
committerEli Schwartz <eschwartz93@gmail.com>2022-04-19 17:35:08 -0400
commit3cac527d9fffb4f47fb6c3e7cfc5e840fec06a85 (patch)
tree3c34515ff0db7ff44535c5957e868b14cd1797cf
parent2e31330fe6126a024be72901286f9ff7e76ea904 (diff)
downloadmeson-3cac527d9fffb4f47fb6c3e7cfc5e840fec06a85.zip
meson-3cac527d9fffb4f47fb6c3e7cfc5e840fec06a85.tar.gz
meson-3cac527d9fffb4f47fb6c3e7cfc5e840fec06a85.tar.bz2
test cases/failing: Add 123 pkgconfig not relocatable outside prefix
Which will check that meson errors out when the install_dir for the pkgconfig file is outside the install prefix.
-rw-r--r--test cases/failing/123 pkgconfig not relocatable outside prefix/meson.build22
-rw-r--r--test cases/failing/123 pkgconfig not relocatable outside prefix/test.json8
2 files changed, 30 insertions, 0 deletions
diff --git a/test cases/failing/123 pkgconfig not relocatable outside prefix/meson.build b/test cases/failing/123 pkgconfig not relocatable outside prefix/meson.build
new file mode 100644
index 0000000..7ebdfc3
--- /dev/null
+++ b/test cases/failing/123 pkgconfig not relocatable outside prefix/meson.build
@@ -0,0 +1,22 @@
+project(
+ 'pkgconfig-not-relocatable-outside-prefix',
+ version : '1.0',
+ default_options: [
+ 'pkgconfig.relocatable=true',
+ ])
+
+pkgg = import('pkgconfig')
+
+# A drive letter is needed on windows for this to be an absolute path.
+if host_machine.system() == 'windows'
+ install_dir = 'C:/opt/lib/pkgconfig'
+else
+ install_dir = '/opt/lib/pkgconfig'
+endif
+
+pkgg.generate(
+ name : 'libsimple',
+ version : '1.0',
+ description : 'A simple pkgconfig file.',
+ install_dir: install_dir,
+)
diff --git a/test cases/failing/123 pkgconfig not relocatable outside prefix/test.json b/test cases/failing/123 pkgconfig not relocatable outside prefix/test.json
new file mode 100644
index 0000000..2ca1320
--- /dev/null
+++ b/test cases/failing/123 pkgconfig not relocatable outside prefix/test.json
@@ -0,0 +1,8 @@
+{
+ "stdout": [
+ {
+ "line": "test cases/failing/123 pkgconfig not relocatable outside prefix/meson\\.build:17:5: ERROR: Pkgconfig prefix cannot be outside of the prefix when pkgconfig\\.relocatable=true. Pkgconfig prefix is (C:)?/opt/lib/pkgconfig.",
+ "match": "re"
+ }
+ ]
+}