pymtt
 All Classes Namespaces Files Functions Variables Groups
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 # @}
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)