diff options
author | Martin Klozik <martinx.klozik@intel.com> | 2015-08-19 07:52:39 +0100 |
---|---|---|
committer | Maryam Tahhan <maryam.tahhan@intel.com> | 2015-08-19 13:08:40 +0000 |
commit | c99fda7cb1019c036c5caa828e2febe935d4aaf0 (patch) | |
tree | 257a8afeefd46372db4e7e2e60ecfd25793f078a /vsperf | |
parent | 3af55a78fcd572f93b1a46178bffc4c8e90534f2 (diff) |
Initial reporting implemenation
Reporting from TOIT was merged and improved. Default template was modified
to support any testcase and to show more details about system environment.
Affected files:
* docs/NEWS.md
* testcases/testcase.py
* tools/report/__init__.py
* tools/report/report.jinja
* tools/report/report.py
* tools/systeminfo.py
* vsperf
JIRA: VSPERF-71
Change-Id: I4dc84ca69e5c292eae1f8dede1411c06ae3ef8af
Signed-off-by: Martin Klozik (martinx.klozik@intel.com)
Reviewed-by: Maryam Tahhan <maryam.tahhan@intel.com>
Reviewed-by: Billy O Mahony <billy.o.mahony@intel.com>
Diffstat (limited to 'vsperf')
-rwxr-xr-x | vsperf | 13 |
1 files changed, 11 insertions, 2 deletions
@@ -32,6 +32,7 @@ sys.dont_write_bytecode = True from conf import settings from core.loader import Loader from testcases import TestCase +from tools.report import report from tools import tasks from tools.collectors import collector from tools.pkt_gen import trafficgen @@ -373,7 +374,7 @@ def main(): exit() # create results directory - if not os.path.exists(results_dir): + if not os.path.exists(results_path): logger.info("Creating result directory: " + results_path) os.makedirs(results_path) @@ -397,8 +398,16 @@ def main(): #remove directory if no result files were created. if os.path.exists(results_path): - if os.listdir(results_path) == []: + files_list = os.listdir(results_path) + if files_list == []: shutil.rmtree(results_path) + else: + for file in files_list: + # generate report from all csv files + if file[-3:] == 'csv': + results_csv = os.path.join(results_path, file) + if os.path.isfile(results_csv) and os.access(results_csv, os.R_OK): + report.generate(testcases, results_csv) if __name__ == "__main__": main() |