+
+# Hand-written C API tests.
+
+test_create_handle_SOURCES = test-create-handle.c
+test_create_handle_CFLAGS = \
+ -I$(top_srcdir)/src -I$(top_builddir)/src \
+ $(WARN_CFLAGS) $(WERROR_CFLAGS)
+test_create_handle_LDADD = \
+ $(top_builddir)/src/libguestfs.la
+
+test_config_SOURCES = test-config.c
+test_config_CFLAGS = \
+ -I$(top_srcdir)/src -I$(top_builddir)/src \
+ $(WARN_CFLAGS) $(WERROR_CFLAGS)
+test_config_LDADD = \
+ $(top_builddir)/src/libguestfs.la
+
+test_add_drive_opts_SOURCES = test-add-drive-opts.c
+test_add_drive_opts_CFLAGS = \
+ -I$(top_srcdir)/src -I$(top_builddir)/src \
+ $(WARN_CFLAGS) $(WERROR_CFLAGS)
+test_add_drive_opts_LDADD = \
+ $(top_builddir)/src/libguestfs.la
+
+test_last_errno_SOURCES = test-last-errno.c
+test_last_errno_CFLAGS = \
+ -I$(top_srcdir)/src -I$(top_builddir)/src \
+ $(WARN_CFLAGS) $(WERROR_CFLAGS)
+test_last_errno_LDADD = \
+ $(top_builddir)/src/libguestfs.la
+
+# Run the tests under valgrind.
+
+valgrind:
+ $(MAKE) check VG="valgrind --quiet --leak-check=full"