]>
git.proxmox.com Git - ceph.git/blob - ceph/src/test/librbd/test_main.cc
1 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2 // vim: ts=8 sw=2 smarttab
4 #include "include/rados/librados.hpp"
5 #include "global/global_context.h"
6 #include "test/librados/test.h"
7 #include "gtest/gtest.h"
11 extern void register_test_librbd();
12 #ifdef TEST_LIBRBD_INTERNALS
13 extern void register_test_image_watcher();
14 extern void register_test_internal();
15 extern void register_test_journal_entries();
16 extern void register_test_journal_replay();
17 extern void register_test_object_map();
18 extern void register_test_operations();
19 extern void register_test_mirroring();
20 extern void register_test_mirroring_watcher();
21 #endif // TEST_LIBRBD_INTERNALS
23 int main(int argc
, char **argv
)
25 register_test_librbd();
26 #ifdef TEST_LIBRBD_INTERNALS
27 register_test_image_watcher();
28 register_test_internal();
29 register_test_journal_entries();
30 register_test_journal_replay();
31 register_test_object_map();
32 register_test_operations();
33 register_test_mirroring();
34 register_test_mirroring_watcher();
35 #endif // TEST_LIBRBD_INTERNALS
37 ::testing::InitGoogleTest(&argc
, argv
);
39 librados::Rados rados
;
40 std::string result
= connect_cluster_pp(rados
);
42 std::cerr
<< result
<< std::endl
;
46 #ifdef TEST_LIBRBD_INTERNALS
47 g_ceph_context
= reinterpret_cast<CephContext
*>(rados
.cct());
48 #endif // TEST_LIBRBD_INTERNALS
50 int r
= rados
.conf_set("lockdep", "true");
52 std::cerr
<< "failed to enable lockdep" << std::endl
;
55 return RUN_ALL_TESTS();