diff options
-rw-r--r-- | testsuite/makefiles/summarize.awk | 13 | ||||
-rw-r--r-- | testsuite/tests/lib-dynlink-csharp/Makefile | 10 | ||||
-rwxr-xr-x | testsuite/tests/lib-dynlink-csharp/entry.c | 18 |
3 files changed, 35 insertions, 6 deletions
diff --git a/testsuite/makefiles/summarize.awk b/testsuite/makefiles/summarize.awk index 552088b3f..75ab95255 100644 --- a/testsuite/makefiles/summarize.awk +++ b/testsuite/makefiles/summarize.awk @@ -28,6 +28,12 @@ function record_pass() { clear(); } +function record_skip() { + check(); + ++ skipped; + clear(); +} + function record_fail() { check(); ++ failed; @@ -69,6 +75,10 @@ function record_unexp() { record_pass(); } +/=> skipped/ { + record_skip(); +} + /=> failed/ { record_fail(); } @@ -77,6 +87,9 @@ function record_unexp() { record_unexp(); } +# Not displaying "skipped" for the moment, as most of the skipped tests +# print nothing at all and are not counted. + END { if (errored){ printf ("\n#### Some fatal error occurred during testing.\n\n"); diff --git a/testsuite/tests/lib-dynlink-csharp/Makefile b/testsuite/tests/lib-dynlink-csharp/Makefile index fa5c2024a..17eeea436 100644 --- a/testsuite/tests/lib-dynlink-csharp/Makefile +++ b/testsuite/tests/lib-dynlink-csharp/Makefile @@ -34,7 +34,7 @@ prepare: bytecode: @printf " ... testing 'bytecode':" @if [ ! `which $(CSC) >/dev/null 2>&1` ]; then \ - echo " => passed"; \ + echo " => skipped"; \ else \ $(OCAMLC) -output-obj -o main.dll dynlink.cma main.ml entry.c; \ $(CSC) /out:main.exe main.cs; \ @@ -47,7 +47,7 @@ bytecode: bytecode-dll: @printf " ... testing 'bytecode-dll':" @if [ ! `which $(CSC) > /dev/null 2>&1` ]; then \ - echo " => passed"; \ + echo " => skipped"; \ else \ $(OCAMLC) -output-obj -o main_obj.$(O) dynlink.cma entry.c main.ml; \ $(MKDLL) -maindll -o main.dll main_obj.$(O) entry.$(O) \ @@ -62,7 +62,7 @@ bytecode-dll: native: @printf " ... testing 'native':" @if [ ! `which $(CSC) > /dev/null 2>&1` ]; then \ - echo " => passed"; \ + echo " => skipped"; \ else \ $(OCAMLOPT) -output-obj -o main.dll dynlink.cmxa entry.c main.ml; \ $(CSC) /out:main.exe main.cs; \ @@ -75,7 +75,7 @@ native: native-dll: @printf " ... testing 'native-dll':" @if [ ! `which $(CSC) > /dev/null 2>&1` ]; then \ - echo " => passed"; \ + echo " => skipped"; \ else \ $(OCAMLOPT) -output-obj -o main_obj.$(O) dynlink.cmxa entry.c \ main.ml; \ @@ -92,6 +92,6 @@ promote: defaultpromote .PHONY: clean clean: defaultclean - @rm -f *.result *.exe *.dll + @rm -f *.result *.exe *.dll *.so *.obj *.o include $(BASEDIR)/makefiles/Makefile.common diff --git a/testsuite/tests/lib-dynlink-csharp/entry.c b/testsuite/tests/lib-dynlink-csharp/entry.c index e3adebb83..a82eb46f6 100755 --- a/testsuite/tests/lib-dynlink-csharp/entry.c +++ b/testsuite/tests/lib-dynlink-csharp/entry.c @@ -17,7 +17,23 @@ #include <caml/custom.h> #include <caml/fail.h> -__declspec(dllexport) void __stdcall start_caml_engine() { +#if !defined(OPENSTEP) && (defined(__WIN32__) && !defined(__CYGWIN__)) +# if defined(_MSC_VER) || defined(__MINGW32__) +# define _DLLAPI __declspec(dllexport) +# else +# define _DLLAPI extern +# endif +# if defined(__MINGW32__) || defined(UNDER_CE) +# define _CALLPROC +# else +# define _CALLPROC __stdcall +# endif +#elif defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 303 +# define _DLLAPI __attribute__((visibility("default"))) +# define _CALLPROC +#endif /* WIN32 && !CYGWIN */ + +_DLLAPI void _CALLPROC start_caml_engine() { char * argv[2]; argv[0] = "--"; argv[1] = NULL; |