aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xci/exec_test.sh1
-rwxr-xr-xtestcases/OpenStack/tempest/run_tempest.py32
-rwxr-xr-xtestcases/features/sfc/server_presetup_CI.bash1
-rwxr-xr-xtestcases/features/sfc/sfc.py41
4 files changed, 33 insertions, 42 deletions
diff --git a/ci/exec_test.sh b/ci/exec_test.sh
index cd5ae1822..2ef714d56 100755
--- a/ci/exec_test.sh
+++ b/ci/exec_test.sh
@@ -116,6 +116,7 @@ function run_test(){
$clean_flag --sanity all $report
;;
"bgpvpn")
+ sdnvpn_repo_dir=${repos_dir}/sdnvpn/test/functest/
python ${sdnvpn_repo_dir}/run_tests.py $report
;;
"onos")
diff --git a/testcases/OpenStack/tempest/run_tempest.py b/testcases/OpenStack/tempest/run_tempest.py
index 8d23b7415..ca9e928a8 100755
--- a/testcases/OpenStack/tempest/run_tempest.py
+++ b/testcases/OpenStack/tempest/run_tempest.py
@@ -21,11 +21,11 @@ import shutil
import subprocess
import sys
import time
-import yaml
import functest.utils.functest_logger as ft_logger
import functest.utils.functest_utils as ft_utils
import functest.utils.openstack_utils as os_utils
+import yaml
modes = ['full', 'smoke', 'baremetal', 'compute', 'data_processing',
@@ -341,7 +341,7 @@ def apply_tempest_blacklist():
black_list_yaml = yaml.safe_load(black_list_file)
black_list_file.close()
for item in black_list_yaml:
- scenarios = item['sceanrios']
+ scenarios = item['scenarios']
installers = item['installers']
if (deploy_scenario in scenarios and
installer_type in installers):
@@ -427,34 +427,20 @@ def run_tempest(OPTION):
dur_sec_int = dur_sec_int + 60 * dur_min
stop_time = time.time()
- status = "FAIL"
try:
diff = (int(num_tests) - int(num_failures))
success_rate = 100 * diff / int(num_tests)
except:
success_rate = 0
- # For Tempest we assume that the success rate is above 90%
- if "smoke" in args.mode:
- case_name = "tempest_smoke_serial"
- # Note criteria hardcoded...TODO read it from testcases.yaml
- success_criteria = 100
- if success_rate >= success_criteria:
- status = "PASS"
- else:
- logger.info("Tempest success rate: %s%%. The success criteria to "
- "pass this test is %s%%. Marking the test as FAILED." %
- (success_rate, success_criteria))
+ if 'smoke' in args.mode:
+ case_name = 'tempest_smoke_serial'
else:
- case_name = "tempest_full_parallel"
- # Note criteria hardcoded...TODO read it from testcases.yaml
- success_criteria = 80
- if success_rate >= success_criteria:
- status = "PASS"
- else:
- logger.info("Tempest success rate: %s%%. The success criteria to "
- "pass this test is %s%%. Marking the test as FAILED." %
- (success_rate, success_criteria))
+ case_name = 'tempest_full_parallel'
+
+ status = ft_utils.check_success_rate(case_name, success_rate)
+ logger.info("Tempest %s success_rate is %s%%, is marked as %s"
+ % (case_name, success_rate, status))
# Push results in payload of testcase
if args.report:
diff --git a/testcases/features/sfc/server_presetup_CI.bash b/testcases/features/sfc/server_presetup_CI.bash
index 785e7a7fc..f959ced5b 100755
--- a/testcases/features/sfc/server_presetup_CI.bash
+++ b/testcases/features/sfc/server_presetup_CI.bash
@@ -4,6 +4,7 @@ ssh_options='-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no'
BASEDIR=`dirname $0`
INSTALLER_IP=${INSTALLER_IP:-10.20.0.2}
+pushd $BASEDIR
ip=`sshpass -p r00tme ssh $ssh_options root@${INSTALLER_IP} 'fuel node'|grep controller|awk '{print $10}' | head -1`
echo $ip
sshpass -p r00tme scp $ssh_options set-up-tacker.sh ${INSTALLER_IP}:/root
diff --git a/testcases/features/sfc/sfc.py b/testcases/features/sfc/sfc.py
index ad724dcac..511b5936b 100755
--- a/testcases/features/sfc/sfc.py
+++ b/testcases/features/sfc/sfc.py
@@ -53,6 +53,28 @@ TACKER_CHANGECLASSI = "sfc_change_classi.bash"
def main():
+ # Allow any port so that tacker commands reaches the server.
+ # This will be deleted when tacker is included in OPNFV installation
+
+ ssh_options = '-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no'
+ contr_cmd = ("sshpass -p r00tme ssh " + ssh_options + " root@10.20.0.2"
+ " 'fuel node'|grep controller|awk '{print $10}'")
+ logger.info("Executing tacker script: '%s'" % contr_cmd)
+ process = subprocess.Popen(contr_cmd,
+ shell=True,
+ stdout=subprocess.PIPE)
+ ip = process.stdout.readline().rstrip()
+
+ iptable_cmd1 = ("sshpass -p r00tme ssh " + ssh_options + " root@10.20.0.2"
+ " ssh " + ip + " iptables -P INPUT ACCEPT ")
+ iptable_cmd2 = ("sshpass -p r00tme ssh " + ssh_options + " root@10.20.0.2"
+ " ssh " + ip + " iptables -t nat -P INPUT ACCEPT ")
+
+ subprocess.call(iptable_cmd1, shell=True)
+ subprocess.call(iptable_cmd2, shell=True)
+
+# Getting the different clients
+
nova_client = os_utils.get_nova_client()
neutron_client = os_utils.get_neutron_client()
glance_client = os_utils.get_glance_client()
@@ -67,25 +89,6 @@ def main():
else:
logger.info("Using old image")
-# Allow any port so that tacker commands reaches the server.
-# CHECK IF THIS STILL MAKES SENSE WHEN TACKER IS INCLUDED IN OPNFV INSTALATION
-
- controller_command = ("sshpass -p r00tme ssh root@10.20.0.2"
- " 'fuel node'|grep controller|awk '{print $10}'")
- logger.info("Executing tacker script: '%s'" % controller_command)
- process = subprocess.Popen(controller_command,
- shell=True,
- stdout=subprocess.PIPE)
- ip = process.stdout.readline()
-
- iptable_command1 = ("sshpass -p r00tme ssh root@10.20.0.2 ssh"
- " " + ip + " iptables -P INPUT ACCEPT ")
- iptable_command2 = ("sshpass -p r00tme ssh root@10.20.0.2 ssh"
- " " + ip + " iptables -t nat -P INPUT ACCEPT ")
-
- subprocess.call(iptable_command1, shell=True)
- subprocess.call(iptable_command2, shell=True)
-
# Create glance image and the neutron network
image_id = os_utils.create_glance_image(glance_client,