diff options
author | Angelos Mouzakitis <a.mouzakitis@virtualopensystems.com> | 2023-10-10 14:33:42 +0000 |
---|---|---|
committer | Angelos Mouzakitis <a.mouzakitis@virtualopensystems.com> | 2023-10-10 14:33:42 +0000 |
commit | af1a266670d040d2f4083ff309d732d648afba2a (patch) | |
tree | 2fc46203448ddcc6f81546d379abfaeb323575e9 /meson/test cases/linuxlike/11 runpath rpath ldlibrarypath | |
parent | e02cda008591317b1625707ff8e115a4841aa889 (diff) |
Change-Id: Iaf8d18082d3991dec7c0ebbea540f092188eb4ec
Diffstat (limited to 'meson/test cases/linuxlike/11 runpath rpath ldlibrarypath')
5 files changed, 35 insertions, 0 deletions
diff --git a/meson/test cases/linuxlike/11 runpath rpath ldlibrarypath/lib.c b/meson/test cases/linuxlike/11 runpath rpath ldlibrarypath/lib.c new file mode 100644 index 000000000..2784e017b --- /dev/null +++ b/meson/test cases/linuxlike/11 runpath rpath ldlibrarypath/lib.c @@ -0,0 +1,3 @@ +int some_symbol (void) { + return RET_VALUE; +} diff --git a/meson/test cases/linuxlike/11 runpath rpath ldlibrarypath/lib1/meson.build b/meson/test cases/linuxlike/11 runpath rpath ldlibrarypath/lib1/meson.build new file mode 100644 index 000000000..cbc75bdb1 --- /dev/null +++ b/meson/test cases/linuxlike/11 runpath rpath ldlibrarypath/lib1/meson.build @@ -0,0 +1,2 @@ +lib1 = shared_library('testeh', libsrc, + c_args : '-DRET_VALUE=1') diff --git a/meson/test cases/linuxlike/11 runpath rpath ldlibrarypath/lib2/meson.build b/meson/test cases/linuxlike/11 runpath rpath ldlibrarypath/lib2/meson.build new file mode 100644 index 000000000..f2c6dcc4d --- /dev/null +++ b/meson/test cases/linuxlike/11 runpath rpath ldlibrarypath/lib2/meson.build @@ -0,0 +1,3 @@ +lib2 = shared_library('esteh', libsrc, + name_prefix : 'libt', + c_args : '-DRET_VALUE=2') diff --git a/meson/test cases/linuxlike/11 runpath rpath ldlibrarypath/main.c b/meson/test cases/linuxlike/11 runpath rpath ldlibrarypath/main.c new file mode 100644 index 000000000..500953169 --- /dev/null +++ b/meson/test cases/linuxlike/11 runpath rpath ldlibrarypath/main.c @@ -0,0 +1,11 @@ +#include <stdio.h> + +int some_symbol (void); + +int main () { + int ret = some_symbol (); + if (ret == 1) + return 0; + fprintf (stderr, "ret was %i instead of 1\n", ret); + return -1; +} diff --git a/meson/test cases/linuxlike/11 runpath rpath ldlibrarypath/meson.build b/meson/test cases/linuxlike/11 runpath rpath ldlibrarypath/meson.build new file mode 100644 index 000000000..a3103acfa --- /dev/null +++ b/meson/test cases/linuxlike/11 runpath rpath ldlibrarypath/meson.build @@ -0,0 +1,16 @@ +project('runpath rpath ldlibrarypath', 'c') + +error('MESON_SKIP_TEST test disabled due to bug #1635.') + +libsrc = files('lib.c') + +subdir('lib1') +subdir('lib2') + +lib2dir = meson.current_build_dir() + '/lib2' + +e = executable('testexe', 'main.c', + link_with : lib1) + +test('ld-library-path-test', e, + env : ['LD_LIBRARY_PATH=' + lib2dir]) |