From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3D184A0352; Thu, 16 Jan 2020 08:53:16 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id F03821BFE1; Thu, 16 Jan 2020 08:53:15 +0100 (CET) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 583371BFCA for ; Thu, 16 Jan 2020 08:53:14 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Jan 2020 23:53:13 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,325,1574150400"; d="scan'208";a="218439766" Received: from unknown (HELO dpdk-xinfengx-dut.sh.intel.com) ([10.67.117.16]) by orsmga008.jf.intel.com with ESMTP; 15 Jan 2020 23:53:12 -0800 From: xinfengx To: dts@dpdk.org Cc: xinfengx Date: Thu, 16 Jan 2020 06:32:58 +0800 Message-Id: <20200115223300.21661-1-xinfengx.zhao@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [dts] [PATCH V1 1/3] framework: fix the issues of dts rerun error and writing error 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: , Errors-To: dts-bounces@dpdk.org Sender: "dts" Signed-off-by: xinfengx --- framework/dts.py | 1 + framework/qemu_libvirt.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/framework/dts.py b/framework/dts.py index 5941b37..afe44b4 100644 --- a/framework/dts.py +++ b/framework/dts.py @@ -523,6 +523,7 @@ def run_all(config_file, pkgName, git, patch, skip_setup, if verbose is True: logger.set_verbose() + re_run = int(re_run) if re_run < 0: re_run = 0 diff --git a/framework/qemu_libvirt.py b/framework/qemu_libvirt.py index 5e34590..e0aeb6c 100644 --- a/framework/qemu_libvirt.py +++ b/framework/qemu_libvirt.py @@ -788,11 +788,11 @@ class LibvirtKvm(VirtBase): if os.path.exists(xml_file): os.remove(xml_file) self.root.write(xml_file) - with open(xml_file, 'rb') as fp: + with open(xml_file, 'r') as fp: content = fp.read() doc = minidom.parseString(content) vm_content = doc.toprettyxml(indent=' ') - with open(xml_file, 'wb') as fp: + with open(xml_file, 'w') as fp: fp.write(vm_content) self.host_session.copy_file_to(xml_file) time.sleep(2) -- 2.17.1