From 3cac527d9fffb4f47fb6c3e7cfc5e840fec06a85 Mon Sep 17 00:00:00 2001 From: Fredrik Salomonsson Date: Wed, 13 Apr 2022 12:27:42 -0700 Subject: 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. --- .../meson.build | 22 ++++++++++++++++++++++ .../test.json | 8 ++++++++ 2 files changed, 30 insertions(+) create mode 100644 test cases/failing/123 pkgconfig not relocatable outside prefix/meson.build create mode 100644 test cases/failing/123 pkgconfig not relocatable outside prefix/test.json 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" + } + ] +} -- cgit v1.1