From 45c8557dc67b7e8af8cef1aeb8b662dc9a6a4286 Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Fri, 1 Jul 2016 14:43:51 +0530 Subject: 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. --- test cases/osx/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 ++++++++++++++++++ 3 files changed, 25 insertions(+) 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 (limited to 'test cases/osx') 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 0000000..66470ab --- /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 0000000..67b6f4d --- /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 0000000..504aa4e --- /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) -- cgit v1.1