1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
9 from telemetry
.core
import discover
10 from telemetry
import story
14 # Import all submodules' StorySet classes.
15 start_dir
= os
.path
.dirname(os
.path
.abspath(__file__
))
16 top_level_dir
= os
.path
.abspath(os
.path
.join(start_dir
, os
.pardir
, os
.pardir
))
17 base_class
= story
.StorySet
18 for cls
in discover
.DiscoverClasses(
19 start_dir
, top_level_dir
, base_class
).values():
20 setattr(sys
.modules
[__name__
], cls
.__name
__, cls
)
22 # DiscoverClasses makes the assumption that there is exactly one matching
23 # class per file, however the following are declared in the same file.
24 for cls
in (video
.VideoDirectStorySet
,
25 video
.VideoProxiedStorySet
,
26 video
.VideoCompareStorySet
):
27 setattr(sys
.modules
[__name__
], cls
.__name
__, cls
)