From patchwork Tue Apr 19 13:33:36 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maarten Lankhorst X-Patchwork-Id: 8880111 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 7A3CCBF29F for ; Tue, 19 Apr 2016 13:33:48 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 988F820263 for ; Tue, 19 Apr 2016 13:33:46 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 29E29201F2 for ; Tue, 19 Apr 2016 13:33:41 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BD2686E195; Tue, 19 Apr 2016 13:33:39 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by gabe.freedesktop.org (Postfix) with ESMTP id 932C26E195 for ; Tue, 19 Apr 2016 13:33:37 +0000 (UTC) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga102.fm.intel.com with ESMTP; 19 Apr 2016 06:33:37 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,506,1455004800"; d="scan'208";a="87960643" Received: from lcostell-mobl.ger.corp.intel.com (HELO patser.lan) ([10.252.7.207]) by fmsmga004.fm.intel.com with ESMTP; 19 Apr 2016 06:33:36 -0700 To: Intel Graphics Development From: Maarten Lankhorst Message-ID: <571633B0.1080804@linux.intel.com> Date: Tue, 19 Apr 2016 15:33:36 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 Cc: Dylan Baker Subject: [Intel-gfx] [PATCH piglit] igt: Make "warn" status work again as expected. 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: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Spam-Status: No, score=-5.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, 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 When writing a patch that adds a igt_warn() when lockdep is unavailable I noticed that the warn error doesn't work any more. Fix this by monitoring stderr, and only setting 'pass' when stderr is empty. Signed-off-by: Maarten Lankhorst Cc: Dylan Baker Reviewed-by: Dylan Baker diff --git a/tests/igt.py b/tests/igt.py index 7ebb03646b50..1e5d2f111fa6 100644 --- a/tests/igt.py +++ b/tests/igt.py @@ -114,7 +114,9 @@ class IGTTest(Test): def interpret_result(self): super(IGTTest, self).interpret_result() - if self.result.returncode == 0: + if self.result.returncode == 0 and len(self.result.err) > 0: + self.result.result = 'warn' + elif self.result.returncode == 0: self.result.result = 'pass' elif self.result.returncode == 77: self.result.result = 'skip'