From patchwork Mon Aug 4 18:38:24 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ramsay Jones X-Patchwork-Id: 4673071 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 5AF579F375 for ; Mon, 4 Aug 2014 18:38:30 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7F18C2013D for ; Mon, 4 Aug 2014 18:38:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A5712200E8 for ; Mon, 4 Aug 2014 18:38:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751544AbaHDSi2 (ORCPT ); Mon, 4 Aug 2014 14:38:28 -0400 Received: from mdfmta009.mxout.tbr.inty.net ([91.221.168.50]:39340 "EHLO smtp.demon.co.uk" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751046AbaHDSi1 (ORCPT ); Mon, 4 Aug 2014 14:38:27 -0400 Received: from mdfmta009.tbr.inty.net (unknown [127.0.0.1]) by mdfmta009.tbr.inty.net (Postfix) with ESMTP id 69207384084; Mon, 4 Aug 2014 18:00:14 +0100 (BST) Received: from mdfmta009.tbr.inty.net (unknown [127.0.0.1]) by mdfmta009.tbr.inty.net (Postfix) with ESMTP id 384D438407C; Mon, 4 Aug 2014 18:00:14 +0100 (BST) Received: from [192.168.254.10] (unknown [80.176.147.220]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by mdfmta009.tbr.inty.net (Postfix) with ESMTP; Mon, 4 Aug 2014 18:00:13 +0100 (BST) Message-ID: <53DFD320.2050903@ramsay1.demon.co.uk> Date: Mon, 04 Aug 2014 19:38:24 +0100 From: Ramsay Jones User-Agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.0 MIME-Version: 1.0 To: Christopher Li CC: Sparse Mailing-list Subject: [PATCH 06/10] don't run sparse{c, i} tests when sparse-llvm is disabled X-MDF-HostID: 4 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.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, 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 Signed-off-by: Ramsay Jones --- validation/test-suite | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/validation/test-suite b/validation/test-suite index 3c011c6..0142701 100755 --- a/validation/test-suite +++ b/validation/test-suite @@ -7,12 +7,18 @@ default_cmd="sparse \$file" tests_list=`find . -name '*.c' | sed -e 's#^\./\(.*\)#\1#' | sort` prog_name=`basename $0` +if [ ! -x "$default_path/sparse-llvm" ]; then + disabled_cmds="sparsec sparsei sparse-llvm" +fi + # counts: # - tests that have not been converted to test-suite format +# - tests that are disabled # - tests that passed # - tests that failed # - tests that failed but are known to fail unhandled_tests=0 +disabled_tests=0 ok_tests=0 ko_tests=0 known_ko_tests=0 @@ -80,6 +86,7 @@ echo " help prints usage" # - 0 if the test passed, # - 1 if it failed, # - 2 if it is not a "test-suite" test. +# - 3 if the test is disabled. do_test() { test_failed=0 @@ -95,8 +102,6 @@ do_test() fi test_name=$last_result - echo " TEST $test_name ($file)" - # does the test provide a specific command ? cmd=`eval echo $default_path/$default_cmd` get_value "check-command" $file @@ -104,6 +109,19 @@ do_test() last_result=`echo $last_result | sed -e 's/^ *//'` cmd=`eval echo $default_path/$last_result` fi + + # check for disabled commands + for i in $disabled_cmds; do + case "$cmd" in + *$i*) + disabled_tests=`expr $disabled_tests + 1` + return 3 + ;; + esac + done + + echo " TEST $test_name ($file)" + verbose "Using command : $cmd" # grab the expected exit value @@ -168,6 +186,9 @@ do_test_suite() if [ "$unhandled_tests" -ne "0" ]; then echo "$unhandled_tests tests could not be handled by $prog_name" fi + if [ "$disabled_tests" -ne "0" ]; then + echo "$disabled_tests tests were disabled" + fi } ##