diff options
author | liyin <liyin11@huawei.com> | 2017-05-08 09:04:32 +0000 |
---|---|---|
committer | liyin <liyin11@huawei.com> | 2017-05-10 11:16:02 +0000 |
commit | 6a8257127b3dce1f18a650afe6921a34b6c6f5b8 (patch) | |
tree | bfb2d60c1ce3f6688b92e5787818f222d620f52e /testsuites/vstf/vstf_scripts/vstf/controller/reporters/report/html/htmlcreator.py | |
parent | 2d9642a33a6a58f53aceba4ff3d6242f191f25f0 (diff) |
Delete testcase of rubbos and vstf.
JIRA:BOTTLENECK-167
This patch will delete vstf and rubbos testcase code.
Include some testcase config file,
if there will be someone who want to use this testcase
maybe B or C version code will contain those testcase.
if you use the D version code to run this two testcase
we will info you that:
Rubbos testsuite is not updating anymore.
This entrance for running Rubbos within Bottlenecks is no longer supported.
Change-Id: I04e4042ff3998b3696df2ed47a9ffab6f1620ec3
Signed-off-by: liyin <liyin11@huawei.com>
Diffstat (limited to 'testsuites/vstf/vstf_scripts/vstf/controller/reporters/report/html/htmlcreator.py')
-rw-r--r-- | testsuites/vstf/vstf_scripts/vstf/controller/reporters/report/html/htmlcreator.py | 88 |
1 files changed, 0 insertions, 88 deletions
diff --git a/testsuites/vstf/vstf_scripts/vstf/controller/reporters/report/html/htmlcreator.py b/testsuites/vstf/vstf_scripts/vstf/controller/reporters/report/html/htmlcreator.py deleted file mode 100644 index f866f185..00000000 --- a/testsuites/vstf/vstf_scripts/vstf/controller/reporters/report/html/htmlcreator.py +++ /dev/null @@ -1,88 +0,0 @@ -############################################################################## -# Copyright (c) 2015 Huawei Technologies Co.,Ltd and others. -# -# All rights reserved. This program and the accompanying materials -# are made available under the terms of the Apache License, Version 2.0 -# which accompanies this distribution, and is available at -# http://www.apache.org/licenses/LICENSE-2.0 -############################################################################## - - -import logging - -import vstf.common.candy_text as candy -from vstf.controller.reporters.report.provider.html_provider import HtmlProvider -from vstf.controller.settings.template_settings import TemplateSettings -from vstf.controller.settings.html_settings import HtmlSettings -from vstf.controller.reporters.report.html.html_base import HtmlBase, pyhtm - -LOG = logging.getLogger(__name__) - - -class HtmlCreator(HtmlBase): - - def create_story(self): - self.add_context() - - def add_context(self): - context = self._provider.get_context - self._raw_context(context) - - def _raw_context(self, context, ci=0, si=0, ui=0, level=-1): - _story = [] - for key, value in sorted(context.items()): - LOG.info(key) - LOG.info(value) - _sn, _node, _style = candy.text2tuple(key) - if _node in candy.dom: - if _node == candy.chapter: - ci = _style - elif _node == candy.section: - si = _style - else: - ui = _style - self._raw_context(value, ci, si, ui, level + 1) - - else: - LOG.info("node: %s %s" % (_node, candy.title)) - if _node == candy.title: - assert value - if level in range(len(candy.dom)): - if level == 0: - value[0] = "Chapter %s %s" % (ci, value[0]) - for title in value: - self._page << pyhtm.H2(title) - elif level == 1: - value[0] = "%s.%s %s" % (ci, si, value[0]) - for title in value: - self._page << pyhtm.H3(title) - else: - value[0] = "%s.%s.%s %s" % (ci, si, ui, value[0]) - for title in value: - self._page << pyhtm.H3(title) - - elif _node == candy.table: - self.add_table(value) - elif _node == candy.paragraph: - for para in value: - para = pyhtm.space(2) + para - self._page << pyhtm.P(para) - - -def unit_test(): - from vstf.common.log import setup_logging - setup_logging( - level=logging.DEBUG, - log_file="/var/log/html-creator.log", - clevel=logging.INFO) - - out_file = "vstf_report.html" - - info = TemplateSettings() - html_settings = HtmlSettings() - provider = HtmlProvider(info.settings, html_settings.settings) - reporter = HtmlCreator(provider) - reporter.create(out_file) - -if __name__ == '__main__': - unit_test() |