-chttps://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=$OPENSTACK_TAG \
-chttps://git.opnfv.org/functest-xtesting/plain/upper-constraints.txt?h=$BRANCH \
/src/functest-xtesting && \
- rm -r /src/functest-xtesting && \
- bash -c "mkdir -p /home/opnfv/xtesting/results/robot"
+ rm -r /src/functest-xtesting
CMD ["run_tests", "-t", "all"]
class=FileHandler
level=DEBUG
formatter=standard
-args=("/home/opnfv/xtesting/results/xtesting.log",)
+args=("/var/lib/xtesting/results/xtesting.log",)
[formatter_standard]
format=%(asctime)s - %(name)s - %(levelname)s - %(message)s
"""
import argparse
+import errno
import importlib
import logging
import logging.config
import enum
import prettytable
+import six
import yaml
from xtesting.ci import tier_builder
def main():
"""Entry point"""
+ try:
+ os.makedirs('/var/lib/xtesting/results/')
+ except OSError as ex:
+ if ex.errno != errno.EEXIST:
+ six.print_("Cannot create /var/lib/xtesting/results/")
+ return testcase.TestCase.EX_RUN_ERROR
logging.config.fileConfig(pkg_resources.resource_filename(
'xtesting', 'ci/logging.ini'))
logging.captureWarnings(True)
-
case_name: fifth
project_name: xtesting
+ enabled: false
criteria: 100
blocking: false
description: ''
"""Base model for single feature."""
__logger = logging.getLogger(__name__)
- dir_results = "/home/opnfv/xtesting/results"
+ dir_results = "/var/lib/xtesting/results"
def __init__(self, **kwargs):
super(Feature, self).__init__(**kwargs)
"""RobotFramework runner."""
__logger = logging.getLogger(__name__)
- dir_results = "/home/opnfv/xtesting/results"
+ dir_results = "/var/lib/xtesting/results"
def __init__(self, **kwargs):
self.res_dir = os.path.join(self.dir_results, 'robot')
_project_name = "bar"
_repo = "dir_repo_bar"
_cmd = "run_bar_tests.py"
- _output_file = '/home/opnfv/xtesting/results/foo.log'
+ _output_file = '/var/lib/xtesting/results/foo.log'
feature = None
@mock.patch('time.time', side_effect=[1, 2])
self._test_makedirs()
args[0].assert_called_once_with(self.test.res_dir)
+ @mock.patch('os.makedirs')
@mock.patch('robot.run')
def _test_parse_results(self, status, *args):
self.assertEqual(
*self.suites, log='NONE', output=self.test.xml_file,
report='NONE', stdout=mock.ANY, variable=self.variable,
variablefile=self.variablefile)
+ args[1].assert_called_once_with(self.test.res_dir)
def test_parse_results_exc(self):
with mock.patch.object(self.test, 'parse_results',
# pylint: disable=missing-docstring
-ENV_FILE = '/home/opnfv/xtesting/conf/env_file'
+ENV_FILE = '/var/lib/xtesting/conf/env_file'