97fe87ef116f4f2e1ed6e64115790561ce748b76
5 import lttng_b_test
.utils
.project
as Project
8 _logger
= logging
.getLogger('project.factory')
9 _conf_file
= os
.path
.dirname(os
.path
.abspath(__file__
)) + "/../run_configuration.yaml"
10 _project_constructor
= {
11 'babeltrace': Project
.Babeltrace
,
12 'lttng-modules': Project
.Lttng_modules
,
13 'lttng-tools': Project
.Lttng_tools
,
14 'lttng-ust': Project
.Lttng_ust
,
18 with
open(_conf_file
, 'r') as stream
:
19 # This is voluntary static across call, no need to perform this
21 _markers
= yaml
.load(stream
)
24 def get(label
, tmpdir
):
25 if label
not in _markers
:
26 # TODO: specialized exception, handle it caller-side so the caller
27 # can decide to skip or fail test.
28 raise Exception('Label is no present')
29 marker
= _markers
[label
]
30 constructor
= _project_constructor
[marker
['project']]
33 return constructor(label
, path
, sha1
, tmpdir
)
This page took 0.031762 seconds and 4 git commands to generate.