From patchwork Thu Oct 2 03:44:56 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christopher Li X-Patchwork-Id: 5015361 Return-Path: X-Original-To: patchwork-linux-sparse@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 39C8C9F327 for ; Thu, 2 Oct 2014 03:45:00 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 753372021A for ; Thu, 2 Oct 2014 03:44:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 47D4620200 for ; Thu, 2 Oct 2014 03:44:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752889AbaJBDo5 (ORCPT ); Wed, 1 Oct 2014 23:44:57 -0400 Received: from mail-wi0-f179.google.com ([209.85.212.179]:33356 "EHLO mail-wi0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753667AbaJBDo5 (ORCPT ); Wed, 1 Oct 2014 23:44:57 -0400 Received: by mail-wi0-f179.google.com with SMTP id d1so2677571wiv.6 for ; Wed, 01 Oct 2014 20:44:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=ax7w/5UzgUAbeOBPKelaTqSQdk+klrFj8KAsiZZmi8c=; b=QNoKxZCMdw3tqZatOweJqTT89FH2dN/HNXE1ybH7hOjG59Zi5lX1kLhyW+4Yxr2Lqr Rmul4xPw6uRU54WmGKR7tE8SDVC/gMGXzdMZTEgoeXifOQcDN6Rmu5MNDyyozaeukCVX 1ySCSj/H/Krb+Lt5seQDf2KZViEVJeABUF4nT6iKNbnWggQ7eHd3ddwX+w4v2VFF0w3E 6V4jwx8twSu/Dwz01O3bx0Nq+qDXbmYpIb9J9VFnnRO99dBgtYxhhtyMDPQdUVQx42Fd 66veExJATV2Zt+Rg4areo1/3KG5WXBLSFJv4BT9EqWcJgyv4ek1BHaZTax7mLMwiNf0y W1MQ== MIME-Version: 1.0 X-Received: by 10.180.20.33 with SMTP id k1mr629650wie.14.1412221496078; Wed, 01 Oct 2014 20:44:56 -0700 (PDT) Received: by 10.27.175.218 with HTTP; Wed, 1 Oct 2014 20:44:56 -0700 (PDT) In-Reply-To: References: <53DFD320.2050903@ramsay1.demon.co.uk> <5426BD97.2080700@ramsay1.demon.co.uk> Date: Thu, 2 Oct 2014 11:44:56 +0800 X-Google-Sender-Auth: Q5oPoaBLM8kcNG7-7t4zeiupzh0 Message-ID: Subject: Re: [PATCH 06/10] don't run sparse{c, i} tests when sparse-llvm is disabled From: Christopher Li To: Ramsay Jones Cc: Sparse Mailing-list Sender: linux-sparse-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sparse@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Tue, Sep 30, 2014 at 11:26 AM, Christopher Li 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 --- To unsubscribe from this list: send the line "unsubscribe linux-sparse" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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)"