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.pull/417/head
parent
598997bdb5
commit
45c8557dc6
41 changed files with 171 additions and 72 deletions
@ -1,3 +1 @@ |
||||
usr/lib/libsomelib.so |
||||
usr/lib/libsomelib.so.0 |
||||
usr/lib/libsomelib.so.1.2.3 |
||||
usr/lib/prefixsomelib.suffix |
||||
|
@ -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) |
||||
|
@ -1,4 +1 @@ |
||||
usr/bin/prog |
||||
usr/lib/liblib1.so |
||||
usr/lib/liblib2.so |
||||
usr/lib/liblib3.so |
||||
usr/bin/prog?exe |
||||
|
@ -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]) |
||||
|
@ -1 +1 @@ |
||||
lib2 = shared_library('lib2', 'lib2.c', install : true) |
||||
lib2 = shared_library('lib2', 'lib2.c', install : false) |
||||
|
@ -1 +1 @@ |
||||
lib3 = shared_library('lib3', 'lib3.c', install : true) |
||||
lib3 = shared_library('lib3', 'lib3.c', install : false) |
||||
|
@ -1,3 +1,2 @@ |
||||
usr/bin/user |
||||
usr/lib/libsublib.so |
||||
usr/bin/user?exe |
||||
usr/share/sublib/sublib.depmf |
||||
|
@ -1,3 +1,2 @@ |
||||
usr/include/simple.h |
||||
usr/lib/libsimple.so |
||||
usr/lib/pkgconfig/simple.pc |
||||
|
@ -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 |
||||
|
@ -1,2 +1 @@ |
||||
usr/bin/prog |
||||
usr/lib/libmylib.so |
||||
usr/bin/prog?exe |
||||
|
@ -1,2 +1,2 @@ |
||||
usr/bin/prog |
||||
usr/bin/prog?exe |
||||
usr/diiba/daaba/file.dat |
||||
|
@ -1,3 +0,0 @@ |
||||
@ECHO OFF |
||||
|
||||
echo At this point we could do something. |
@ -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 |
||||
|
@ -1,3 +1,2 @@ |
||||
usr/bin/prog |
||||
usr/lib/libshar.so |
||||
usr/bin/prog?exe |
||||
usr/lib/libstat.a |
||||
|
@ -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) |
||||
|
@ -1 +0,0 @@ |
||||
int func() { return 15; } |
@ -1,2 +1,2 @@ |
||||
usr/bin/prog.exe |
||||
usr/lib/libhelper.dll |
||||
usr/lib/helper.dll |
||||
|
@ -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 |
@ -0,0 +1,3 @@ |
||||
int myFunc() { |
||||
return 55; |
||||
} |
@ -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) |
@ -0,0 +1,4 @@ |
||||
usr/lib/libsome.0.dylib |
||||
usr/lib/libnoversion.dylib |
||||
usr/lib/libonlyversion.1.dylib |
||||
usr/lib/libonlysoversion.5.dylib |
@ -0,0 +1,3 @@ |
||||
int myFunc() { |
||||
return 55; |
||||
} |
@ -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) |
@ -1 +1 @@ |
||||
usr/bin/prog |
||||
usr/bin/prog?exe |
||||
|
@ -1,2 +1,2 @@ |
||||
usr/bin/prog |
||||
usr/bin/prog?exe |
||||
usr/lib/libstuff.rlib |
||||
|
@ -1,2 +1,2 @@ |
||||
usr/bin/prog |
||||
usr/bin/prog?exe |
||||
usr/lib/libstuff.rlib |
||||
|
@ -0,0 +1,4 @@ |
||||
usr/bin/libsome-0.dll |
||||
usr/lib/libsome.dll.a |
||||
usr/bin/libnoversion.dll |
||||
usr/lib/libnoversion.dll.a |
@ -0,0 +1,6 @@ |
||||
#ifdef _WIN32 |
||||
__declspec(dllexport) |
||||
#endif |
||||
int myFunc() { |
||||
return 55; |
||||
} |
@ -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 |
@ -0,0 +1,4 @@ |
||||
usr/bin/some-0.dll |
||||
usr/lib/some.lib |
||||
usr/bin/noversion.dll |
||||
usr/lib/noversion.lib |
@ -0,0 +1,6 @@ |
||||
#ifdef _WIN32 |
||||
__declspec(dllexport) |
||||
#endif |
||||
int myFunc() { |
||||
return 55; |
||||
} |
@ -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 |
Loading…
Reference in new issue