diff --git a/.gitignore b/.gitignore index 60cb9f3134c00603396337ed1e125e735a1d8992..975e6abbe42dd490cb943d5540de93ea6272bc88 100644 --- a/.gitignore +++ b/.gitignore @@ -10,8 +10,9 @@ config.sub configure depcomp include/mobject-conf.h.in +src/mobject-store-config.h.in *~ install-sh ltmain.sh missing - +test-driver diff --git a/Makefile.am b/Makefile.am index 6002fdd92f1eb1d6a083ce53e74ae7a28fe03f59..a8b033d1d280a90653d20ba05d1e1b9e4f34a590 100644 --- a/Makefile.am +++ b/Makefile.am @@ -11,7 +11,12 @@ AM_CXXFLAGS = $(AM_CFLAGS) lib_LTLIBRARIES = src/libmobject-store.la -include_HEADERS = include/libmobject-store.h +include_HEADERS = include/libmobject-store.h \ + include/librados-mobject-store.h + +# setting this to empty so subdir makefiles can use += +noinst_HEADERS = + src_libmobject_la_CPPFLAGS = -I${srcdir}/include -I${srcdir}/src include Make.rules diff --git a/include/librados-mobject-store.h b/include/librados-mobject-store.h index 0b84a1652b94bd32acd094ab05a3b1a1786487dc..997ab4b2b90cb196a4e4fff55a019b4dcedea849 100644 --- a/include/librados-mobject-store.h +++ b/include/librados-mobject-store.h @@ -11,6 +11,8 @@ extern "C" { #endif +#include "libmobject-store.h" + typedef mobject_store_t rados_t; #define LIBRADOS_OPERATION_NOFLAG LIBMOBJECT_OPERATION_NOFLAG diff --git a/src/Makefile.subdir b/src/Makefile.subdir index 4cb5e55961396e7350cdfd50d3e25cb9e4c09b40..776ec301dd18c84cdf5aef6951d9207fff5f37f9 100644 --- a/src/Makefile.subdir +++ b/src/Makefile.subdir @@ -1,4 +1,8 @@ src_libmobject_store_la_SOURCES = \ src/libmobject-store.c \ src/completion.c \ - src/log.h src/write-op.c + src/write-op.c + +noinst_HEADERS += src/log.h src/completion.h \ + src/write-op.h src/write-actions.h\ + src/utlist.h diff --git a/src/mobject-store-config.h.in b/src/mobject-store-config.h.in deleted file mode 100644 index 53226298efca09ebca7a93de67b5205d0434e8f0..0000000000000000000000000000000000000000 --- a/src/mobject-store-config.h.in +++ /dev/null @@ -1,62 +0,0 @@ -/* src/mobject-store-config.h.in. Generated from configure.ac by autoheader. */ - -/* Define to 1 if you have the header file. */ -#undef HAVE_DLFCN_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_INTTYPES_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_MEMORY_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDINT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDLIB_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STRINGS_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STRING_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_STAT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_TYPES_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_UNISTD_H - -/* Define to the sub-directory in which libtool stores uninstalled libraries. - */ -#undef LT_OBJDIR - -/* Name of package */ -#undef PACKAGE - -/* Define to the address where bug reports for this package should be sent. */ -#undef PACKAGE_BUGREPORT - -/* Define to the full name of this package. */ -#undef PACKAGE_NAME - -/* Define to the full name and version of this package. */ -#undef PACKAGE_STRING - -/* Define to the one symbol short name of this package. */ -#undef PACKAGE_TARNAME - -/* Define to the home page for this package. */ -#undef PACKAGE_URL - -/* Define to the version of this package. */ -#undef PACKAGE_VERSION - -/* Define to 1 if you have the ANSI C header files. */ -#undef STDC_HEADERS - -/* Version number of package */ -#undef VERSION diff --git a/tests/Makefile.subdir b/tests/Makefile.subdir index 4e4f98a7b11dc0c2e4676ad3a728ad4e5656c456..b502fdfeab73252138bf55cc63360e84d6e5cf29 100644 --- a/tests/Makefile.subdir +++ b/tests/Makefile.subdir @@ -1,10 +1,12 @@ check_PROGRAMS += \ tests/mobject-connect-test -TESTS += \ - tests/connect-test.sh +#TESTS += \ +# tests/connect-test.sh tests_mobject_connect_test_SOURCES = \ tests/mobject-connect-test.c tests_mobject_connect_test_LDADD = \ src/libmobject-store.la + +tests_mobject_connect_test_CPPFLAGS = -I${srcdir}/include diff --git a/tests/mobject-connect-test.c b/tests/mobject-connect-test.c index 4fc4b6f59c8b3fe5eddeea390dccb934adfe0062..3c8053e494686af263640b46be9f85ebf3f3475e 100644 --- a/tests/mobject-connect-test.c +++ b/tests/mobject-connect-test.c @@ -12,7 +12,6 @@ #ifdef USE_LIBRADOS #include #else -#include #include #endif diff --git a/tests/mobject-server.c b/tests/mobject-server.c new file mode 100644 index 0000000000000000000000000000000000000000..c6798befcf82fff1fac2a373c1af9451603f7020 --- /dev/null +++ b/tests/mobject-server.c @@ -0,0 +1,7 @@ +/* the SDS-keyval and bake-bulk tests should still work, even if there is a higher-level protocol */ +int main(int argc, char **argv) +{ + mobject_server_register(argc, argv); + margo_wait_for_finalize(); + margo_server_deregister(); +} diff --git a/tests/test-sds-keyval-client.c b/tests/test-sds-keyval-client.c new file mode 100644 index 0000000000000000000000000000000000000000..e81fd0a67b4c8438101ccfe654bb98549736bf5f --- /dev/null +++ b/tests/test-sds-keyval-client.c @@ -0,0 +1,33 @@ +#include "sds-keyval.h" +#include + +int main(int argc, char **argv) { + int ret; + kv_context * context = kv_client_register(argc, argv); + + /* open */ + ret = kv_open(context, argv[1], "booger", KV_INT, KV_INT); + + /* put */ + int key = 10; + int val = 10; + ret = kv_put(context, &key, &val); + + /* get */ + int remote_val; + ret = kv_get(context, &key, &remote_val); + printf("key: %d in: %d out: %d\n", key, val, remote_val); + + /* close */ + ret = kv_close(context); + + /* benchmark doesn't require an open keyval */ + bench_result *output; + output = kv_benchmark(context, 1000); + printf("insert: %zd keys in %f seconds: %f Million-insert per sec\n", + output->nkeys, output->insert_time, + output->nkeys/(output->insert_time*1024*1024) ); + free(output); + +// kv_client_deregister(context); +}