From patchwork Sat Oct 5 20:27:15 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Mkrtchyan, Tigran" X-Patchwork-Id: 2991861 Return-Path: X-Original-To: patchwork-linux-nfs@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 A5ED19F169 for ; Sat, 5 Oct 2013 20:27:27 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CC0242022A for ; Sat, 5 Oct 2013 20:27:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6999220220 for ; Sat, 5 Oct 2013 20:27:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752430Ab3JEU1Y (ORCPT ); Sat, 5 Oct 2013 16:27:24 -0400 Received: from smtp-o-3.desy.de ([131.169.56.156]:44012 "EHLO smtp-o-3.desy.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752366Ab3JEU1X (ORCPT ); Sat, 5 Oct 2013 16:27:23 -0400 Received: from smtp-map-3.desy.de (smtp-map-3.desy.de [131.169.56.68]) by smtp-o-3.desy.de (DESY-O-3) with ESMTP id 8B3022808C0 for ; Sat, 5 Oct 2013 22:27:22 +0200 (CEST) Received: from ZITSWEEP2.win.desy.de (zitsweep2.win.desy.de [131.169.97.96]) by smtp-map-3.desy.de (DESY_MAP_3) with ESMTP id 79E2610C4 for ; Sat, 5 Oct 2013 22:27:20 +0200 (MEST) Received: from smtp-intra-1.desy.de (lb-40-26.desy.de) by ZITSWEEP2.win.desy.de (Clearswift SMTPRS 5.4.1) with ESMTP id ; Sat, 5 Oct 2013 22:27:20 +0200 Received: from anahit.desy.de (anahit.desy.de [131.169.185.68]) by smtp-intra-1.desy.de (DESY-INTRA-1) with ESMTP id 0F5C03E902; Sat, 5 Oct 2013 22:27:20 +0200 (MEST) From: Tigran Mkrtchyan To: bfields@fieldses.org Cc: linux-nfs@vger.kernel.org, Tigran Mkrtchyan Subject: [PATCH] pynfs: fix reporting of ignored tests Date: Sat, 5 Oct 2013 22:27:15 +0200 Message-Id: <1381004835-7485-1-git-send-email-tigran.mkrtchyan@desy.de> X-Mailer: git-send-email 1.8.3.1 Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00,HK_RANDOM_FROM, 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 currently, ignored tests reported as failure, which makes fixing them quite hard. Signed-off-by: Tigran Mkrtchyan --- nfs4.1/testmod.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/nfs4.1/testmod.py b/nfs4.1/testmod.py index 3d74efe..68855de 100644 --- a/nfs4.1/testmod.py +++ b/nfs4.1/testmod.py @@ -439,6 +439,7 @@ def printresults(tests, opts, file=None): def xml_printresults(tests, file_name, suite='all'): with open(file_name, 'w') as fd: failures = 0 + skipped = 0 total_time = 0 doc = xml.dom.minidom.Document() testsuite = doc.createElement("testsuite") @@ -455,14 +456,19 @@ def xml_printresults(tests, file_name, suite='all'): testcase.setAttribute("time", str(t.time_taken)) total_time += t.time_taken - if t.result not in (TEST_PASS, TEST_WARN): + if t.result == TEST_FAIL: failures += 1 failure = doc.createElement("failure") failure.setAttribute("message", t.result.msg) err = doc.createCDATASection(''.join(t.result.tb)) failure.appendChild(err) testcase.appendChild(failure) + elif t.result == TEST_OMIT: + skipped += 1 + skip = doc.createElement("skipped") + testcase.appendChild(skip) testsuite.setAttribute("failures", str(failures)) + testsuite.setAttribute("skipped", str(skipped)) testsuite.setAttribute("time", str(total_time)) fd.write(doc.toprettyxml(indent=" "))