Fix some bugs when testing opensds ansible
[stor4nfv.git] / src / ceph / src / test / journal / test_main.cc
1 // -*- mode:C; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2 // vim: ts=8 sw=2 smarttab
3
4 #include "gtest/gtest.h"
5 #include "common/ceph_argparse.h"
6 #include "common/ceph_crypto.h"
7 #include "common/config.h"
8 #include "global/global_context.h"
9 #include "global/global_init.h"
10 #include <vector>
11
12 int main(int argc, char **argv)
13 {
14   ::testing::InitGoogleTest(&argc, argv);
15
16   std::vector<const char*> args;
17   argv_to_vec(argc, (const char **)argv, args);
18
19   auto cct = global_init(NULL, args, CEPH_ENTITY_TYPE_CLIENT,
20                          CODE_ENVIRONMENT_UTILITY, 0);
21   g_conf->set_val("lockdep", "true");
22   common_init_finish(g_ceph_context);
23
24   int r = RUN_ALL_TESTS();
25   return r;
26 }