From 45c8557dc67b7e8af8cef1aeb8b662dc9a6a4286 Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Fri, 1 Jul 2016 14:43:51 +0530 Subject: [PATCH] Fix tests for the new library/executable naming scheme Also add new tests for the platform-specific and compiler-specific versioning scheme. A rough summary is: 1. A bug in how run_tests.py:validate_install checked for files has been fixed. Earlier it wasn't checking the install directory properly. 2. Shared libraries are no longer installed in common tests, and the library name/path testing is now done in platform-specific tests. 3. Executables are now always called something?exe in the installed_files.txt file, and the suffix automatically corrected depending on the platform. 4. If a test installs a file called 'no-installed-files', the installed files for that test are not validated. This is required to implement compiler-specific tests for library names/paths such as MSVC vs MinGW 5. The platform-specific file renaming in run_tests.py has been mostly removed since it is broken for shared libraries and isn't needed for static libraries. 6. run_tests.py now reports all missing and extra files. The logic for finding these has been reworked. --- run_tests.py | 66 ++++++++++--------- .../27 library versions/installed_files.txt | 4 +- .../common/27 library versions/meson.build | 9 +-- .../46 library chain/installed_files.txt | 5 +- .../46 library chain/subdir/meson.build | 2 +- .../subdir/subdir2/meson.build | 2 +- .../subdir/subdir3/meson.build | 2 +- .../common/49 subproject/installed_files.txt | 3 +- .../subprojects/sublib/meson.build | 2 +- .../51 pkgconfig-gen/installed_files.txt | 1 - .../common/51 pkgconfig-gen/meson.build | 2 +- .../installed_files.txt | 2 +- .../common/6 linkshared/installed_files.txt | 3 +- test cases/common/6 linkshared/meson.build | 2 +- .../60 install script/installed_files.txt | 2 +- .../common/60 install script/meson.build | 2 +- .../common/60 install script/myinstall.bat | 3 - .../common/60 install script/myinstall.sh | 4 +- .../60 install script/no-installed-files | 0 .../common/67 foreach/installed_files.txt | 6 +- .../common/8 install/installed_files.txt | 3 +- test cases/common/8 install/meson.build | 1 - test cases/common/8 install/shar.c | 1 - .../csharp/2 library/installed_files.txt | 2 +- .../7 library versions/installed_files.txt | 9 +++ test cases/linuxlike/7 library versions/lib.c | 3 + .../linuxlike/7 library versions/meson.build | 18 +++++ .../2 library versions/installed_files.txt | 4 ++ test cases/osx/2 library versions/lib.c | 3 + test cases/osx/2 library versions/meson.build | 18 +++++ test cases/rust/1 basic/installed_files.txt | 2 +- .../rust/2 sharedlib/installed_files.txt | 2 +- .../rust/3 staticlib/installed_files.txt | 2 +- .../installed_files.txt | 4 ++ .../windows/7 mingw dll versioning/lib.c | 6 ++ .../7 mingw dll versioning/meson.build | 17 +++++ .../7 mingw dll versioning/no-installed-files | 0 .../8 msvc dll versioning/installed_files.txt | 4 ++ .../windows/8 msvc dll versioning/lib.c | 6 ++ .../windows/8 msvc dll versioning/meson.build | 16 +++++ .../8 msvc dll versioning/no-installed-files | 0 41 files changed, 171 insertions(+), 72 deletions(-) delete mode 100644 test cases/common/60 install script/myinstall.bat create mode 100644 test cases/common/60 install script/no-installed-files delete mode 100644 test cases/common/8 install/shar.c create mode 100644 test cases/linuxlike/7 library versions/installed_files.txt create mode 100644 test cases/linuxlike/7 library versions/lib.c create mode 100644 test cases/linuxlike/7 library versions/meson.build create mode 100644 test cases/osx/2 library versions/installed_files.txt create mode 100644 test cases/osx/2 library versions/lib.c create mode 100644 test cases/osx/2 library versions/meson.build create mode 100644 test cases/windows/7 mingw dll versioning/installed_files.txt create mode 100644 test cases/windows/7 mingw dll versioning/lib.c create mode 100644 test cases/windows/7 mingw dll versioning/meson.build create mode 100644 test cases/windows/7 mingw dll versioning/no-installed-files create mode 100644 test cases/windows/8 msvc dll versioning/installed_files.txt create mode 100644 test cases/windows/8 msvc dll versioning/lib.c create mode 100644 test cases/windows/8 msvc dll versioning/meson.build create mode 100644 test cases/windows/8 msvc dll versioning/no-installed-files diff --git a/run_tests.py b/run_tests.py index 6f51a196b..1130badd4 100755 --- a/run_tests.py +++ b/run_tests.py @@ -124,44 +124,50 @@ def setup_commands(backend): test_commands = [ninja_command, 'test', 'benchmark'] install_commands = [ninja_command, 'install'] -def platform_fix_filename(fname): - if mesonlib.is_osx(): - if fname.endswith('.so'): - return fname[:-2] + 'dylib' - return fname.replace('.so.', '.dylib.') - elif mesonlib.is_windows(): - if fname.endswith('.so'): - (p, f) = os.path.split(fname) - f = f[3:-2] + 'dll' - return os.path.join(p, f) - if fname.endswith('.a'): - return fname[:-1] + 'lib' +def get_relative_files_list_from_dir(fromdir): + paths = [] + for (root, _, files) in os.walk(fromdir): + reldir = os.path.relpath(root, start=fromdir) + for f in files: + path = os.path.join(reldir, f).replace('\\', '/') + if path.startswith('./'): + path = path[2:] + paths.append(path) + return paths + +def platform_fix_exe_name(fname): + if not fname.endswith('?exe'): + return fname + fname = fname[:-4] + if mesonlib.is_windows(): + return fname + '.exe' return fname def validate_install(srcdir, installdir): - if mesonlib.is_windows(): - # Don't really know how Windows installs should work - # so skip. - return '' info_file = os.path.join(srcdir, 'installed_files.txt') expected = {} found = {} + ret_msg = '' + # Test expects to not install any files + if os.path.exists(os.path.join(installdir, 'usr', 'no-installed-files')): + return '' + # Generate list of expected files if os.path.exists(info_file): for line in open(info_file): - expected[platform_fix_filename(line.strip())] = True - for root, _, files in os.walk(installdir): - for fname in files: - found_name = os.path.join(root, fname)[len(installdir)+1:] - found[found_name] = True - expected = set(expected) - found = set(found) - missing = expected - found - for fname in missing: - return 'Expected file %s missing.' % fname - extra = found - expected - for fname in extra: - return 'Found extra file %s.' % fname - return '' + expected[platform_fix_exe_name(line.strip())] = False + # Check if expected files were found + for fname in expected: + if os.path.exists(os.path.join(installdir, fname)): + expected[fname] = True + for (fname, found) in expected.items(): + if not found: + ret_msg += 'Expected file {0} missing.\n'.format(fname) + # Check if there are any unexpected files + found = get_relative_files_list_from_dir(installdir) + for fname in found: + if fname not in expected: + ret_msg += 'Extra file {0} found.\n'.format(fname) + return ret_msg def log_text_file(logfile, testdir, stdo, stde): global stop, executor, futures diff --git a/test cases/common/27 library versions/installed_files.txt b/test cases/common/27 library versions/installed_files.txt index a218d29eb..e10d1ddee 100644 --- a/test cases/common/27 library versions/installed_files.txt +++ b/test cases/common/27 library versions/installed_files.txt @@ -1,3 +1 @@ -usr/lib/libsomelib.so -usr/lib/libsomelib.so.0 -usr/lib/libsomelib.so.1.2.3 +usr/lib/prefixsomelib.suffix diff --git a/test cases/common/27 library versions/meson.build b/test cases/common/27 library versions/meson.build index cebcd64c6..3b2c6e9ea 100644 --- a/test cases/common/27 library versions/meson.build +++ b/test cases/common/27 library versions/meson.build @@ -1,6 +1,7 @@ project('library versions', 'c') -lib = shared_library('somelib', 'lib.c', \ -version : '1.2.3', \ -soversion : '0', \ -install : true) +shared_library('somelib', 'lib.c', + name_prefix : 'prefix', + name_suffix : 'suffix', + install_dir : 'lib', + install : true) diff --git a/test cases/common/46 library chain/installed_files.txt b/test cases/common/46 library chain/installed_files.txt index 8d38fd975..c7dab9f6f 100644 --- a/test cases/common/46 library chain/installed_files.txt +++ b/test cases/common/46 library chain/installed_files.txt @@ -1,4 +1 @@ -usr/bin/prog -usr/lib/liblib1.so -usr/lib/liblib2.so -usr/lib/liblib3.so +usr/bin/prog?exe diff --git a/test cases/common/46 library chain/subdir/meson.build b/test cases/common/46 library chain/subdir/meson.build index c165abef9..ab71bda18 100644 --- a/test cases/common/46 library chain/subdir/meson.build +++ b/test cases/common/46 library chain/subdir/meson.build @@ -1,4 +1,4 @@ subdir('subdir2') subdir('subdir3') -lib1 = shared_library('lib1', 'lib1.c', install : true, link_with : [lib2, lib3]) +lib1 = shared_library('lib1', 'lib1.c', install : false, link_with : [lib2, lib3]) diff --git a/test cases/common/46 library chain/subdir/subdir2/meson.build b/test cases/common/46 library chain/subdir/subdir2/meson.build index 2281e4b95..befd94db8 100644 --- a/test cases/common/46 library chain/subdir/subdir2/meson.build +++ b/test cases/common/46 library chain/subdir/subdir2/meson.build @@ -1 +1 @@ -lib2 = shared_library('lib2', 'lib2.c', install : true) +lib2 = shared_library('lib2', 'lib2.c', install : false) diff --git a/test cases/common/46 library chain/subdir/subdir3/meson.build b/test cases/common/46 library chain/subdir/subdir3/meson.build index f049c7901..7bd249a29 100644 --- a/test cases/common/46 library chain/subdir/subdir3/meson.build +++ b/test cases/common/46 library chain/subdir/subdir3/meson.build @@ -1 +1 @@ -lib3 = shared_library('lib3', 'lib3.c', install : true) +lib3 = shared_library('lib3', 'lib3.c', install : false) diff --git a/test cases/common/49 subproject/installed_files.txt b/test cases/common/49 subproject/installed_files.txt index f2e1e2709..dc09fb727 100644 --- a/test cases/common/49 subproject/installed_files.txt +++ b/test cases/common/49 subproject/installed_files.txt @@ -1,3 +1,2 @@ -usr/bin/user -usr/lib/libsublib.so +usr/bin/user?exe usr/share/sublib/sublib.depmf diff --git a/test cases/common/49 subproject/subprojects/sublib/meson.build b/test cases/common/49 subproject/subprojects/sublib/meson.build index 269f8157f..acaf1bf38 100644 --- a/test cases/common/49 subproject/subprojects/sublib/meson.build +++ b/test cases/common/49 subproject/subprojects/sublib/meson.build @@ -13,7 +13,7 @@ if meson.project_version() != '1.0.0' endif i = include_directories('include') -l = shared_library('sublib', 'sublib.c', include_directories : i, install : true, +l = shared_library('sublib', 'sublib.c', include_directories : i, install : false, c_args : '-DBUILDING_SUB=2') t = executable('simpletest', 'simpletest.c', include_directories : i, link_with : l) test('plain', t) diff --git a/test cases/common/51 pkgconfig-gen/installed_files.txt b/test cases/common/51 pkgconfig-gen/installed_files.txt index cc5d34ba3..d6a23d716 100644 --- a/test cases/common/51 pkgconfig-gen/installed_files.txt +++ b/test cases/common/51 pkgconfig-gen/installed_files.txt @@ -1,3 +1,2 @@ usr/include/simple.h -usr/lib/libsimple.so usr/lib/pkgconfig/simple.pc diff --git a/test cases/common/51 pkgconfig-gen/meson.build b/test cases/common/51 pkgconfig-gen/meson.build index 4044b3db7..b5f692105 100644 --- a/test cases/common/51 pkgconfig-gen/meson.build +++ b/test cases/common/51 pkgconfig-gen/meson.build @@ -2,7 +2,7 @@ project('pkgconfig-gen', 'c') pkgg = import('pkgconfig') -lib = shared_library('simple', 'simple.c', install : true) +lib = shared_library('simple', 'simple.c') libver = '1.0' h = install_headers('simple.h') diff --git a/test cases/common/52 custom install dirs/installed_files.txt b/test cases/common/52 custom install dirs/installed_files.txt index dc495e2b7..1b8b561d3 100644 --- a/test cases/common/52 custom install dirs/installed_files.txt +++ b/test cases/common/52 custom install dirs/installed_files.txt @@ -1,4 +1,4 @@ -usr/dib/dab/dub/prog +usr/dib/dab/dub/prog?exe usr/some/dir/sample.h usr/woman/prog.1.gz usr/meow/datafile.cat diff --git a/test cases/common/6 linkshared/installed_files.txt b/test cases/common/6 linkshared/installed_files.txt index 2a4c33005..c7dab9f6f 100644 --- a/test cases/common/6 linkshared/installed_files.txt +++ b/test cases/common/6 linkshared/installed_files.txt @@ -1,2 +1 @@ -usr/bin/prog -usr/lib/libmylib.so +usr/bin/prog?exe diff --git a/test cases/common/6 linkshared/meson.build b/test cases/common/6 linkshared/meson.build index 1ecb05238..846b4a09b 100644 --- a/test cases/common/6 linkshared/meson.build +++ b/test cases/common/6 linkshared/meson.build @@ -2,7 +2,7 @@ project('shared library linking test', 'c', 'cpp') lib = shared_library('mylib', 'libfile.c' # Split to different lines before and after the comma to test parser. - , install : true) + , install : false) # Don't install libraries in common tests; the path is platform-specific exe = executable('prog', 'main.c', link_with : lib, install : true) test('runtest', exe) diff --git a/test cases/common/60 install script/installed_files.txt b/test cases/common/60 install script/installed_files.txt index 58315f9f4..94e3164f6 100644 --- a/test cases/common/60 install script/installed_files.txt +++ b/test cases/common/60 install script/installed_files.txt @@ -1,2 +1,2 @@ -usr/bin/prog +usr/bin/prog?exe usr/diiba/daaba/file.dat diff --git a/test cases/common/60 install script/meson.build b/test cases/common/60 install script/meson.build index 66db0a75d..cb87e450a 100644 --- a/test cases/common/60 install script/meson.build +++ b/test cases/common/60 install script/meson.build @@ -1,7 +1,7 @@ project('custom install script', 'c') if meson.get_compiler('c').get_id() == 'msvc' - meson.add_install_script('myinstall.bat') + install_data('no-installed-files', install_dir : '') else meson.add_install_script('myinstall.sh') endif diff --git a/test cases/common/60 install script/myinstall.bat b/test cases/common/60 install script/myinstall.bat deleted file mode 100644 index 703607773..000000000 --- a/test cases/common/60 install script/myinstall.bat +++ /dev/null @@ -1,3 +0,0 @@ -@ECHO OFF - -echo At this point we could do something. diff --git a/test cases/common/60 install script/myinstall.sh b/test cases/common/60 install script/myinstall.sh index 42a415e0e..79512c9e4 100755 --- a/test cases/common/60 install script/myinstall.sh +++ b/test cases/common/60 install script/myinstall.sh @@ -4,9 +4,7 @@ set -eu echo Starting custom installation step -# These commands fail on Windows, but we don't really care. - mkdir -p "${DESTDIR}${MESON_INSTALL_PREFIX}/diiba/daaba" touch "${DESTDIR}${MESON_INSTALL_PREFIX}/diiba/daaba/file.dat" -echo Finishing custom install step +echo Finished custom install step diff --git a/test cases/common/60 install script/no-installed-files b/test cases/common/60 install script/no-installed-files new file mode 100644 index 000000000..e69de29bb diff --git a/test cases/common/67 foreach/installed_files.txt b/test cases/common/67 foreach/installed_files.txt index 36c638681..2930ff087 100644 --- a/test cases/common/67 foreach/installed_files.txt +++ b/test cases/common/67 foreach/installed_files.txt @@ -1,3 +1,3 @@ -usr/bin/prog1 -usr/bin/prog2 -usr/bin/prog3 +usr/bin/prog1?exe +usr/bin/prog2?exe +usr/bin/prog3?exe diff --git a/test cases/common/8 install/installed_files.txt b/test cases/common/8 install/installed_files.txt index 1e9166b51..3bc66ab87 100644 --- a/test cases/common/8 install/installed_files.txt +++ b/test cases/common/8 install/installed_files.txt @@ -1,3 +1,2 @@ -usr/bin/prog -usr/lib/libshar.so +usr/bin/prog?exe usr/lib/libstat.a diff --git a/test cases/common/8 install/meson.build b/test cases/common/8 install/meson.build index 677a2eeaa..92ff3a0e2 100644 --- a/test cases/common/8 install/meson.build +++ b/test cases/common/8 install/meson.build @@ -1,5 +1,4 @@ project('install test', 'c') stlib = static_library('stat', 'stat.c', install : true) -shlib = shared_library('shar', 'shar.c', install : true) exe = executable('prog', 'prog.c', install : true) diff --git a/test cases/common/8 install/shar.c b/test cases/common/8 install/shar.c deleted file mode 100644 index 9c816a625..000000000 --- a/test cases/common/8 install/shar.c +++ /dev/null @@ -1 +0,0 @@ -int func() { return 15; } diff --git a/test cases/csharp/2 library/installed_files.txt b/test cases/csharp/2 library/installed_files.txt index b8306347e..4ebea55d1 100644 --- a/test cases/csharp/2 library/installed_files.txt +++ b/test cases/csharp/2 library/installed_files.txt @@ -1,2 +1,2 @@ usr/bin/prog.exe -usr/lib/libhelper.dll +usr/lib/helper.dll diff --git a/test cases/linuxlike/7 library versions/installed_files.txt b/test cases/linuxlike/7 library versions/installed_files.txt new file mode 100644 index 000000000..b997e5392 --- /dev/null +++ b/test cases/linuxlike/7 library versions/installed_files.txt @@ -0,0 +1,9 @@ +usr/lib/libsome.so +usr/lib/libsome.so.0 +usr/lib/libsome.so.1.2.3 +usr/lib/libnoversion.so +usr/lib/libonlyversion.so +usr/lib/libonlyversion.so.1 +usr/lib/libonlyversion.so.1.4.5 +usr/lib/libonlysoversion.so +usr/lib/libonlysoversion.so.5 diff --git a/test cases/linuxlike/7 library versions/lib.c b/test cases/linuxlike/7 library versions/lib.c new file mode 100644 index 000000000..67b6f4d00 --- /dev/null +++ b/test cases/linuxlike/7 library versions/lib.c @@ -0,0 +1,3 @@ +int myFunc() { + return 55; +} diff --git a/test cases/linuxlike/7 library versions/meson.build b/test cases/linuxlike/7 library versions/meson.build new file mode 100644 index 000000000..504aa4e22 --- /dev/null +++ b/test cases/linuxlike/7 library versions/meson.build @@ -0,0 +1,18 @@ +project('library versions', 'c') + +shared_library('some', 'lib.c', + version : '1.2.3', + soversion : '0', + install : true) + +shared_library('noversion', 'lib.c', + install : true) + +shared_library('onlyversion', 'lib.c', + version : '1.4.5', + install : true) + +shared_library('onlysoversion', 'lib.c', + # Also test that int soversion is acceptable + soversion : 5, + install : true) diff --git a/test cases/osx/2 library versions/installed_files.txt b/test cases/osx/2 library versions/installed_files.txt new file mode 100644 index 000000000..66470ab59 --- /dev/null +++ b/test cases/osx/2 library versions/installed_files.txt @@ -0,0 +1,4 @@ +usr/lib/libsome.0.dylib +usr/lib/libnoversion.dylib +usr/lib/libonlyversion.1.dylib +usr/lib/libonlysoversion.5.dylib diff --git a/test cases/osx/2 library versions/lib.c b/test cases/osx/2 library versions/lib.c new file mode 100644 index 000000000..67b6f4d00 --- /dev/null +++ b/test cases/osx/2 library versions/lib.c @@ -0,0 +1,3 @@ +int myFunc() { + return 55; +} diff --git a/test cases/osx/2 library versions/meson.build b/test cases/osx/2 library versions/meson.build new file mode 100644 index 000000000..504aa4e22 --- /dev/null +++ b/test cases/osx/2 library versions/meson.build @@ -0,0 +1,18 @@ +project('library versions', 'c') + +shared_library('some', 'lib.c', + version : '1.2.3', + soversion : '0', + install : true) + +shared_library('noversion', 'lib.c', + install : true) + +shared_library('onlyversion', 'lib.c', + version : '1.4.5', + install : true) + +shared_library('onlysoversion', 'lib.c', + # Also test that int soversion is acceptable + soversion : 5, + install : true) diff --git a/test cases/rust/1 basic/installed_files.txt b/test cases/rust/1 basic/installed_files.txt index 61eda27c5..c7dab9f6f 100644 --- a/test cases/rust/1 basic/installed_files.txt +++ b/test cases/rust/1 basic/installed_files.txt @@ -1 +1 @@ -usr/bin/prog +usr/bin/prog?exe diff --git a/test cases/rust/2 sharedlib/installed_files.txt b/test cases/rust/2 sharedlib/installed_files.txt index 5a7c7d6da..85acff291 100644 --- a/test cases/rust/2 sharedlib/installed_files.txt +++ b/test cases/rust/2 sharedlib/installed_files.txt @@ -1,2 +1,2 @@ -usr/bin/prog +usr/bin/prog?exe usr/lib/libstuff.rlib diff --git a/test cases/rust/3 staticlib/installed_files.txt b/test cases/rust/3 staticlib/installed_files.txt index 5a7c7d6da..85acff291 100644 --- a/test cases/rust/3 staticlib/installed_files.txt +++ b/test cases/rust/3 staticlib/installed_files.txt @@ -1,2 +1,2 @@ -usr/bin/prog +usr/bin/prog?exe usr/lib/libstuff.rlib diff --git a/test cases/windows/7 mingw dll versioning/installed_files.txt b/test cases/windows/7 mingw dll versioning/installed_files.txt new file mode 100644 index 000000000..8c2a8f296 --- /dev/null +++ b/test cases/windows/7 mingw dll versioning/installed_files.txt @@ -0,0 +1,4 @@ +usr/bin/libsome-0.dll +usr/lib/libsome.dll.a +usr/bin/libnoversion.dll +usr/lib/libnoversion.dll.a diff --git a/test cases/windows/7 mingw dll versioning/lib.c b/test cases/windows/7 mingw dll versioning/lib.c new file mode 100644 index 000000000..cf7dfdd07 --- /dev/null +++ b/test cases/windows/7 mingw dll versioning/lib.c @@ -0,0 +1,6 @@ +#ifdef _WIN32 +__declspec(dllexport) +#endif +int myFunc() { + return 55; +} diff --git a/test cases/windows/7 mingw dll versioning/meson.build b/test cases/windows/7 mingw dll versioning/meson.build new file mode 100644 index 000000000..23a33435b --- /dev/null +++ b/test cases/windows/7 mingw dll versioning/meson.build @@ -0,0 +1,17 @@ +project('mingw dll versioning', 'c') + +cc = meson.get_compiler('c') + +# Test that MinGW/GCC creates correctly-named dll files and dll.a files, +# and also installs them in the right place +if cc.get_id() != 'msvc' + shared_library('some', 'lib.c', + version : '1.2.3', + soversion : '0', + install : true) + + shared_library('noversion', 'lib.c', + install : true) +else + install_data('no-installed-files', install_dir : '') +endif diff --git a/test cases/windows/7 mingw dll versioning/no-installed-files b/test cases/windows/7 mingw dll versioning/no-installed-files new file mode 100644 index 000000000..e69de29bb diff --git a/test cases/windows/8 msvc dll versioning/installed_files.txt b/test cases/windows/8 msvc dll versioning/installed_files.txt new file mode 100644 index 000000000..5f6e26a1d --- /dev/null +++ b/test cases/windows/8 msvc dll versioning/installed_files.txt @@ -0,0 +1,4 @@ +usr/bin/some-0.dll +usr/lib/some.lib +usr/bin/noversion.dll +usr/lib/noversion.lib diff --git a/test cases/windows/8 msvc dll versioning/lib.c b/test cases/windows/8 msvc dll versioning/lib.c new file mode 100644 index 000000000..cf7dfdd07 --- /dev/null +++ b/test cases/windows/8 msvc dll versioning/lib.c @@ -0,0 +1,6 @@ +#ifdef _WIN32 +__declspec(dllexport) +#endif +int myFunc() { + return 55; +} diff --git a/test cases/windows/8 msvc dll versioning/meson.build b/test cases/windows/8 msvc dll versioning/meson.build new file mode 100644 index 000000000..0c361735b --- /dev/null +++ b/test cases/windows/8 msvc dll versioning/meson.build @@ -0,0 +1,16 @@ +project('msvc dll versioning', 'c') + +cc = meson.get_compiler('c') + +# Test that MSVC creates foo-0.dll and bar.dll +if cc.get_id() == 'msvc' + shared_library('some', 'lib.c', + version : '1.2.3', + soversion : '0', + install : true) + + shared_library('noversion', 'lib.c', + install : true) +else + install_data('no-installed-files', install_dir : '') +endif diff --git a/test cases/windows/8 msvc dll versioning/no-installed-files b/test cases/windows/8 msvc dll versioning/no-installed-files new file mode 100644 index 000000000..e69de29bb