pymtt
Main Page
Modules
Packages
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Groups
pylib
Tools
Version
MTTVersionPlugin.py
Go to the documentation of this file.
1
# -*- coding: utf-8; tab-width: 4; indent-tabs-mode: f; python-indent: 4 -*-
2
#
3
# Copyright (c) 2015-2018 Intel, Inc. All rights reserved.
4
# $COPYRIGHT$
5
#
6
# Additional copyrights may follow
7
#
8
# $HEADER$
9
#
10
11
12
from
__future__
import
print_function
13
from
VersionMTTTool
import
*
14
15
# Major and minor version number of the MTT
16
17
MTTMajor =
"4"
;
18
MTTMinor =
"0"
;
19
MTTRelease =
"0"
;
20
MTTGreek =
"a1"
;
21
22
# Major and minor version number of the Python MTT Client
23
MTTPyClientMajor =
"1"
24
MTTPyClientMinor =
"0"
25
MTTPyClientRelease =
"0"
26
MTTPyClientGreek =
"a1"
27
28
## @addtogroup Tools
29
# @{
30
# @addtogroup Version
31
# @section MTTVersionPlugin
32
# A simple plugin for returning the MTT Version
33
# @}
34
class
MTTVersionPlugin
(
VersionMTTTool
):
35
36
def
__init__
(self):
37
# initialise parent class
38
VersionMTTTool.__init__(self)
39
self.
options
= {}
40
41
42
def
activate
(self):
43
# get the automatic procedure from IPlugin
44
IPlugin.activate(self)
45
return
46
47
48
def
deactivate
(self):
49
IPlugin.deactivate(self)
50
return
51
52
def
print_name
(self):
53
return
"MTTVersion"
54
55
def
print_options
(self, testDef, prefix):
56
lines = testDef.printOptions(self.
options
)
57
for
line
in
lines:
58
print(prefix + line)
59
return
60
61
def
getVersion
(self):
62
return
'{}.{}.{}{}'
.format(MTTMajor, MTTMinor, MTTRelease, MTTGreek)
63
64
def
getClientVersion
(self):
65
return
'{}.{}.{}{}'
.format(MTTPyClientMajor, MTTPyClientMinor, MTTPyClientRelease, MTTPyClientGreek)
MTTVersionPlugin.MTTVersionPlugin.__init__
def __init__
Definition:
MTTVersionPlugin.py:36
MTTVersionPlugin.MTTVersionPlugin.print_name
def print_name
Definition:
MTTVersionPlugin.py:52
MTTVersionPlugin.MTTVersionPlugin.print_options
def print_options
Definition:
MTTVersionPlugin.py:55
MTTVersionPlugin.MTTVersionPlugin.getVersion
def getVersion
Definition:
MTTVersionPlugin.py:61
MTTVersionPlugin.MTTVersionPlugin.activate
def activate
Definition:
MTTVersionPlugin.py:42
MTTVersionPlugin.MTTVersionPlugin.getClientVersion
def getClientVersion
Definition:
MTTVersionPlugin.py:64
VersionMTTTool.VersionMTTTool
Definition:
VersionMTTTool.py:18
MTTVersionPlugin.MTTVersionPlugin.options
options
Definition:
MTTVersionPlugin.py:39
MTTVersionPlugin.MTTVersionPlugin
Definition:
MTTVersionPlugin.py:34
MTTVersionPlugin.MTTVersionPlugin.deactivate
def deactivate
Definition:
MTTVersionPlugin.py:48
Generated by
1.8.6