Fix D tests to run on Windows

pull/3981/head
GoaLitiuM 6 years ago
parent 9d5448ab45
commit 96bac154bf
  1. 4
      test cases/d/3 shared library/installed_files.txt
  2. 9
      test cases/d/3 shared library/libstuff.d
  3. 3
      test cases/d/3 shared library/libstuff.di
  4. 18
      test cases/d/3 shared library/meson.build
  5. 26
      test cases/d/4 library versions/installed_files.txt
  6. 8
      test cases/d/4 library versions/lib.d
  7. 4
      test cases/d/5 mixed/installed_files.txt
  8. 16
      test cases/d/7 multilib/installed_files.txt
  9. 8
      test cases/d/7 multilib/say1.d
  10. 1
      test cases/d/7 multilib/say1.di
  11. 8
      test cases/d/7 multilib/say2.d
  12. 1
      test cases/d/7 multilib/say2.di

@ -1,2 +1,4 @@
usr/bin/app_d?exe
usr/lib/libstuff.so
?msvc:usr/bin/stuff.dll
?msvc:usr/lib/stuff.lib
?gcc:usr/lib/libstuff.so

@ -1,9 +1,14 @@
import std.stdio;
import std.string : format;
int printLibraryString (string str)
export int printLibraryString (string str)
{
writeln ("Library says: %s".format (str));
return 4;
}
version (Windows)
{
import core.sys.windows.dll;
mixin SimpleDllMain;
}

@ -0,0 +1,3 @@
module libstuff;
int printLibraryString (string str);

@ -11,11 +11,13 @@ ldyn = shared_library('stuff', 'libstuff.d', install : true)
ed = executable('app_d', 'app.d', link_with : ldyn, install : true)
test('linktest_dyn', ed)
# test D attributes for pkg-config
pkgc = import('pkgconfig')
pkgc.generate(name: 'test',
libraries: ldyn,
subdirs: 'd/stuff',
description: 'A test of D attributes to pkgconfig.generate.',
d_module_versions: ['Use_Static']
)
if host_machine.system() != 'windows'
# test D attributes for pkg-config
pkgc = import('pkgconfig')
pkgc.generate(name: 'test',
libraries: ldyn,
subdirs: 'd/stuff',
description: 'A test of D attributes to pkgconfig.generate.',
d_module_versions: ['Use_Static']
)
endif

@ -1,9 +1,17 @@
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
?gcc:usr/lib/libsome.so
?gcc:usr/lib/libsome.so.0
?gcc:usr/lib/libsome.so.1.2.3
?gcc:usr/lib/libnoversion.so
?gcc:usr/lib/libonlyversion.so
?gcc:usr/lib/libonlyversion.so.1
?gcc:usr/lib/libonlyversion.so.1.4.5
?gcc:usr/lib/libonlysoversion.so
?gcc:usr/lib/libonlysoversion.so.5
?msvc:usr/bin/noversion.dll
?msvc:usr/bin/onlysoversion-5.dll
?msvc:usr/bin/onlyversion-1.dll
?msvc:usr/bin/some-0.dll
?msvc:usr/lib/noversion.lib
?msvc:usr/lib/onlysoversion.lib
?msvc:usr/lib/onlyversion.lib
?msvc:usr/lib/some.lib

@ -3,8 +3,14 @@ import std.stdio;
import std.string : format;
@safe
int printLibraryString (string str)
export int printLibraryString (string str)
{
writeln ("Library says: %s".format (str));
return 4;
}
version (Windows)
{
import core.sys.windows.dll;
mixin SimpleDllMain;
}

@ -1,4 +1,6 @@
usr/bin/appdc_d?exe
usr/lib/libstuff.so
usr/bin/appdc_s?exe
usr/lib/libstuff.a
?gcc:usr/lib/libstuff.so
?msvc:usr/bin/stuff.dll
?msvc:usr/lib/stuff.lib

@ -1,7 +1,11 @@
usr/bin/app_d?exe
usr/lib/libsay1.so
usr/lib/libsay1.so.0
usr/lib/libsay1.so.1.2.3
usr/lib/libsay2.so
usr/lib/libsay2.so.1
usr/lib/libsay2.so.1.2.4
?gcc:usr/lib/libsay1.so
?gcc:usr/lib/libsay1.so.0
?gcc:usr/lib/libsay1.so.1.2.3
?gcc:usr/lib/libsay2.so
?gcc:usr/lib/libsay2.so.1
?gcc:usr/lib/libsay2.so.1.2.4
?msvc:usr/bin/say1-0.dll
?msvc:usr/bin/say2-1.dll
?msvc:usr/lib/say1.lib
?msvc:usr/lib/say2.lib

@ -2,8 +2,14 @@
import std.stdio;
import std.string : format;
int sayHello1 (string str)
export int sayHello1 (string str)
{
writeln ("Hello %s from library 1.".format (str));
return 4;
}
version (Windows)
{
import core.sys.windows.dll;
mixin SimpleDllMain;
}

@ -0,0 +1 @@
int sayHello1 (string str);

@ -2,8 +2,14 @@
import std.stdio;
import std.string : format;
int sayHello2 (string str)
export int sayHello2 (string str)
{
writeln ("Hello %s from library 2.".format (str));
return 8;
}
version (Windows)
{
import core.sys.windows.dll;
mixin SimpleDllMain;
}

@ -0,0 +1 @@
int sayHello2 (string str);
Loading…
Cancel
Save