diff options
| author | Nirbheek Chauhan <nirbheek@centricular.com> | 2016-07-01 14:43:51 +0530 |
|---|---|---|
| committer | Nirbheek Chauhan <nirbheek@centricular.com> | 2016-07-01 20:50:47 +0530 |
| commit | 45c8557dc67b7e8af8cef1aeb8b662dc9a6a4286 (patch) | |
| tree | 5ae1944a3187b082258017982d2a84f7c1b431c3 /test cases/windows | |
| parent | 598997bdb59efa9fe9e72c02d33a350bb8c397bb (diff) | |
| download | meson-45c8557dc67b7e8af8cef1aeb8b662dc9a6a4286.tar.gz | |
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.
Diffstat (limited to 'test cases/windows')
8 files changed, 53 insertions, 0 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 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 --- /dev/null +++ b/test cases/windows/7 mingw dll versioning/no-installed-files 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 --- /dev/null +++ b/test cases/windows/8 msvc dll versioning/no-installed-files |
