summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ci/run_tests.py21
-rw-r--r--ci/testcases.yaml20
-rw-r--r--ci/tier_builder.py2
-rw-r--r--ci/tier_handler.py9
-rw-r--r--cli/cli_base.py2
5 files changed, 35 insertions, 19 deletions
diff --git a/ci/run_tests.py b/ci/run_tests.py
index f30e7b961..5dba18190 100644
--- a/ci/run_tests.py
+++ b/ci/run_tests.py
@@ -10,6 +10,7 @@
import argparse
import os
+import re
import sys
import functest.ci.tier_builder as tb
@@ -101,15 +102,25 @@ def run_tier(tier):
def run_all(tiers):
summary = ""
+ BUILD_TAG = os.getenv('BUILD_TAG')
+ if BUILD_TAG is not None and re.search("daily", BUILD_TAG) is not None:
+ CI_LOOP = "daily"
+ else:
+ CI_LOOP = "weekly"
+
+ tiers_to_run = []
+
for tier in tiers.get_tiers():
- summary += ("\n - %s. %s:\n\t %s"
- % (tier.get_order(),
- tier.get_name(),
- tier.get_test_names()))
+ if re.search(CI_LOOP, tier.get_ci_loop()) is not None:
+ tiers_to_run.append(tier)
+ summary += ("\n - %s. %s:\n\t %s"
+ % (tier.get_order(),
+ tier.get_name(),
+ tier.get_test_names()))
logger.info("Tiers to be executed:%s" % summary)
- for tier in tiers.get_tiers():
+ for tier in tiers_to_run:
run_tier(tier)
diff --git a/ci/testcases.yaml b/ci/testcases.yaml
index 7f701d1a3..045068154 100644
--- a/ci/testcases.yaml
+++ b/ci/testcases.yaml
@@ -2,7 +2,7 @@ tiers:
-
name: healthcheck
order: 0
- ci: daily
+ ci_loop: '(daily)|(weekly)'
description : >-
First tier to be executed to verify the basic
operations in the VIM.
@@ -20,15 +20,15 @@ tiers:
-
name: smoke
order: 1
- ci: daily
+ ci_loop: '(daily)|(weekly)'
description : >-
Set of basic Functional tests to validate the OpenStack deployment.
testcases:
-
name: vping_ssh
description: >-
- This test case verifies: 1) SSH to an instance using floating
- IPs over the public network. 2) Connectivity between 2 instances
+ This test case verifies: 1) SSH to an instance using floating
+ IPs over the public network. 2) Connectivity between 2 instances
over a private network.
dependencies:
installer: ''
@@ -37,7 +37,7 @@ tiers:
-
name: vping_userdata
description: >-
- This test case verifies: 1) Boot a VM with given userdata.
+ This test case verifies: 1) Boot a VM with given userdata.
2) Connectivity between 2 instances over a private network.
dependencies:
installer: ''
@@ -76,7 +76,7 @@ tiers:
-
name: sdn_suites
order: 2
- ci: daily
+ ci_loop: '(daily)|(weekly)'
description : >-
Test suites corresponding to the different
SDN Controllers existing in OPNFV.
@@ -113,7 +113,7 @@ tiers:
-
name: features
order: 3
- ci: daily
+ ci_loop: '(daily)|(weekly)'
description : >-
Test suites from feature projects
integrated in functest
@@ -145,7 +145,7 @@ tiers:
-
name: tempest
order: 4
- ci: weekly
+ ci_loop: 'weekly'
description : >-
This test case runs the full set of the OpenStack Tempest suite.
testcases:
@@ -162,7 +162,7 @@ tiers:
-
name: rally
order: 5
- ci: weekly
+ ci_loop: 'weekly'
description : >-
Rally suite from the OpenStack community.
testcases:
@@ -178,7 +178,7 @@ tiers:
-
name: vnf
order: 6
- ci: weekly
+ ci_loop: 'weekly'
description : >-
Collection of VNF test cases.
testcases:
diff --git a/ci/tier_builder.py b/ci/tier_builder.py
index 05bcc8f33..4723bf4fa 100644
--- a/ci/tier_builder.py
+++ b/ci/tier_builder.py
@@ -38,7 +38,7 @@ class TierBuilder:
for dic_tier in self.dic_tier_array:
tier = th.Tier(name=dic_tier['name'],
order=dic_tier['order'],
- ci=dic_tier['ci'],
+ ci_loop=dic_tier['ci_loop'],
description=dic_tier['description'])
for dic_testcase in dic_tier['testcases']:
diff --git a/ci/tier_handler.py b/ci/tier_handler.py
index af6345f06..dd0d10c9e 100644
--- a/ci/tier_handler.py
+++ b/ci/tier_handler.py
@@ -29,11 +29,11 @@ def split_text(text, max_len):
class Tier:
- def __init__(self, name, order, ci, description=""):
+ def __init__(self, name, order, ci_loop, description=""):
self.tests_array = []
self.name = name
self.order = order
- self.ci = ci
+ self.ci_loop = ci_loop
self.description = description
def add_test(self, testcase):
@@ -70,6 +70,9 @@ class Tier:
def get_order(self):
return self.order
+ def get_ci_loop(self):
+ return self.ci_loop
+
def __str__(self):
lines = split_text(self.description, LINE_LENGTH-6)
@@ -78,6 +81,8 @@ class Tier:
out += ("| Tier: " + self.name.ljust(LINE_LENGTH - 10) + "|\n")
out += ("+%s+\n" % ("=" * (LINE_LENGTH - 2)))
out += ("| Order: " + str(self.order).ljust(LINE_LENGTH - 10) + "|\n")
+ out += ("| CI Loop: " + str(self.ci_loop).ljust(LINE_LENGTH - 12) +
+ "|\n")
out += ("| Description:".ljust(LINE_LENGTH - 1) + "|\n")
for line in lines:
out += ("| " + line.ljust(LINE_LENGTH - 7) + " |\n")
diff --git a/cli/cli_base.py b/cli/cli_base.py
index 25696dbe9..583b0ab8d 100644
--- a/cli/cli_base.py
+++ b/cli/cli_base.py
@@ -82,7 +82,7 @@ def os_show_credentials():
@openstack.command('fetch-rc', help="Fetch the OpenStack RC file from "
- "the installer")
+ "the installer.")
def os_fetch_rc():
_openstack.fetch_credentials()