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

Bird, Timothy Tim.Bird at sony.com
Fri Nov 17 01:47:52 UTC 2017


> -----Original Message-----
> From: fuego-bounces at lists.linuxfoundation.org [mailto:fuego-
> bounces at lists.linuxfoundation.org] On Behalf Of Liu Wenlong
> Sent: Thursday, November 16, 2017 1:39 AM
> To: fuego at lists.linuxfoundation.org
> Subject: [Fuego] [PATCH 2/2] core: fixed that value of test_spec contains "."
> 
> 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".

Interesting.  I'm not sure it's a good idea to have a test_spec name
with a "." in it.  I don't see any in Fuego currently.  I think I'd prefer it
if test_spec names used underscores.  However, I see no problem with the patch.

I've applied the patch.  I'm just worried there might be other places in
Fuego where we split the jobname to get the test type and test name.
I did a cursory look and didn't find any, but  this is something we
should watch out for.

Thanks for the patch!
 -- Tim

> 
> 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
> 
> 
> 
> _______________________________________________
> Fuego mailing list
> Fuego at lists.linuxfoundation.org
> https://lists.linuxfoundation.org/mailman/listinfo/fuego


More information about the Fuego mailing list