Consolidate windows tests which are divided between mingw and msvc

pull/1955/head
Jon Turney 8 years ago
parent 3fa3922cea
commit 3110c209f7
  1. 11
      test cases/windows/7 mingw dll versioning/installed_files.txt
  2. 55
      test cases/windows/7 mingw dll versioning/meson.build
  3. 0
      test cases/windows/8 dll versioning/copyfile.py
  4. 0
      test cases/windows/8 dll versioning/exe.orig.c
  5. 24
      test cases/windows/8 dll versioning/installed_files.txt
  6. 0
      test cases/windows/8 dll versioning/lib.c
  7. 8
      test cases/windows/8 dll versioning/meson.build
  8. 9
      test cases/windows/8 msvc dll versioning/exe.orig.c
  9. 13
      test cases/windows/8 msvc dll versioning/installed_files.txt
  10. 6
      test cases/windows/8 msvc dll versioning/lib.c

@ -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

@ -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)

@ -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

@ -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',

@ -1,9 +0,0 @@
int myFunc (void);
int
main (int argc, char *argv[])
{
if (myFunc() == 55)
return 0;
return 1;
}

@ -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

@ -1,6 +0,0 @@
#ifdef _WIN32
__declspec(dllexport)
#endif
int myFunc() {
return 55;
}
Loading…
Cancel
Save