import functest.ci.tier_builder as tb
import functest.core.testcase as testcase
-# __name__ cannot be used here
LOGGER = logging.getLogger('functest.ci.run_tests')
-
-CONFIG_FUNCTEST_PATH = pkg_resources.resource_filename(
- 'functest', 'ci/config_functest.yaml')
-
ENV_FILE = "/home/opnfv/functest/conf/env_file"
@staticmethod
def source_envfile(rc_file=ENV_FILE):
"""Source the env file passed as arg"""
+ if not os.path.isfile(rc_file):
+ LOGGER.debug("No env file %s found", rc_file)
+ return
with open(rc_file, "r") as rcfd:
+ LOGGER.info("Sourcing env file %s", rc_file)
for line in rcfd:
var = (line.rstrip('"\n').replace('export ', '').split(
"=") if re.search(r'(.*)=(.*)', line) else None)
field_names=['tiers', 'order', 'CI Loop', 'description',
'testcases'])
for tier in self.tiers.get_tiers():
- ci_loop = os.environ.get('CI_LOOP', None)
- if (tier.get_tests() and ci_loop and
+ ci_loop = os.environ.get('CI_LOOP', 'daily')
+ if (tier.get_tests() and
re.search(ci_loop, tier.get_ci_loop()) is not None):
tiers_to_run.append(tier)
msg.add_row([tier.get_name(), tier.get_order(),