From patchwork Fri Aug 28 03:43:56 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhaolei X-Patchwork-Id: 7089391 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 9BA4DBEEC1 for ; Fri, 28 Aug 2015 03:45:41 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 023CE20980 for ; Fri, 28 Aug 2015 03:45:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2E749200D0 for ; Fri, 28 Aug 2015 03:45:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751358AbbH1Dpe (ORCPT ); Thu, 27 Aug 2015 23:45:34 -0400 Received: from cn.fujitsu.com ([59.151.112.132]:29645 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1751210AbbH1Dpe (ORCPT ); Thu, 27 Aug 2015 23:45:34 -0400 X-IronPort-AV: E=Sophos;i="5.15,520,1432569600"; d="scan'208";a="100113055" Received: from bogon (HELO edo.cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 28 Aug 2015 11:48:40 +0800 Received: from G08CNEXCHPEKD01.g08.fujitsu.local (localhost.localdomain [127.0.0.1]) by edo.cn.fujitsu.com (8.14.3/8.13.1) with ESMTP id t7S3jPWA010434 for ; Fri, 28 Aug 2015 11:45:25 +0800 Received: from localhost.localdomain (10.167.226.114) by G08CNEXCHPEKD01.g08.fujitsu.local (10.167.33.89) with Microsoft SMTP Server id 14.3.181.6; Fri, 28 Aug 2015 11:45:31 +0800 From: Zhao Lei To: CC: Zhao Lei Subject: [PATCH] btrfs-progs: tests: Add testcase filter for misc-tests Date: Fri, 28 Aug 2015 11:43:56 +0800 Message-ID: <09dc1a986fea9d55b40095632d1efd8f4c050730.1440733418.git.zhaolei@cn.fujitsu.com> X-Mailer: git-send-email 1.8.5.1 MIME-Version: 1.0 Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Spam-Status: No, score=-8.3 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 Add testcase filter for misc-tests, so we can select to run necessary test cases. For example: # ./misc-tests.sh 002 [TEST] 002-uuid-rewrite # # ./misc-tests.sh subvolume [TEST] 007-subvolume-sync # Signed-off-by: Zhao Lei --- tests/misc-tests.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/misc-tests.sh b/tests/misc-tests.sh index 1ed8850..f9c1152 100755 --- a/tests/misc-tests.sh +++ b/tests/misc-tests.sh @@ -12,6 +12,8 @@ TEST_MNT=${TEST_MNT:-$TOP/tests/mnt} RESULTS="$TOP/tests/misc-tests-results.txt" IMAGE="$TOP/tests/test.img" +TEST_FILTER="$1" + source $TOP/tests/common # Allow child test to use $TOP and $RESULTS @@ -35,7 +37,7 @@ check_prereq btrfs # The tests are driven by their custom script called 'test.sh' for i in $(find $TOP/tests/misc-tests -maxdepth 1 -mindepth 1 -type d \ - ${TEST:+-name "$TEST"} | sort) + ${TEST:+-name "$TEST"} | sort | grep -e "$TEST_FILTER") do echo " [TEST] $(basename $i)" cd $i