from xtesting.utils import decorators
from xtesting.utils import env
+from xtesting.utils import constants
__author__ = "Cedric Ollivier <cedric.ollivier@orange.com>"
EX_PUBLISH_ARTIFACTS_ERROR = os.EX_SOFTWARE - 4
"""publish_artifacts() failed"""
- dir_results = "/var/lib/xtesting/results"
+ dir_results = constants.RESULTS_DIR
_job_name_rule = "(dai|week)ly-(.+?)-[0-9]*"
headers = {'Content-Type': 'application/json'}
__logger = logging.getLogger(__name__)
self.start_time = 0
self.stop_time = 0
self.is_skipped = False
- self.output_log_name = 'xtesting.log'
- self.output_debug_log_name = 'xtesting.debug.log'
- self.res_dir = "{}/{}".format(self.dir_results, self.case_name)
+ self.output_log_name = os.path.basename(constants.LOG_PATH)
+ self.output_debug_log_name = os.path.basename(constants.DEBUG_LOG_PATH)
+ self.res_dir = os.path.join(self.dir_results, self.case_name)
def __str__(self):
try:
ENV_FILE = '/var/lib/xtesting/conf/env_file'
-RESULTS_DIR = '/var/lib/xtesting/results/'
+RESULTS_DIR = '/var/lib/xtesting/results'
LOG_PATH = os.path.join(RESULTS_DIR, 'xtesting.log')
DEBUG_LOG_PATH = os.path.join(RESULTS_DIR, 'xtesting.debug.log')