MCPcopy Create free account
hub / github.com/ceph/ceph / task

Function task

qa/tasks/cephfs_test_runner.py:86–213  ·  view source on GitHub ↗

Run the CephFS test cases. Run everything in tasks/cephfs/test_*.py: :: tasks: - install: - ceph: - ceph-fuse: - cephfs_test_runner: `modules` argument allows running only some specific modules: :: tasks:

(ctx, config)

Source from the content-addressed store, hash-verified

84
85@contextlib.contextmanager
86def task(ctx, config):
87 """
88 Run the CephFS test cases.
89
90 Run everything in tasks/cephfs/test_*.py:
91
92 ::
93
94 tasks:
95 - install:
96 - ceph:
97 - ceph-fuse:
98 - cephfs_test_runner:
99
100 `modules` argument allows running only some specific modules:
101
102 ::
103
104 tasks:
105 ...
106 - cephfs_test_runner:
107 modules:
108 - tasks.cephfs.test_sessionmap
109 - tasks.cephfs.test_auto_repair
110
111 By default, any cases that can't be run on the current cluster configuration
112 will generate a failure. When the optional `fail_on_skip` argument is set
113 to false, any tests that can't be run on the current configuration will
114 simply be skipped:
115
116 ::
117 tasks:
118 ...
119 - cephfs_test_runner:
120 fail_on_skip: false
121
122 """
123
124 ceph_cluster = CephCluster(ctx)
125
126 if len(list(misc.all_roles_of_type(ctx.cluster, 'mds'))):
127 mds_cluster = MDSCluster(ctx)
128 fs = Filesystem(ctx)
129 else:
130 mds_cluster = None
131 fs = None
132
133 if len(list(misc.all_roles_of_type(ctx.cluster, 'mgr'))):
134 mgr_cluster = MgrCluster(ctx)
135 else:
136 mgr_cluster = None
137
138 # Mount objects, sorted by ID
139 if hasattr(ctx, 'mounts'):
140 mounts = [v for k, v in sorted(ctx.mounts.items(), key=lambda mount: mount[0])]
141 else:
142 # The test configuration has a filesystem but no fuse/kclient mounts
143 mounts = []

Callers

nothing calls this directly

Calls 13

loadTestsFromNameMethod · 0.95
sortedFunction · 0.85
DecoratingLoaderClass · 0.85
discoverMethod · 0.80
LogStreamClass · 0.70
listFunction · 0.50
FilesystemClass · 0.50
itemsMethod · 0.45
getMethod · 0.45
appendMethod · 0.45
joinMethod · 0.45
runMethod · 0.45

Tested by

no test coverage detected