aboutsummaryrefslogtreecommitdiffstats
path: root/functest/ci
diff options
context:
space:
mode:
Diffstat (limited to 'functest/ci')
-rwxr-xr-xfunctest/ci/config_functest.yaml12
-rwxr-xr-xfunctest/ci/config_patch.yaml6
-rwxr-xr-xfunctest/ci/exec_test.sh6
-rwxr-xr-xfunctest/ci/prepare_env.py58
-rwxr-xr-xfunctest/ci/testcases.yaml27
5 files changed, 66 insertions, 43 deletions
diff --git a/functest/ci/config_functest.yaml b/functest/ci/config_functest.yaml
index 489c395f..402e2999 100755
--- a/functest/ci/config_functest.yaml
+++ b/functest/ci/config_functest.yaml
@@ -5,8 +5,8 @@ general:
dir_odl: functest/opnfv_tests/sdn/odl
rally: functest/opnfv_tests/openstack/rally
tempest_cases: functest/opnfv_tests/openstack/tempest/custom_tests
- dir_onos: functest/opnfv_tests/sdn/onos/teston
- dir_onos_sfc: functest/opnfv_tests/sdn/onos/sfc
+ onos: functest/opnfv_tests/sdn/onos/teston
+ onos_sfc: functest/opnfv_tests/sdn/onos/sfc
# Absolute path
home: /home/opnfv
@@ -18,7 +18,7 @@ general:
repo_vims_test: /home/opnfv/repos/vnfs/vims-test
repo_sdnvpn: /home/opnfv/repos/sdnvpn
repo_sfc: /home/opnfv/repos/sfc
- dir_repo_onos: /home/opnfv/repos/onos
+ repo_onos: /home/opnfv/repos/onos
repo_promise: /home/opnfv/repos/promise
repo_netready: /home/opnfv/repos/netready
repo_barometer: /home/opnfv/repos/barometer
@@ -43,8 +43,8 @@ general:
creds: /home/opnfv/functest/conf/openstack.creds
snapshot_file: /home/opnfv/functest/conf/openstack_snapshot.yaml
- image_name: Cirros-0.3.4
- image_file_name: cirros-0.3.4-x86_64-disk.img
+ image_name: Cirros-0.3.5
+ image_file_name: cirros-0.3.5-x86_64-disk.img
image_disk_format: qcow2
image_username: cirros
image_password: cubswin:)
@@ -67,7 +67,7 @@ general:
testcases_yaml: /home/opnfv/repos/functest/functest/ci/testcases.yaml
healthcheck:
- disk_image: /home/opnfv/functest/data/cirros-0.3.4-x86_64-disk.img
+ disk_image: /home/opnfv/functest/data/cirros-0.3.5-x86_64-disk.img
disk_format: qcow2
wait_time: 60
diff --git a/functest/ci/config_patch.yaml b/functest/ci/config_patch.yaml
index 46064a07..d984a3f4 100755
--- a/functest/ci/config_patch.yaml
+++ b/functest/ci/config_patch.yaml
@@ -1,12 +1,12 @@
lxd:
general:
openstack:
- image_name: Cirros-0.3.4
- image_file_name: cirros-0.3.4-x86_64-lxc.tar.gz
+ image_name: Cirros-0.3.5
+ image_file_name: cirros-0.3.5-x86_64-lxc.tar.gz
image_disk_format: raw
healthcheck:
- disk_image: /home/opnfv/functest/data/cirros-0.3.4-x86_64-lxc.tar.gz
+ disk_image: /home/opnfv/functest/data/cirros-0.3.5-x86_64-lxc.tar.gz
disk_format: raw
fdio:
general:
diff --git a/functest/ci/exec_test.sh b/functest/ci/exec_test.sh
index aa0cfaf7..6f776101 100755
--- a/functest/ci/exec_test.sh
+++ b/functest/ci/exec_test.sh
@@ -94,12 +94,6 @@ function run_test(){
--osusername ${OS_USERNAME} \
${args}
;;
- "onos")
- python ${FUNCTEST_TEST_DIR}/sdn/onos/teston/onos.py
- ;;
- "onos_sfc")
- python ${FUNCTEST_TEST_DIR}/sdn/onos/teston/onos.py -t sfc
- ;;
"ovno")
# suite under rewritting for colorado
# no need to run anything until refactoring done
diff --git a/functest/ci/prepare_env.py b/functest/ci/prepare_env.py
index f5bae6a0..724ea14d 100755
--- a/functest/ci/prepare_env.py
+++ b/functest/ci/prepare_env.py
@@ -31,6 +31,7 @@ logger = ft_logger.Logger("prepare_env").getLogger()
handler = None
# set the architecture to default
pod_arch = None
+arch_filter = ['aarch64']
CONFIG_FUNCTEST_PATH = CONST.CONFIG_FUNCTEST_YAML
CONFIG_PATCH_PATH = os.path.join(os.path.dirname(
@@ -115,24 +116,28 @@ def get_deployment_handler():
'functest/ci/installer_params.yaml')
if (CONST.INSTALLER_IP and CONST.INSTALLER_TYPE and
CONST.INSTALLER_TYPE in opnfv_constants.INSTALLERS):
- installer_params = ft_utils.get_parameter_from_yaml(
- CONST.INSTALLER_TYPE, installer_params_yaml)
-
- user = installer_params.get('user', None)
- password = installer_params.get('password', None)
- pkey = installer_params.get('pkey', None)
-
try:
- handler = factory.Factory.get_handler(
- installer=CONST.INSTALLER_TYPE,
- installer_ip=CONST.INSTALLER_IP,
- installer_user=user,
- installer_pwd=password,
- pkey_file=pkey)
- if handler:
- pod_arch = handler.get_arch()
- except Exception as e:
- logger.debug("Cannot get deployment information. %s" % e)
+ installer_params = ft_utils.get_parameter_from_yaml(
+ CONST.INSTALLER_TYPE, installer_params_yaml)
+ except ValueError as e:
+ logger.debug('Printing deployment info is not supported for %s' %
+ CONST.INSTALLER_TYPE)
+ logger.debug(e)
+ else:
+ user = installer_params.get('user', None)
+ password = installer_params.get('password', None)
+ pkey = installer_params.get('pkey', None)
+ try:
+ handler = factory.Factory.get_handler(
+ installer=CONST.INSTALLER_TYPE,
+ installer_ip=CONST.INSTALLER_IP,
+ installer_user=user,
+ installer_pwd=password,
+ pkey_file=pkey)
+ if handler:
+ pod_arch = handler.get_arch()
+ except Exception as e:
+ logger.debug("Cannot get deployment information. %s" % e)
def create_directories():
@@ -196,8 +201,7 @@ def source_rc_file():
raise Exception("The file %s is empty." % CONST.openstack_creds)
logger.info("Sourcing the OpenStack RC file...")
- os_utils.source_credentials(
- CONST.openstack_creds)
+ os_utils.source_credentials(CONST.openstack_creds)
for key, value in os.environ.iteritems():
if re.search("OS_", key):
if key == 'OS_AUTH_URL':
@@ -210,10 +214,15 @@ def source_rc_file():
CONST.OS_PASSWORD = value
-def patch_config_file(patch_file_path, arch_filter=None):
- if arch_filter and pod_arch not in arch_filter:
- return
+def patch_config_file():
+ patch_file(CONFIG_PATCH_PATH)
+
+ if pod_arch and pod_arch in arch_filter:
+ patch_file(CONFIG_AARCH64_PATCH_PATH)
+
+def patch_file(patch_file_path):
+ logger.debug('Updating file: %s', patch_file_path)
with open(patch_file_path) as f:
patch_file = yaml.safe_load(f)
@@ -250,7 +259,7 @@ def verify_deployment():
def install_rally():
print_separator()
- if 'aarch64' in pod_arch:
+ if pod_arch and pod_arch in arch_filter:
logger.info("Apply aarch64 specific to rally config...")
with open(RALLY_AARCH64_PATCH_PATH, "r") as f:
rally_patch_conf = f.read()
@@ -350,8 +359,7 @@ def main(**kwargs):
get_deployment_handler()
create_directories()
source_rc_file()
- patch_config_file(CONFIG_PATCH_PATH)
- patch_config_file(CONFIG_AARCH64_PATCH_PATH, 'aarch64')
+ patch_config_file()
verify_deployment()
install_rally()
install_tempest()
diff --git a/functest/ci/testcases.yaml b/functest/ci/testcases.yaml
index f8bbe9b7..722e8796 100755
--- a/functest/ci/testcases.yaml
+++ b/functest/ci/testcases.yaml
@@ -78,7 +78,7 @@ tiers:
over a private network.
dependencies:
installer: ''
- scenario: '^((?!bgpvpn|odl_l3).)*$'
+ scenario: '^((?!odl_l3).)*$'
run:
module: 'functest.opnfv_tests.openstack.vping.vping_ssh'
class: 'VPingSSH'
@@ -125,7 +125,7 @@ tiers:
Rally suite in smoke mode.
dependencies:
installer: ''
- scenario: '^((?!bgpvpn).)*$'
+ scenario: ''
run:
module: 'functest.opnfv_tests.openstack.rally.rally'
class: 'RallySanity'
@@ -184,7 +184,9 @@ tiers:
dependencies:
installer: ''
scenario: 'onos'
-
+ run:
+ module: 'functest.opnfv_tests.sdn.onos.onos'
+ class: 'Onos'
-
name: snaps_smoke
@@ -319,6 +321,9 @@ tiers:
dependencies:
installer: ''
scenario: 'onos-sfc'
+ run:
+ module: 'functest.opnfv_tests.sdn.onos.onos'
+ class: 'OnosSfc'
-
name: parser
criteria: 'ret == 0'
@@ -423,6 +428,22 @@ tiers:
run:
module: 'functest.opnfv_tests.openstack.tempest.tempest'
class: 'TempestDefcore'
+ -
+ name: tempest_custom
+ criteria: 'success_rate == 100%'
+ blocking: false
+ description: >-
+ The test case allows running a customized list of tempest
+ test cases defined in a file under
+ <dir_functest_repo>/functest/opnfv_tests/openstack/
+ /tempest/custom_tests/test_list.txt
+ The file is empty and can be customized with the desired tests.
+ dependencies:
+ installer: 'unknown'
+ scenario: 'unknown'
+ run:
+ module: 'functest.opnfv_tests.openstack.tempest.tempest'
+ class: 'TempestCustom'
# -
# name: rally_full
# criteria: 'success_rate >= 90%'