]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
ceph_test_rados_api_list: parse env
authorSage Weil <sage@redhat.com>
Sun, 3 Apr 2016 13:45:23 +0000 (09:45 -0400)
committerSage Weil <sage@redhat.com>
Sun, 3 Apr 2016 13:45:56 +0000 (09:45 -0400)
Signed-off-by: Sage Weil <sage@redhat.com>
src/test/Makefile-client.am
src/test/librados/list.cc

index 2d3ac226b93814bc67d02af598e7829a97c55a88..243c2b069d7ed09a34cce4bf2708a6e296456ecf 100644 (file)
@@ -234,7 +234,7 @@ ceph_test_rados_api_aio_CXXFLAGS = $(UNITTEST_CXXFLAGS)
 bin_DEBUGPROGRAMS += ceph_test_rados_api_aio
 
 ceph_test_rados_api_list_SOURCES = test/librados/list.cc
-ceph_test_rados_api_list_LDADD = $(LIBRADOS) $(UNITTEST_LDADD) $(RADOS_TEST_LDADD)
+ceph_test_rados_api_list_LDADD = $(LIBRADOS) $(UNITTEST_LDADD) $(RADOS_TEST_LDADD) $(CEPH_GLOBAL)
 ceph_test_rados_api_list_CXXFLAGS = $(UNITTEST_CXXFLAGS)
 bin_DEBUGPROGRAMS += ceph_test_rados_api_list
 
index b7f0253671281c92b7966ab932692598f305e32a..60b97b52ea48179ce88795e151e70dd3165f1665 100644 (file)
@@ -5,6 +5,10 @@
 #include "include/stringify.h"
 #include "test/librados/test.h"
 #include "test/librados/TestCase.h"
+#include "global/global_context.h"
+#include "global/global_init.h"
+#include "common/ceph_argparse.h"
+#include "common/common_init.h"
 
 #include "include/types.h"
 #include "common/hobject.h"
@@ -956,3 +960,18 @@ TEST_F(LibRadosListPP, EnumerateObjectsFilterPP) {
 
 #pragma GCC diagnostic pop
 #pragma GCC diagnostic warning "-Wpragmas"
+
+int main(int argc, char **argv)
+{
+  ::testing::InitGoogleTest(&argc, argv);
+
+  vector<const char*> args;
+  argv_to_vec(argc, (const char **)argv, args);
+  env_to_vec(args);
+  cout << args << std::endl;
+
+  global_init(NULL, args, CEPH_ENTITY_TYPE_CLIENT, CODE_ENVIRONMENT_UTILITY, 0);
+  common_init_finish(g_ceph_context);
+
+  return RUN_ALL_TESTS();
+}