From patchwork Mon Jun 23 13:56:03 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Mkrtchyan, Tigran" X-Patchwork-Id: 4403371 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 67DC79F390 for ; Mon, 23 Jun 2014 13:56:19 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 76E42200C1 for ; Mon, 23 Jun 2014 13:56:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BA35C201CE for ; Mon, 23 Jun 2014 13:56:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754058AbaFWN4M (ORCPT ); Mon, 23 Jun 2014 09:56:12 -0400 Received: from smtp-o-3.desy.de ([131.169.56.156]:42964 "EHLO smtp-o-3.desy.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754153AbaFWN4M (ORCPT ); Mon, 23 Jun 2014 09:56:12 -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 8A43A28040A for ; Mon, 23 Jun 2014 15:56:10 +0200 (CEST) Received: from ZITSWEEP1.win.desy.de (zitsweep1.win.desy.de [131.169.97.95]) by smtp-map-3.desy.de (DESY_MAP_3) with ESMTP id 7AF4B1147 for ; Mon, 23 Jun 2014 15:56:10 +0200 (MEST) Received: from smtp-intra-3.desy.de (lb-40-26.desy.de) by ZITSWEEP1.win.desy.de (Clearswift SMTPRS 5.5.0) with ESMTP id ; Mon, 23 Jun 2014 15:56:10 +0200 Received: from anahit.desy.de (anahit.desy.de [131.169.185.68]) by smtp-intra-3.desy.de (DESY-INTRA-3) with ESMTP id 22E7B10D9; Mon, 23 Jun 2014 15:56:10 +0200 (MEST) From: Tigran Mkrtchyan To: linux-nfs@vger.kernel.org, bfields@fieldses.org Cc: Tigran Mkrtchyan Subject: [PATCH 2/2] group junit like output by filenames Date: Mon, 23 Jun 2014 15:56:03 +0200 Message-Id: <1403531763-13441-3-git-send-email-tigran.mkrtchyan@desy.de> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1403531763-13441-1-git-send-email-tigran.mkrtchyan@desy.de> References: <1403531763-13441-1-git-send-email-tigran.mkrtchyan@desy.de> Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Spam-Status: No, score=-5.9 required=5.0 tests=BAYES_00,HK_RANDOM_FROM, RCVD_IN_DNSWL_HI,T_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: Tigran Mkrtchyan --- nfs4.1/testmod.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/nfs4.1/testmod.py b/nfs4.1/testmod.py index 661aed0..32f51a9 100644 --- a/nfs4.1/testmod.py +++ b/nfs4.1/testmod.py @@ -97,10 +97,11 @@ class Test(object): _funct_result = Result(DEP_FUNCT, default=True) __re = re.compile(r'(\D*)(\d*)(.*)') - def __init__(self, function, module=""): + def __init__(self, suite, function, module=""): """Needs function to be run""" self.runtest = function self.name = function.__name__ + self.suite = suite if module: self.fullname = module.split('.')[-1] + '.' + self.name else: @@ -347,7 +348,7 @@ def createtests(testdir): for attr in dir(mod): if attr.startswith("test"): f = getattr(mod, attr) - tests.append(Test(f, testmod)) + tests.append(Test(testfile, f, testmod)) # Reduce doc string info into format easier to work with used_codes = {} flag_dict = {} @@ -451,8 +452,8 @@ def xml_printresults(tests, file_name, suite='all'): for t in tests: testcase = doc.createElement("testcase") testsuite.appendChild(testcase) - testcase.setAttribute("name", str(t)) - testcase.setAttribute("classname", suite) + testcase.setAttribute("name", t.name) + testcase.setAttribute("classname", t.suite) testcase.setAttribute("time", str(t.time_taken)) total_time += t.time_taken