summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--docker/Dockerfile3
-rw-r--r--docs/dovetailtool/dovetail.tool.installation.rst30
-rw-r--r--dovetail/conf/dovetail_config.yml7
-rw-r--r--dovetail/report.py16
-rw-r--r--requirements.txt1
-rw-r--r--setup.cfg1
6 files changed, 47 insertions, 11 deletions
diff --git a/docker/Dockerfile b/docker/Dockerfile
index 2e919ee2..038993bc 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -15,7 +15,8 @@ RUN \
&& \
apt-get update && apt-get -y install docker.io \
&& \
- pip install pyyaml \
+ pip install pbr \
+ pyyaml \
click \
jinja2
diff --git a/docs/dovetailtool/dovetail.tool.installation.rst b/docs/dovetailtool/dovetail.tool.installation.rst
index 93871e76..288de0b3 100644
--- a/docs/dovetailtool/dovetail.tool.installation.rst
+++ b/docs/dovetailtool/dovetail.tool.installation.rst
@@ -66,6 +66,24 @@ access to complete the installation.
At this point the environment is now ready for Dovetail execution.
+The tool ``tox`` is used, environment preparation progress is included in tox
+until completely replaced, the configuration information is set in:
+
+::
+
+ setup.py
+ setup.cfg
+ requirements.txt
+ test-requirements.txt
+
+by running:
+
+::
+
+ tox
+
+the environment prepartion is completed.
+
Compliance and certification test cases
----------------------------------------
@@ -183,3 +201,15 @@ Results Output
The running log is stored in ``/home/opnfv/dovetail/results/dovetail.log``.
The compliance report is stored in ``/home/opnfv/dovetail/results/dovetail_report.txt``.
+
+Dovetail Version and Release
+############################
+
+Dovetail version tag is shown in ``setup.cfg``, which will also shown in the
+``dovetail report``. At the time of version release, just to set the version value in
+``setup.cfg``.
+
+# TO DO: (which should be discussed)
+1)how to pubish version, such as both the online and offline package in some website
+or somewhere.
+2)provide version download address, userguide, etc.
diff --git a/dovetail/conf/dovetail_config.yml b/dovetail/conf/dovetail_config.yml
index c8f9fbe4..42f8ca99 100644
--- a/dovetail/conf/dovetail_config.yml
+++ b/dovetail/conf/dovetail_config.yml
@@ -7,8 +7,10 @@ cli_file_name: 'cmd_config.yml'
# OPENSTACK Credential file
creds: '/home/opnfv/dovetail/openstack.creds'
-# TO DO: once version scheme settled, adjust accordingly
-repo: 'https://github.com/opnfv/dovetail/tree/master/'
+repo:
+ tag: tag_name
+ path: https://github.com/opnfv/dovetail/tree/
+
COMPLIANCE_PATH: compliance/
TESTCASE_PATH: testcase/
# testsuite supported, should adjust accordingly
@@ -51,4 +53,3 @@ validate_input:
valid_docker_tag:
- 'stable'
- 'latest'
-
diff --git a/dovetail/report.py b/dovetail/report.py
index 8c302b60..5da6ef87 100644
--- a/dovetail/report.py
+++ b/dovetail/report.py
@@ -15,6 +15,8 @@ import os
import datetime
import uuid
+from pbr import version
+
import utils.dovetail_logger as dt_logger
from utils.dovetail_config import DovetailConfig as dt_cfg
@@ -47,8 +49,8 @@ class Report:
@classmethod
def generate_json(cls, testsuite_yaml, testarea, duration):
report_obj = {}
- # TO DO: once version scheme settled, adjust accordingly
- report_obj['version'] = '1.0'
+ report_obj['version'] = \
+ version.VersionInfo('dovetail').version_string()
report_obj['testsuite'] = testsuite_yaml['name']
# TO DO: once dashboard url settled, adjust accordingly
report_obj['dashboard'] = None
@@ -112,13 +114,15 @@ class Report:
testcase_num[area] = 0
testcase_passnum[area] = 0
- # TO DO: once version scheme settled, adjust accordingly
- spec_link = dt_cfg.dovetail_config['repo'] + 'dovetail/testcase'
+ repo_link = dt_cfg.dovetail_config['repo']['path'] + \
+ dt_cfg.dovetail_config['repo']['tag']
+
for testcase in report_data['testcases_list']:
pattern = re.compile(
'|'.join(dt_cfg.dovetail_config['testarea_supported']))
area = pattern.findall(testcase['name'])[0]
result_dir = dt_cfg.dovetail_config['result_dir']
+ spec_link = repo_link + '/dovetail/testcase'
sub_report[area] += '- <%s> %s result: <%s>\n' %\
(spec_link, testcase['name'], result_dir)
testcase_num[area] += 1
@@ -135,9 +139,7 @@ class Report:
for key in sub_report:
if testcase_num[key] != 0:
pass_rate = testcase_passnum[key] / testcase_num[key]
- # TO DO: once version scheme settled, adjust accordingly
- doc_link = dt_cfg.dovetail_config['repo'] +\
- ('docs/testsuites/%s' % key)
+ doc_link = repo_link + ('/docs/testsuites/%s' % key)
report_txt += '- %s results: <%s> pass %.2f%%\n' %\
(key, doc_link, pass_rate * 100)
for key in sub_report:
diff --git a/requirements.txt b/requirements.txt
index 60f43d71..502fb371 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,3 +1,4 @@
+pbr>=1.8
Jinja2>=2.6
PyYAML>=3.10
Click
diff --git a/setup.cfg b/setup.cfg
index 46f2c4d4..de8b27fa 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,5 +1,6 @@
[metadata]
name = dovetail
+version = 0.1
home-page = https://wiki.opnfv.org/display/dovetail
[entry_points]