[Fuego] [PATCH 01/19] fail_regexp: rename FAIL_PATTERN to FAIL_REGEXP for coherency

Bird, Timothy Tim.Bird at sony.com
Fri May 12 22:56:45 UTC 2017



> -----Original Message-----
> From: fuego-bounces at lists.linuxfoundation.org [mailto:fuego-
> bounces at lists.linuxfoundation.org] On Behalf Of Daniel Sangorrin
> Sent: Friday, May 12, 2017 1:20 AM
> To: fuego at lists.linuxfoundation.org
> Subject: [Fuego] [PATCH 01/19] fail_regexp: rename FAIL_PATTERN to
> FAIL_REGEXP for coherency
> 
> I also improved the documentation of the function fail_check_cases
> to mention that syslog (actually the diff) may also be checked
> by defining the variable use_syslog on the spec.
> 
> Signed-off-by: Daniel Sangorrin <daniel.sangorrin at toshiba.co.jp>
> ---
>  engine/scripts/functions.sh | 7 +++++--
>  engine/scripts/ovgen.py     | 2 +-
>  2 files changed, 6 insertions(+), 3 deletions(-)
> 
> diff --git a/engine/scripts/functions.sh b/engine/scripts/functions.sh
> index 1432b5e..f9681b3 100755
> --- a/engine/scripts/functions.sh
> +++ b/engine/scripts/functions.sh
> @@ -393,7 +393,10 @@ function processing {
>      return $RETURN_VALUE
>  }
> 
> -# search in test log for {!JOB_NAME}_FAIL_PATTERN_n fail cases and abort
> with message {!JOB_NAME}_FAIL_MESSAGE_n if found
> +# search in testlog.txt and syslog (if use_syslog is defined in the spec)
> +# for {!TESTDIR}_FAIL_REGEXP_n fail cases (fail_regexp in the spec) and
> +# abort with message {!TESTDIR}_FAIL_MESSAGE_n (fail_message in the
> spec)
> +# if found.
>  function fail_check_cases () {
>      testlog="${LOGDIR}/testlog.txt"
>      slog_prefix="${LOGDIR}/syslog"
> @@ -413,7 +416,7 @@ function fail_check_cases () {
> 
>      for n in `seq 0 $fcc`
>      do
> -        fpvarname="${upName}"_FAIL_PATTERN_"${n}"
> +        fpvarname="${upName}"_FAIL_REGEXP_"${n}"

Who generates these names (or do they come directly from the spec files)?
I didn't see any spec file changes with this patch, and I can't find any
instances of FAIL_PATTERN in any existing files.
Is this feature just unused by current tests?

...

Ok - nevermind - these come from "fail_regexp" in the spec.
Highly agreed that the name here (and in console logs) should
be consistent to avoid confusion.  Thanks!

>          fpvarmsg="${upName}"_FAIL_MESSAGE_"${n}"
>          fpvarslog="${upName}"_FAIL_"${n}"_SYSLOG
> 
> diff --git a/engine/scripts/ovgen.py b/engine/scripts/ovgen.py
> index e514d7e..ed67667 100755
> --- a/engine/scripts/ovgen.py
> +++ b/engine/scripts/ovgen.py
> @@ -422,7 +422,7 @@ def generateSpec(ts, fout):
>          fout.write(outNum + "\n")
> 
>          for fmsg, num in zip(ts.fail_case, range(fc_num)):
> -            outPattern = "%s_FAIL_PATTERN_%s=\"%s\"" % (tNameUp, num,
> fmsg["fail_regexp"])
> +            outPattern = "%s_FAIL_REGEXP_%s=\"%s\"" % (tNameUp, num,
> fmsg["fail_regexp"])
>              outMessage = "%s_FAIL_MESSAGE_%s=\"%s\"" % (tNameUp, num,
> fmsg["fail_message"])
> 
>              if "use_syslog" in fmsg:
> --
> 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