summaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorSerenaFeng <feng.xiaowei@zte.com.cn>2016-07-29 15:16:14 +0800
committerSerenaFeng <feng.xiaowei@zte.com.cn>2016-07-29 15:16:14 +0800
commitc6276aad7b90561fa97d45ea1020b061b7c9ccd1 (patch)
tree2f041ca55e2c1badd6201780d70f087e52cd9caa /utils
parent37f3f67687ad8c71a90328d1b9c2c011f0843a59 (diff)
unify test results logger and apply to parser
refine a unified method to log the test results and use it to parser. JIRA: FUNCTEST-397 Change-Id: I5ed6b04107be5590b1d9d5683c8f1846fef5a4d4 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
Diffstat (limited to 'utils')
-rw-r--r--utils/functest_utils.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/utils/functest_utils.py b/utils/functest_utils.py
index b46dc7dda..a21ac4466 100644
--- a/utils/functest_utils.py
+++ b/utils/functest_utils.py
@@ -163,6 +163,27 @@ def get_db_url(logger=None):
return db_url
+def logger_test_results(logger, project, case_name, status, details):
+ pod_name = get_pod_name(logger)
+ scenario = get_scenario(logger)
+ version = get_version(logger)
+ build_tag = get_build_tag(logger)
+
+ logger.info("Pushing %(p)s/%(n)s results: TEST_DB_URL=%(db)s "
+ "pod_name=%(pod)s version=%(v)s scenario=%(s)s "
+ "criteria=%(c)s details=%(d)s" % {
+ 'p': project,
+ 'n': case_name,
+ 'db': get_db_url(),
+ 'pod': pod_name,
+ 'v': version,
+ 's': scenario,
+ 'c': status,
+ 'b': build_tag,
+ 'd': details,
+ })
+
+
def push_results_to_db(project, case_name, logger,
start_date, stop_date, criteria, details):
"""
.nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ }
Name:		opnfv-apex-release
Version:	danube
Release:	%{release}
Summary:	RPM Release file

Group:		System Environment
License:	Apache 2.0
URL:		https://gerrit.opnfv.org/gerrit/apex.git
Source0:	opnfv-apex-release.tar.gz

BuildArch:	noarch
Requires:	rdo-release = newton epel-release libvirt-python

%description
RPM Release file that provides a yum repo file to install OPNFV Apex

%prep
%setup -q

%install
mkdir -p %{buildroot}%{_sysconfdir}/yum.repos.d/
install config/yum.repos.d/opnfv-apex.repo %{buildroot}%{_sysconfdir}/yum.repos.d/

%files
%defattr(644, root, root, -)
%{_sysconfdir}/yum.repos.d/opnfv-apex.repo

%changelog
* Wed Nov 23 2016 Dan Radez <dradez@redhat.com> - 3.0-1
- Initial Packaging