[PATCH] rtems-test-check: Make exclude work again.

Joel Sherrill joel at rtems.org
Tue Jan 17 18:51:54 UTC 2017


On Tue, Jan 17, 2017 at 9:34 AM, Stavros Passas <stavros.passas at movidius.com
> wrote:

> Hi Joel,
>
> Yesterday, with the creation of the ticket about the issue, (
> https://devel.rtems.org/ticket/2867)
> I also uploaded the patch that was fixing it -- after Chris's suggestion
> over email.
>
> The patch was created with my full credentials, so you can take them from
> here:
> https://devel.rtems.org/attachment/ticket/2867/fix-2867.patch
>
>
Thanks. I should have seen that but was working from home yesterday.

I am testing with that patch now along with a number of additions to .tcfg
files.

I will push when my build finishes.

--joel


> Best Regards,
>    Stavros
>
> On 17 January 2017 at 14:08, Joel Sherrill <joel at rtems.org> wrote:
>
>>
>>
>> On Mon, Jan 16, 2017 at 5:12 PM, Chris Johns <chrisj at rtems.org> wrote:
>>
>>> This change looks wrong. Moving test loop out of the if testdata block
>>> means variables in the test loop are not defined. I consider it a script
>>> bug to assume it is ok to reference a variable that is not declared
>>> because it is ambiguous if this intended behavior or a bug.
>>>
>>> Starvos sent me this change a few days ago and it looks good. I am
>>> hoping he will make a patch we can merge so he can have the credit ..
>>>
>>> diff --git a/tools/build/rtems-test-check b/tools/build/rtems-test-check
>>> index e02f8e9..108b788 100755
>>> --- a/tools/build/rtems-test-check
>>> +++ b/tools/build/rtems-test-check
>>> @@ -32,7 +32,11 @@ done
>>>
>>>  case ${mode} in
>>>   exclude)
>>> -   output=${tests}
>>> +   if test -f $testdata; then
>>> +     output=""
>>> +   else
>>> +     output="${tests}"
>>> +   fi
>>>     ;;
>>>   flags)
>>>     if [ $test_count != 1 ]; then
>>>
>>> Are you in a position to test this change?
>>>
>>>
>> I am starting a test sweep of this now. I will need Starvos's proper
>> name and email to commit it though.
>>
>> --joel
>>
>>
>>> Chris
>>>
>>> On 17/1/17 6:24 am, Joel Sherrill wrote:
>>> > closes #2867.
>>> > ---
>>> >  tools/build/rtems-test-check | 90 ++++++++++++++++++++++--------
>>> --------------
>>> >  1 file changed, 45 insertions(+), 45 deletions(-)
>>> >
>>> > diff --git a/tools/build/rtems-test-check
>>> b/tools/build/rtems-test-check
>>> > index e02f8e9..e8acde0 100755
>>> > --- a/tools/build/rtems-test-check
>>> > +++ b/tools/build/rtems-test-check
>>> > @@ -32,7 +32,6 @@ done
>>> >
>>> >  case ${mode} in
>>> >   exclude)
>>> > -   output=${tests}
>>> >     ;;
>>> >   flags)
>>> >     if [ $test_count != 1 ]; then
>>> > @@ -99,52 +98,53 @@ if test -f $testdata; then
>>> >      testdata=$ntd
>>> >    done
>>> >
>>> > -  for t in ${tests};
>>> > -  do
>>> > -    case ${mode} in
>>> > -      exclude)
>>> > -        allow="yes"
>>> > -        for dt in ${excluded_tests};
>>> > -        do
>>> > -          if test ${t} = ${dt}; then
>>> > -            allow="no"
>>> > -          fi
>>> > -        done
>>> > -        if test ${allow} = yes; then
>>> > -          output="${output} ${t}"
>>> > -        fi
>>> > -        ;;
>>> > -      flags)
>>> > -        allow="no"
>>> > -        for et in ${expected_fails};
>>> > -        do
>>> > -          if test ${t} = ${et}; then
>>> > -            allow="yes"
>>> > -          fi
>>> > -        done
>>> > -        if test ${allow} = yes; then
>>> > -          output="-DTEST_STATE_EXPECTED_FAIL=1"
>>> > -        fi
>>> > -        allow="no"
>>> > -        for it in ${indeterminates};
>>> > -        do
>>> > -          if test ${t} = ${it}; then
>>> > -            allow="yes"
>>> > -          fi
>>> > -        done
>>> > -        if test ${allow} = yes; then
>>> > -          output="${output} -DTEST_STATE_INDETERMINATE=1"
>>> > -        fi
>>> > -        ;;
>>> > -      *)
>>> > -        echo "error: invalid mode" 1>&2
>>> > -        echo "INVALID-TEST-DATA"
>>> > -        exit 1
>>> > -        ;;
>>> > -    esac
>>> > -  done
>>> >  fi
>>> >
>>> > +for t in ${tests};
>>> > +do
>>> > +  case ${mode} in
>>> > +    exclude)
>>> > +      allow="yes"
>>> > +      for dt in ${excluded_tests};
>>> > +      do
>>> > +     if test ${t} = ${dt}; then
>>> > +       allow="no"
>>> > +     fi
>>> > +      done
>>> > +      if test ${allow} = yes; then
>>> > +     output="${output} ${t}"
>>> > +      fi
>>> > +      ;;
>>> > +    flags)
>>> > +      allow="no"
>>> > +      for et in ${expected_fails};
>>> > +      do
>>> > +     if test ${t} = ${et}; then
>>> > +       allow="yes"
>>> > +     fi
>>> > +      done
>>> > +      if test ${allow} = yes; then
>>> > +     output="-DTEST_STATE_EXPECTED_FAIL=1"
>>> > +      fi
>>> > +      allow="no"
>>> > +      for it in ${indeterminates};
>>> > +      do
>>> > +     if test ${t} = ${it}; then
>>> > +       allow="yes"
>>> > +     fi
>>> > +      done
>>> > +      if test ${allow} = yes; then
>>> > +     output="${output} -DTEST_STATE_INDETERMINATE=1"
>>> > +      fi
>>> > +      ;;
>>> > +    *)
>>> > +      echo "error: invalid mode" 1>&2
>>> > +      echo "INVALID-TEST-DATA"
>>> > +      exit 1
>>> > +      ;;
>>> > +  esac
>>> > +done
>>> > +
>>> >  echo ${output}
>>> >
>>> >  exit 0
>>> >
>>> _______________________________________________
>>> devel mailing list
>>> devel at rtems.org
>>> http://lists.rtems.org/mailman/listinfo/devel
>>>
>>
>>
>> _______________________________________________
>> devel mailing list
>> devel at rtems.org
>> http://lists.rtems.org/mailman/listinfo/devel
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20170117/b4f5690b/attachment-0002.html>


More information about the devel mailing list