From patchwork Fri Apr 8 15:07:30 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lucas Meneghel Rodrigues X-Patchwork-Id: 694831 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p38F7r1v002235 for ; Fri, 8 Apr 2011 15:07:53 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757510Ab1DHPHr (ORCPT ); Fri, 8 Apr 2011 11:07:47 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35783 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757504Ab1DHPHk (ORCPT ); Fri, 8 Apr 2011 11:07:40 -0400 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p38F7dfb030451 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 8 Apr 2011 11:07:39 -0400 Received: from freedom.redhat.com (vpn-10-185.rdu.redhat.com [10.11.10.185]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p38F7V9S004524; Fri, 8 Apr 2011 11:07:38 -0400 From: Lucas Meneghel Rodrigues To: autotest@test.kernel.org Cc: kvm@vger.kernel.org, Lucas Meneghel Rodrigues Subject: [PATCH 4/4] KVM test: Modify kvm_utils.run_tests to include non fatal failures Date: Fri, 8 Apr 2011 12:07:30 -0300 Message-Id: <1302275250-6215-5-git-send-email-lmr@redhat.com> In-Reply-To: <1302275250-6215-1-git-send-email-lmr@redhat.com> References: <1302275250-6215-1-git-send-email-lmr@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Fri, 08 Apr 2011 15:07:53 +0000 (UTC) So now if a error.TestWarn is thrown, dependent tests can run just fine. Signed-off-by: Lucas Meneghel Rodrigues --- client/tests/kvm/kvm_utils.py | 15 ++++++++++----- 1 files changed, 10 insertions(+), 5 deletions(-) diff --git a/client/tests/kvm/kvm_utils.py b/client/tests/kvm/kvm_utils.py index ff9ee17..8b908ff 100644 --- a/client/tests/kvm/kvm_utils.py +++ b/client/tests/kvm/kvm_utils.py @@ -1150,7 +1150,10 @@ def run_tests(parser, job): for test_name in status_dict.keys(): if not dep in test_name: continue - if not status_dict[test_name]: + # So the only really non-fatal state is WARN, + # All the others make it not safe to proceed with dependency + # execution + if status_dict[test_name] not in ['GOOD', 'WARN']: dependencies_satisfied = False break if dependencies_satisfied: @@ -1163,8 +1166,9 @@ def run_tests(parser, job): # We need only one execution, profiled, hence we're passing # the profile_only parameter to job.run_test(). - current_status = job.run_test("kvm", params=dict, tag=test_tag, - iterations=test_iterations, + current_status = job.run_test_detail("kvm", params=dict, + tag=test_tag, + iterations=test_iterations, profile_only= bool(profilers) or None) for profiler in profilers: @@ -1175,8 +1179,9 @@ def run_tests(parser, job): else: # We will force the test to fail as TestNA during preprocessing dict['dependency_failed'] = 'yes' - current_status = job.run_test("kvm", params=dict, tag=test_tag, - iterations=test_iterations, + current_status = job.run_test_detail("kvm", params=dict, + tag=test_tag, + iterations=test_iterations, profile_only= bool(profilers) or None) status_dict[dict.get("name")] = current_status