From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 429C6CE7 for ; Wed, 8 Jul 2015 16:30:10 +0200 (CEST) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga103.jf.intel.com with ESMTP; 08 Jul 2015 07:30:08 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,431,1432623600"; d="scan'208";a="602368757" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by orsmga003.jf.intel.com with ESMTP; 08 Jul 2015 07:30:07 -0700 Received: from shecgisg003.sh.intel.com (shecgisg003.sh.intel.com [10.239.29.90]) by shvmail01.sh.intel.com with ESMTP id t68EU58M003166; Wed, 8 Jul 2015 22:30:05 +0800 Received: from shecgisg003.sh.intel.com (localhost [127.0.0.1]) by shecgisg003.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id t68EU3qd010444; Wed, 8 Jul 2015 22:30:05 +0800 Received: (from yliu84x@localhost) by shecgisg003.sh.intel.com (8.13.6/8.13.6/Submit) id t68EU2tX010440; Wed, 8 Jul 2015 22:30:02 +0800 From: Yong Liu To: dts@dpdk.org Date: Wed, 8 Jul 2015 22:30:01 +0800 Message-Id: <1436365801-10374-1-git-send-email-yong.liu@intel.com> X-Mailer: git-send-email 1.7.4.1 Subject: [dts] [PATCH] Clear all sessions before running each test case X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jul 2015 14:30:10 -0000 From: Marvin Liu Connected session output sequence maybe broken by unexpected output. Add clear before running each case, which will improve stability. Signed-off-by: Marvin Liu diff --git a/framework/dts.py b/framework/dts.py index c4f4663..b667ba4 100644 --- a/framework/dts.py +++ b/framework/dts.py @@ -586,6 +586,10 @@ def execute_test_case(test_suite, test_case): try: log_handler.info('Test Case %s Begin' % test_case.__name__) test_suite.running_case = test_case.__name__ + # clear all previous output + test_suite.dut.get_session_output(timeout=0.1) + test_suite.tester.get_session_output(timeout=0.1) + # run set_up function for each case test_suite.set_up() # prepare debugger re-run case environment if debug_mode or debug_case: -- 1.9.3