diff --git a/bindings/csharp/Makefile.am b/bindings/csharp/Makefile.am index ba3c6b832..cbc1c8b6a 100644 --- a/bindings/csharp/Makefile.am +++ b/bindings/csharp/Makefile.am @@ -27,6 +27,19 @@ cslib_DATA = \ libgphoto2-sharp.dll: $(LIBGPHOTO2_SHARP_GENERATED_CSFILES) $(LIBGPHOTO2_SHARP_CSFILES) $(MCS) $(MCSFLAGS) -out:$@ /target:library $(LIBGPHOTO2_SHARP_GENERATED_CSFILES) $(LIBGPHOTO2_SHARP_CSFILES) +TestGphoto2Sharp.exe: $(srcdir)/TestGphoto2Sharp.cs + $(MCS) $(MCSFLAGS) -out:$@ $< + +check_SCRIPTS = TestGphoto2Sharp +check_DATA = TestGphoto2Sharp.exe + +TESTS = $(check_SCRIPTS) + +TestGphoto2Sharp: Makefile $(srcdir)/TestGphoto2Sharp.cs + echo '#!/bin/sh' > $@ + echo '$(MONO) $$(dirname "$$0")/TestGphoto2Sharp.exe' >> $@ + chmod +x $@ + EXTRA_DIST = \ libgphoto2-sharp.dll.config \ libgphoto2-sharp.pc.in \ @@ -35,5 +48,6 @@ EXTRA_DIST = \ CLEANFILES = \ libgphoto2-sharp.dll.mdb \ - libgphoto2-sharp.dll + libgphoto2-sharp.dll \ + TestGphoto2Sharp diff --git a/bindings/csharp/TestGphoto2Sharp.cs b/bindings/csharp/TestGphoto2Sharp.cs new file mode 100644 index 000000000..20ad74994 --- /dev/null +++ b/bindings/csharp/TestGphoto2Sharp.cs @@ -0,0 +1,7 @@ +class Gphoto2SharpTest { + public static int Main() { + System.Console.WriteLine("Testing libgphoto2-sharp..."); + // Return non-0 when test fails + return 0; + } +}