[Fuego] [PATCH 1/3] parser: handle test_set names with "."

Bird, Timothy Tim.Bird at sony.com
Tue Nov 21 21:18: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: Sunday, November 19, 2017 10:29 PM
> To: fuego at lists.linuxfoundation.org
> Subject: [Fuego] [PATCH 1/3] parser: handle test_set names with "."
> 
> Class flat_entry cannot give a correct testset and testcase name
> if test_set names with embedded periods.
> 
> Change the routine to handle cases where the tguid comes in with
> more than one period (the tguid 'stress.part3.rpc01' will a wrong
> testset and testcase name).
> 
> The wrong testset and testcase names were not used in the key position
> of current Fuego, so, it won't be a big bug if this issue was not fixed.
> 
> Signed-off-by: Liu Wenlong <liuwl.fnst at cn.fujitsu.com>
> ---
>  engine/scripts/parser/prepare_chart_data.py | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/engine/scripts/parser/prepare_chart_data.py
> b/engine/scripts/parser/prepare_chart_data.py
> index 681b3fa..f0e1e82 100644
> --- a/engine/scripts/parser/prepare_chart_data.py
> +++ b/engine/scripts/parser/prepare_chart_data.py
> @@ -96,10 +96,9 @@ class flat_entry:
>              if len(parts)==1:
>                  self.test_set = "default"
>              else:
> -                self.test_set = parts[0]
> -                del(parts[0])
> +                self.test_set = ".".join(parts[:-1])
> 
> -            self.test_case = ".".join(parts)
> +            self.test_case = parts[-1]
>          except:
>              pass
> 
> --
> 2.7.4

Looks good.  Thanks for catching this bug.

This is applied.  Note that I added a new test:
Functional.fuego_tguid_check to test tguid
parsing.  See the commit message for the commit
for that test, to see limitations of this test.

Maybe we can expand the test in the future to catch
other instances of improper parsing of test identifiers.
 -- Tim


More information about the Fuego mailing list