From patchwork Wed Jan 28 16:56:50 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Wood X-Patchwork-Id: 5728771 Return-Path: X-Original-To: patchwork-intel-gfx@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 277A1BF440 for ; Wed, 28 Jan 2015 16:56:59 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5D563202EC for ; Wed, 28 Jan 2015 16:56:58 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 7C6DC202EB for ; Wed, 28 Jan 2015 16:56:57 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B94CF6E738; Wed, 28 Jan 2015 08:56:56 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-wg0-f41.google.com (mail-wg0-f41.google.com [74.125.82.41]) by gabe.freedesktop.org (Postfix) with ESMTP id 116A06E738 for ; Wed, 28 Jan 2015 08:56:55 -0800 (PST) Received: by mail-wg0-f41.google.com with SMTP id a1so21790423wgh.0 for ; Wed, 28 Jan 2015 08:56:54 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id; bh=5cdSwE79Vvpvxrd14Q6kDEAnPMUohYXYvkvKkus+0z0=; b=iSMzEUFBQ0q1IwI3LEGbw2TrTwNy9xhah36uSvkCgms0TMGD51uvfMuBvo9wZKHScs bHOdPs0ipZUoR5d5//kzKUPSZJIxcq/Mr4creih2AivRFJDDjnDTa2fPYIoZf2TtcxDf idb97H12H2NAvXfXCLBmv5jH3h6wz889envBsrlBcUfpY0JcfyXIpaJ/zarDw5HhMeTL RRzBeFEz4KjJ+c0ArVVndEbEqNDoooY6+MHP9TP57WDacdskZJFuU40yNMSTKLxKc8xt dP2XBPQdAWMw78sxtgMODsvqN8AxAGtTg6+WtolXa7UEZOhF39VsPfmTJnwFTKUgczGi uQuA== X-Gm-Message-State: ALoCoQn9qS+5vREIbZZiflfkoTckMiPsoNbdkWEl7V81mjgGrwtDDIX5mZkatZ48zmTFO4hYLJdf X-Received: by 10.180.90.206 with SMTP id by14mr9161736wib.0.1422464214223; Wed, 28 Jan 2015 08:56:54 -0800 (PST) Received: from pistachio.icx.intel.com ([83.217.123.106]) by mx.google.com with ESMTPSA id 7sm6860479wjq.29.2015.01.28.08.56.52 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 28 Jan 2015 08:56:53 -0800 (PST) From: Thomas Wood To: intel-gfx@lists.freedesktop.org Date: Wed, 28 Jan 2015 16:56:50 +0000 Message-Id: <1422464211-26043-1-git-send-email-thomas.wood@intel.com> X-Mailer: git-send-email 2.1.0 Subject: [Intel-gfx] [PATCH i-g-t 1/2] lib/tests: verify subtest enumeration output X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 Check that the subtest list is not empty if using --list-subtests returns with an exit code of 0, and that the list is empty if it returns with 79. Signed-off-by: Thomas Wood --- lib/tests/igt_command_line.sh | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/lib/tests/igt_command_line.sh b/lib/tests/igt_command_line.sh index 5cf2584..a057943 100755 --- a/lib/tests/igt_command_line.sh +++ b/lib/tests/igt_command_line.sh @@ -56,8 +56,17 @@ for test in $TESTLIST; do # check --list-subtests works correctly echo " Checking subtest enumeration..." - ./$test --list-subtests > /dev/null - if [ $? -ne 0 -a $? -ne 79 ]; then + LIST=`./$test --list-subtests` + RET=$? + if [ $RET -ne 0 -a $RET -ne 79 ]; then + exit 1 + fi + + if [ $RET -eq 79 -a -n "$LIST" ]; then + exit 1 + fi + + if [ $RET -eq 0 -a -z "$LIST" ]; then exit 1 fi