<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jan 16, 2017 at 5:12 PM, Chris Johns <span dir="ltr"><<a href="mailto:chrisj@rtems.org" target="_blank">chrisj@rtems.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">This change looks wrong. Moving test loop out of the if testdata block<br>
means variables in the test loop are not defined. I consider it a script<br>
bug to assume it is ok to reference a variable that is not declared<br>
because it is ambiguous if this intended behavior or a bug.<br>
<br>
Starvos sent me this change a few days ago and it looks good. I am<br>
hoping he will make a patch we can merge so he can have the credit ..<br>
<br>
diff --git a/tools/build/rtems-test-check b/tools/build/rtems-test-check<br>
index e02f8e9..108b788 100755<br>
--- a/tools/build/rtems-test-check<br>
+++ b/tools/build/rtems-test-check<br>
@@ -32,7 +32,11 @@ done<br>
<span class="gmail-"><br>
 case ${mode} in<br>
  exclude)<br>
-   output=${tests}<br>
</span>+   if test -f $testdata; then<br>
+     output=""<br>
+   else<br>
+     output="${tests}"<br>
+   fi<br>
<span class="gmail-">    ;;<br>
  flags)<br>
    if [ $test_count != 1 ]; then<br>
<br>
</span>Are you in a position to test this change?<br>
<br></blockquote><div><br></div><div>I am starting a test sweep of this now. I will need Starvos's proper</div><div>name and email to commit it though.</div><div><br></div><div>--joel</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Chris<br>
<div><div class="gmail-h5"><br>
On 17/1/17 6:24 am, Joel Sherrill wrote:<br>
> closes #2867.<br>
> ---<br>
>  tools/build/rtems-test-check | 90 ++++++++++++++++++++++--------<wbr>--------------<br>
>  1 file changed, 45 insertions(+), 45 deletions(-)<br>
><br>
> diff --git a/tools/build/rtems-test-check b/tools/build/rtems-test-check<br>
> index e02f8e9..e8acde0 100755<br>
> --- a/tools/build/rtems-test-check<br>
> +++ b/tools/build/rtems-test-check<br>
> @@ -32,7 +32,6 @@ done<br>
><br>
>  case ${mode} in<br>
>   exclude)<br>
> -   output=${tests}<br>
>     ;;<br>
>   flags)<br>
>     if [ $test_count != 1 ]; then<br>
> @@ -99,52 +98,53 @@ if test -f $testdata; then<br>
>      testdata=$ntd<br>
>    done<br>
><br>
> -  for t in ${tests};<br>
> -  do<br>
> -    case ${mode} in<br>
> -      exclude)<br>
> -        allow="yes"<br>
> -        for dt in ${excluded_tests};<br>
> -        do<br>
> -          if test ${t} = ${dt}; then<br>
> -            allow="no"<br>
> -          fi<br>
> -        done<br>
> -        if test ${allow} = yes; then<br>
> -          output="${output} ${t}"<br>
> -        fi<br>
> -        ;;<br>
> -      flags)<br>
> -        allow="no"<br>
> -        for et in ${expected_fails};<br>
> -        do<br>
> -          if test ${t} = ${et}; then<br>
> -            allow="yes"<br>
> -          fi<br>
> -        done<br>
> -        if test ${allow} = yes; then<br>
> -          output="-DTEST_STATE_EXPECTED_<wbr>FAIL=1"<br>
> -        fi<br>
> -        allow="no"<br>
> -        for it in ${indeterminates};<br>
> -        do<br>
> -          if test ${t} = ${it}; then<br>
> -            allow="yes"<br>
> -          fi<br>
> -        done<br>
> -        if test ${allow} = yes; then<br>
> -          output="${output} -DTEST_STATE_INDETERMINATE=1"<br>
> -        fi<br>
> -        ;;<br>
> -      *)<br>
> -        echo "error: invalid mode" 1>&2<br>
> -        echo "INVALID-TEST-DATA"<br>
> -        exit 1<br>
> -        ;;<br>
> -    esac<br>
> -  done<br>
>  fi<br>
><br>
> +for t in ${tests};<br>
> +do<br>
> +  case ${mode} in<br>
> +    exclude)<br>
> +      allow="yes"<br>
> +      for dt in ${excluded_tests};<br>
> +      do<br>
> +     if test ${t} = ${dt}; then<br>
> +       allow="no"<br>
> +     fi<br>
> +      done<br>
> +      if test ${allow} = yes; then<br>
> +     output="${output} ${t}"<br>
> +      fi<br>
> +      ;;<br>
> +    flags)<br>
> +      allow="no"<br>
> +      for et in ${expected_fails};<br>
> +      do<br>
> +     if test ${t} = ${et}; then<br>
> +       allow="yes"<br>
> +     fi<br>
> +      done<br>
> +      if test ${allow} = yes; then<br>
> +     output="-DTEST_STATE_EXPECTED_<wbr>FAIL=1"<br>
> +      fi<br>
> +      allow="no"<br>
> +      for it in ${indeterminates};<br>
> +      do<br>
> +     if test ${t} = ${it}; then<br>
> +       allow="yes"<br>
> +     fi<br>
> +      done<br>
> +      if test ${allow} = yes; then<br>
> +     output="${output} -DTEST_STATE_INDETERMINATE=1"<br>
> +      fi<br>
> +      ;;<br>
> +    *)<br>
> +      echo "error: invalid mode" 1>&2<br>
> +      echo "INVALID-TEST-DATA"<br>
> +      exit 1<br>
> +      ;;<br>
> +  esac<br>
> +done<br>
> +<br>
>  echo ${output}<br>
><br>
>  exit 0<br>
><br>
</div></div>______________________________<wbr>_________________<br>
devel mailing list<br>
<a href="mailto:devel@rtems.org">devel@rtems.org</a><br>
<a href="http://lists.rtems.org/mailman/listinfo/devel" rel="noreferrer" target="_blank">http://lists.rtems.org/<wbr>mailman/listinfo/devel</a><br>
</blockquote></div><br></div></div>