Re: [PATCH 06/10] don't run sparse{c,i} tests when sparse-llvm is disabled

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Sep 30, 2014 at 11:26 AM, Christopher Li <sparse@xxxxxxxxxxx> wrote:
> I am thinking some thing in the test-suite like:
>
> set_deps sparsec sparse-llvm
> set_deps sparsei sparse-llvm
>
> ...
> get_deps `basename cmd`
> dep_cmd=$last_result

Actually, I try that, it is a little bit too complicated.

Your first approach is fine.

I end up using your V1 patch, with a small change to do exact match rather than
a wild cast. The wild cast has danger that match a sub word of the command.
e.g. if you try to disable command "sp", it will disable "sparse" as well.

Chris

diff --git a/validation/test-suite b/validation/test-suite
index 1c94aa8..784ff6b 100755
--- a/validation/test-suite
+++ b/validation/test-suite
@@ -111,13 +111,13 @@ do_test()
        fi

        # check for disabled commands
+       set -- $cmd
+       base_cmd=`basename $1`
        for i in $disabled_cmds; do
-               case "$cmd" in
-               *$i*)
+               if [ "$i" == "$base_cmd" ] ; then
                        disabled_tests=`expr $disabled_tests + 1`
                        return 3
-                       ;;
-               esac
+               fi
        done

        echo "     TEST    $test_name ($file)"
--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux