aboutsummaryrefslogtreecommitdiffstats
path: root/ci
diff options
context:
space:
mode:
authorjose.lausuch <jose.lausuch@ericsson.com>2016-05-09 15:08:41 +0200
committerjose.lausuch <jose.lausuch@ericsson.com>2016-05-10 14:13:43 +0200
commit2d8974d6cebaa1428ab1a175ceb9a0432a84e615 (patch)
treee3b0c5d5108db3f824ef2aa5222a3e6ce06c0297 /ci
parentacd3d80504a56183a4909dce52b56bc7e15bc6cd (diff)
Adapt tiers to run depending on WEEKLY/DAILY
JIRA: FUNCTEST-244 Change-Id: I11bf28baff52b75b0f6c58845edc22f266dfcbe8 Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
Diffstat (limited to 'ci')
-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
4 files changed, 34 insertions, 18 deletions
diff --git a/ci/run_tests.py b/ci/run_tests.py
index f30e7b96..5dba1819 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 7f701d1a..04506815 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 05bcc8f3..4723bf4f 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 af6345f0..dd0d10c9 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")