X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=functest%2Fopnfv_tests%2Fopenstack%2Ftempest%2Ftempest.py;h=cb8e9b4a5384881bcb13051f1e89f9d5a2d62316;hb=a28e2b40877f022f6cc8bbc3ad9b586ef3dd126c;hp=a41d07c7e39a49000d21d3f78ad228690be9c3ca;hpb=2d0027b13ed1a5a6f35666b2b74be0fc8b4f7b5f;p=functest.git diff --git a/functest/opnfv_tests/openstack/tempest/tempest.py b/functest/opnfv_tests/openstack/tempest/tempest.py index a41d07c7e..cb8e9b4a5 100644 --- a/functest/opnfv_tests/openstack/tempest/tempest.py +++ b/functest/opnfv_tests/openstack/tempest/tempest.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python # # Copyright (c) 2015 All rights reserved # This program and the accompanying materials @@ -28,7 +28,7 @@ import functest.utils.functest_utils as ft_utils logger = logging.getLogger(__name__) -class TempestCommon(testcase.TestCase): +class TempestCommon(testcase.OSGCTestCase): def __init__(self, **kwargs): super(TempestCommon, self).__init__(**kwargs) @@ -81,8 +81,8 @@ class TempestCommon(testcase.TestCase): result_file = open(conf_utils.TEMPEST_LIST, 'w') black_tests = [] try: - installer_type = CONST.INSTALLER_TYPE - deploy_scenario = CONST.DEPLOY_SCENARIO + installer_type = CONST.__getattribute__('INSTALLER_TYPE') + deploy_scenario = CONST.__getattribute__('DEPLOY_SCENARIO') if (bool(installer_type) * bool(deploy_scenario)): # if INSTALLER_TYPE and DEPLOY_SCENARIO are set we read the # file @@ -119,9 +119,9 @@ class TempestCommon(testcase.TestCase): header = ("Tempest environment:\n" " SUT: %s\n Scenario: %s\n Node: %s\n Date: %s\n" % - (CONST.INSTALLER_TYPE, - CONST.DEPLOY_SCENARIO, - CONST.NODE_NAME, + (CONST.__getattribute__('INSTALLER_TYPE'), + CONST.__getattribute__('DEPLOY_SCENARIO'), + CONST.__getattribute__('NODE_NAME'), time.strftime("%a %b %d %H:%M:%S %Z %Y"))) f_stdout = open( @@ -148,7 +148,7 @@ class TempestCommon(testcase.TestCase): first_pos = line.index("UUID=") + len("UUID=") last_pos = line.index(") for deployment") self.VERIFICATION_ID = line[first_pos:last_pos] - logger.debug('Verication UUID: %s' % self.VERIFICATION_ID) + logger.debug('Verification UUID: %s', self.VERIFICATION_ID) f_stdout.write(line) p.wait() @@ -273,7 +273,8 @@ class TempestMultisite(TempestCommon): TempestCommon.__init__(self, **kwargs) self.MODE = "feature_multisite" self.OPTION = "--concurrency 1" - conf_utils.install_verifier_ext(CONST.dir_repo_kingbird) + conf_utils.install_verifier_ext( + CONST.__getattribute__('dir_repo_kingbird')) class TempestCustom(TempestCommon):