[Fuego] [PATCH 2/2] core: fixed that value of test_spec contains "."

Liu Wenlong liuwl.fnst at cn.fujitsu.com
Thu Nov 16 09:39:24 UTC 2017


The current Fuego cannot show you the summary table in the web page
if you're looking at a job whose test_spec contains character ".", because
Fuego cannot find the correct path of file "flot_chart_data.json".

Signed-off-by: Liu Wenlong <liuwl.fnst at cn.fujitsu.com>
---
 engine/scripts/mod.js | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/engine/scripts/mod.js b/engine/scripts/mod.js
index 3a43da3..c23dca4 100644
--- a/engine/scripts/mod.js
+++ b/engine/scripts/mod.js
@@ -28,8 +28,10 @@ var jenkins_logs_path = 'http://'+location['host'] + '/fuego/userContent/fuego.l
 
 // get the test name from the URL
 var localurl = jQuery(location).attr('href').split("/");
-var testtype = localurl[localurl.length - 2].split(".")[2] // E.g.: Functional
-var testsuite = localurl[localurl.length - 2].split(".")[3] // E.g.: Dhrystone
+// get the jobname, e.g.: boardx.default.Functional.Dhrystone
+var jobname = localurl[localurl.length - 2].split(".");
+var testtype = jobname[jobname.length -2] // E.g.: Functional
+var testsuite = jobname[jobname.length -1]// E.g.: Dhrystone
 
 // results.json file
 var results_json = null;
-- 
2.7.4





More information about the Fuego mailing list