diff options
author | Jon Turney <jon.turney@dronecode.org.uk> | 2017-06-22 17:22:51 +0100 |
---|---|---|
committer | Jon Turney <jon.turney@dronecode.org.uk> | 2017-07-20 21:11:56 +0100 |
commit | 3110c209f76b3389c34ce953ae6814ed64d7a898 (patch) | |
tree | 58d64f0b30922d5502c4cb1aa4d35e3478b55e0c | |
parent | 3fa3922cea27026d44aef1cdf3ca92d82adc7ced (diff) | |
download | meson-3110c209f76b3389c34ce953ae6814ed64d7a898.zip meson-3110c209f76b3389c34ce953ae6814ed64d7a898.tar.gz meson-3110c209f76b3389c34ce953ae6814ed64d7a898.tar.bz2 |
Consolidate windows tests which are divided between mingw and msvc
-rw-r--r-- | test cases/windows/7 mingw dll versioning/installed_files.txt | 11 | ||||
-rw-r--r-- | test cases/windows/7 mingw dll versioning/meson.build | 55 | ||||
-rw-r--r-- | test cases/windows/8 dll versioning/copyfile.py (renamed from test cases/windows/8 msvc dll versioning/copyfile.py) | 0 | ||||
-rw-r--r-- | test cases/windows/8 dll versioning/exe.orig.c (renamed from test cases/windows/7 mingw dll versioning/exe.orig.c) | 0 | ||||
-rw-r--r-- | test cases/windows/8 dll versioning/installed_files.txt | 24 | ||||
-rw-r--r-- | test cases/windows/8 dll versioning/lib.c (renamed from test cases/windows/7 mingw dll versioning/lib.c) | 0 | ||||
-rw-r--r-- | test cases/windows/8 dll versioning/meson.build (renamed from test cases/windows/8 msvc dll versioning/meson.build) | 8 | ||||
-rw-r--r-- | test cases/windows/8 msvc dll versioning/exe.orig.c | 9 | ||||
-rw-r--r-- | test cases/windows/8 msvc dll versioning/installed_files.txt | 13 | ||||
-rw-r--r-- | test cases/windows/8 msvc dll versioning/lib.c | 6 |
10 files changed, 26 insertions, 100 deletions
diff --git a/test cases/windows/7 mingw dll versioning/installed_files.txt b/test cases/windows/7 mingw dll versioning/installed_files.txt deleted file mode 100644 index 26e14a7..0000000 --- a/test cases/windows/7 mingw dll versioning/installed_files.txt +++ /dev/null @@ -1,11 +0,0 @@ -usr/bin/?libsome-0.dll -usr/lib/libsome.dll.a -usr/bin/?libnoversion.dll -usr/lib/libnoversion.dll.a -usr/bin/?libonlyversion-1.dll -usr/lib/libonlyversion.dll.a -usr/bin/?libonlysoversion-5.dll -usr/lib/libonlysoversion.dll.a -usr/libexec/?libcustomdir.dll -usr/libexec/libcustomdir.dll.a -usr/lib/?libmodule.dll diff --git a/test cases/windows/7 mingw dll versioning/meson.build b/test cases/windows/7 mingw dll versioning/meson.build deleted file mode 100644 index 1d6562c..0000000 --- a/test cases/windows/7 mingw dll versioning/meson.build +++ /dev/null @@ -1,55 +0,0 @@ -project('mingw dll versioning', 'c') - -cc = meson.get_compiler('c') - -if cc.get_id() == 'msvc' - error('MESON_SKIP_TEST: test is only for MinGW') -endif - -# Test that MinGW/GCC creates correctly-named dll files and dll.a files, -# and also installs them in the right place -some = shared_library('some', 'lib.c', - version : '1.2.3', - soversion : '0', - install : true) - -noversion = shared_library('noversion', 'lib.c', - install : true) - -onlyversion = shared_library('onlyversion', 'lib.c', - version : '1.4.5', - install : true) - -onlysoversion = shared_library('onlysoversion', 'lib.c', - # Also test that int soversion is acceptable - soversion : 5, - install : true) - -# Hack to make the executables below depend on the shared libraries above -# without actually adding them as `link_with` dependencies since we want to try -# linking to them with -lfoo linker arguments. -out = custom_target('library-dependency-hack', - input : 'exe.orig.c', - output : 'exe.c', - depends : [some, noversion, onlyversion, onlysoversion], - command : ['cp', '@INPUT@', '@OUTPUT@']) - -# Manually test if the linker can find the above libraries -# i.e., whether they were generated with the right naming scheme -test('manually linked 1', executable('manuallink1', out, - link_args : ['-L.', '-lsome'])) - -test('manually linked 2', executable('manuallink2', out, - link_args : ['-L.', '-lnoversion'])) - -test('manually linked 3', executable('manuallink3', out, - link_args : ['-L.', '-lonlyversion'])) - -test('manually linked 4', executable('manuallink4', out, - link_args : ['-L.', '-lonlysoversion'])) - -shared_library('customdir', 'lib.c', - install : true, - install_dir : get_option('libexecdir')) - -shared_module('module', 'lib.c', install : true) diff --git a/test cases/windows/8 msvc dll versioning/copyfile.py b/test cases/windows/8 dll versioning/copyfile.py index ff42ac3..ff42ac3 100644 --- a/test cases/windows/8 msvc dll versioning/copyfile.py +++ b/test cases/windows/8 dll versioning/copyfile.py diff --git a/test cases/windows/7 mingw dll versioning/exe.orig.c b/test cases/windows/8 dll versioning/exe.orig.c index 86c4adc..86c4adc 100644 --- a/test cases/windows/7 mingw dll versioning/exe.orig.c +++ b/test cases/windows/8 dll versioning/exe.orig.c diff --git a/test cases/windows/8 dll versioning/installed_files.txt b/test cases/windows/8 dll versioning/installed_files.txt new file mode 100644 index 0000000..a1e9b2d --- /dev/null +++ b/test cases/windows/8 dll versioning/installed_files.txt @@ -0,0 +1,24 @@ +?msvc:usr/bin/some-0.dll +?msvc:usr/bin/some-0.pdb +?msvc:usr/lib/some.lib +?msvc:usr/bin/noversion.dll +?msvc:usr/bin/noversion.pdb +?msvc:usr/lib/noversion.lib +?msvc:usr/bin/onlyversion-1.dll +?msvc:usr/lib/onlyversion.lib +?msvc:usr/bin/onlysoversion-5.dll +?msvc:usr/lib/onlysoversion.lib +?msvc:usr/libexec/customdir.dll +?msvc:usr/libexec/customdir.lib +?msvc:usr/lib/module.dll +?gcc:usr/bin/?libsome-0.dll +?gcc:usr/lib/libsome.dll.a +?gcc:usr/bin/?libnoversion.dll +?gcc:usr/lib/libnoversion.dll.a +?gcc:usr/bin/?libonlyversion-1.dll +?gcc:usr/lib/libonlyversion.dll.a +?gcc:usr/bin/?libonlysoversion-5.dll +?gcc:usr/lib/libonlysoversion.dll.a +?gcc:usr/libexec/?libcustomdir.dll +?gcc:usr/libexec/libcustomdir.dll.a +?gcc:usr/lib/?libmodule.dll diff --git a/test cases/windows/7 mingw dll versioning/lib.c b/test cases/windows/8 dll versioning/lib.c index cf7dfdd..cf7dfdd 100644 --- a/test cases/windows/7 mingw dll versioning/lib.c +++ b/test cases/windows/8 dll versioning/lib.c diff --git a/test cases/windows/8 msvc dll versioning/meson.build b/test cases/windows/8 dll versioning/meson.build index 4074747..80acf88 100644 --- a/test cases/windows/8 msvc dll versioning/meson.build +++ b/test cases/windows/8 dll versioning/meson.build @@ -2,12 +2,8 @@ project('msvc dll versioning', 'c') cc = meson.get_compiler('c') -if cc.get_id() != 'msvc' - error('MESON_SKIP_TEST: test is only for msvc') -endif - -# Test that MSVC creates correctly-named dll files and .lib files, -# and also installs them in the right place +# Test that we create correctly-named dll and import lib files, +# and also install them in the right place some = shared_library('some', 'lib.c', version : '1.2.3', soversion : '0', diff --git a/test cases/windows/8 msvc dll versioning/exe.orig.c b/test cases/windows/8 msvc dll versioning/exe.orig.c deleted file mode 100644 index 86c4adc..0000000 --- a/test cases/windows/8 msvc dll versioning/exe.orig.c +++ /dev/null @@ -1,9 +0,0 @@ -int myFunc (void); - -int -main (int argc, char *argv[]) -{ - if (myFunc() == 55) - return 0; - return 1; -} diff --git a/test cases/windows/8 msvc dll versioning/installed_files.txt b/test cases/windows/8 msvc dll versioning/installed_files.txt deleted file mode 100644 index df43343..0000000 --- a/test cases/windows/8 msvc dll versioning/installed_files.txt +++ /dev/null @@ -1,13 +0,0 @@ -usr/bin/some-0.dll -usr/bin/some-0.pdb -usr/lib/some.lib -usr/bin/noversion.dll -usr/bin/noversion.pdb -usr/lib/noversion.lib -usr/bin/onlyversion-1.dll -usr/lib/onlyversion.lib -usr/bin/onlysoversion-5.dll -usr/lib/onlysoversion.lib -usr/libexec/customdir.dll -usr/libexec/customdir.lib -usr/lib/module.dll diff --git a/test cases/windows/8 msvc dll versioning/lib.c b/test cases/windows/8 msvc dll versioning/lib.c deleted file mode 100644 index cf7dfdd..0000000 --- a/test cases/windows/8 msvc dll versioning/lib.c +++ /dev/null @@ -1,6 +0,0 @@ -#ifdef _WIN32 -__declspec(dllexport) -#endif -int myFunc() { - return 55; -} |