aboutsummaryrefslogtreecommitdiffstats
path: root/vsperf
diff options
context:
space:
mode:
authorMartin Klozik <martinx.klozik@intel.com>2015-08-19 07:52:39 +0100
committerMaryam Tahhan <maryam.tahhan@intel.com>2015-08-19 13:08:40 +0000
commitc99fda7cb1019c036c5caa828e2febe935d4aaf0 (patch)
tree257a8afeefd46372db4e7e2e60ecfd25793f078a /vsperf
parent3af55a78fcd572f93b1a46178bffc4c8e90534f2 (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-xvsperf13
1 files changed, 11 insertions, 2 deletions
diff --git a/vsperf b/vsperf
index 67141a7e..4510e121 100755
--- a/vsperf
+++ b/vsperf
@@ -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()