From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ee0-f44.google.com (mail-ee0-f44.google.com [74.125.83.44]) by dpdk.org (Postfix) with ESMTP id DA5024BFE for ; Wed, 20 Mar 2013 17:07:41 +0100 (CET) Received: by mail-ee0-f44.google.com with SMTP id l10so1134855eei.17 for ; Wed, 20 Mar 2013 09:06:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:subject:date:message-id:x-mailer:in-reply-to :references:in-reply-to:references:x-gm-message-state; bh=y/SceiQVoWKlg3csFvNKVFty4n1KTkhPiBKy/2Km1t8=; b=GdcWJcYu3Cn/FEt+EXY1KTGhaZk95amxX6WnAjxvzVAK+74HfeBPGi2VSvlIWcL+U6 5SiA1/2eYokCod4TopZmpemWQp4rKgqWJN86a0DOmFf0Nu8t9AImD23RUmsIuSjmXg2h A0fiYT/VwMDa42Hmt9Cv4fTCNqvG21ww/NERwH1f3Mu8GweiN1Hddv3OHVOS3xVEwz6K xjCfD07z+JbRKiuTNKbIQHIRbPxKMbJzo2WoKf65RVQbFqk+LOsFCFX1AwJwnFha487z D3FGsDB/m7ZWVNWt8S8joQ1/Mo2uj18bzjpcqSeqrun3plM//FUK0lAup6jhRSvplZjb aSyg== X-Received: by 10.14.207.200 with SMTP id n48mr73409305eeo.4.1363795602423; Wed, 20 Mar 2013 09:06:42 -0700 (PDT) Received: from 6wind.com (6wind.net2.nerim.net. [213.41.180.237]) by mx.google.com with ESMTPS id 44sm3458693eek.5.2013.03.20.09.06.39 (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 20 Mar 2013 09:06:41 -0700 (PDT) Received: by 6wind.com (sSMTP sendmail emulation); Wed, 20 Mar 2013 17:06:39 +0100 From: Thomas Monjalon To: dev@dpdk.org Date: Wed, 20 Mar 2013 17:04:59 +0100 Message-Id: X-Mailer: git-send-email 1.7.2.5 In-Reply-To: References: In-Reply-To: References: X-Gm-Message-State: ALoCoQmdYIDfJorM5iev9J6TDeFfMhSRIXJC11Gob4yf3SF5NS2Soma97jioJc8vMMDoOGAxuFsV Subject: [dpdk-dev] [PATCH 11/22] app: fix autotest summary in error cases X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Mar 2013 16:07:42 -0000 It was reporting "All test OK" even if previous tests (except the last one) were failed. Acked-by: Ivan Boule Signed-off-by: Thomas Monjalon --- app/test/autotest.py | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/app/test/autotest.py b/app/test/autotest.py index 2609142..6613897 100755 --- a/app/test/autotest.py +++ b/app/test/autotest.py @@ -143,6 +143,7 @@ class AutoTest: self.report_list.append(report) def gen_report(self): + fails = 0 for report in self.report_list: # main report header and stats self.literal = 0 @@ -186,15 +187,17 @@ class AutoTest: reportlog.write(s) reportlog.close() + if report["fails"] > 0: + fails += 1 # displayed on console print print "-------------------------" print - if report["fails"] == 0: + if fails == 0: print "All test OK" else: - print "%s test(s) failed"%(report["fails"]) + print "%s test(s) failed" % fails # file API, to store logs from pexpect def write(self, buf): -- 1.7.2.5