From nobody Fri May 3 08:30:07 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1567190528; cv=none; d=zoho.com; s=zohoarc; b=i/wQ/267n238As+BEv202L+Ytk1dcp1IJMoy8XefK8JmU0vN4XCSNhNL0ott2Lc0EPyVrMoIfpkVozAacu19f8mL1vXWLjo2QDPkCWbSbscasmAYrnSBtJujzRiMMXkDYbyzuws6BO000ULATebIG5PN+NS3BpmExTKQXuhgncI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1567190528; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To:ARC-Authentication-Results; bh=h6Euic1EPDhwXOTJidqo5kjCTDwsiL3mj2EUBH15n1Y=; b=gguHJbH/N/KRcl2G2aWd7m1BKPKPB2j2a117J8kyusLjvUqSDG5tFnWxTM0EcbY/+YL9qDxrTCKeoha+yy8ur/Zg/L6hsRHzHjI9qIDZqvVrz00a8n/buQVHLSiDUAVeF52hu3Cs1MfrHp9N4rUpm0TdKG7T/tAlAY8gkxU7+mU= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1567190528351432.13951578198316; Fri, 30 Aug 2019 11:42:08 -0700 (PDT) Received: from localhost ([::1]:40492 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i3lqQ-0006Bm-9r for importer@patchew.org; Fri, 30 Aug 2019 14:41:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35562) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i3lpH-0005Eo-Et for qemu-devel@nongnu.org; Fri, 30 Aug 2019 14:40:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i3lpF-0007Xv-58 for qemu-devel@nongnu.org; Fri, 30 Aug 2019 14:40:46 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47064) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1i3lpE-0007XU-Tr for qemu-devel@nongnu.org; Fri, 30 Aug 2019 14:40:45 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 708F0300CB2B; Fri, 30 Aug 2019 18:40:43 +0000 (UTC) Received: from x1w.redhat.com (unknown [10.40.205.194]) by smtp.corp.redhat.com (Postfix) with ESMTPS id F3312A214; Fri, 30 Aug 2019 18:40:36 +0000 (UTC) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Cleber Rosa , Eduardo Habkost , David Gibson Date: Fri, 30 Aug 2019 20:40:33 +0200 Message-Id: <20190830184033.7630-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Fri, 30 Aug 2019 18:40:43 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH] tests/acceptance: Do not install paramiko module by default X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Aleksandar Markovic , Aleksandar Rikalo , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Aleksandar Markovic , Aurelien Jarno Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" The paramiko Python module has many dependencies. Some of them are not pure Python, such cryptography module which requires to be built and linked with OpenSSL. When native libraries and header are missing on the host, the error reported is not very helpful: $ make check-venv VENV tests/venv PIP tests/requirements.txt Command "tests/venv/bin/python -u -c "import setuptools, tokenize;__file_= _=3D'/tmp/pip-build-la4el5r5/cryptography/setup.py';f=3Dgetattr(tokenize, '= open', open)(__file__);code=3Df.read().replace('\r\n', '\n');f.close();exec= (compile(code, __file__, 'exec'))" install --record /tmp/pip-1efs22iz-recor= d/install-record.txt --single-version-externally-managed --compile --instal= l-headers tests/venv/include/site/python3.6/cryptography" failed with error= code 1 in /tmp/pip-build-la4el5r5/cryptography/ Since currently the tests depending on paramiko are targetting very specific uses, we can avoid the strong dependency on the paramiko module, to let systems where it does not build properly work the rest of the tests. If paramiko is manually installed, the tests using it will be automatically run. Fixes: c47c336e870 Reported-by: David Gibson Suggested-by: Cleber Rosa Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- tests/acceptance/linux_ssh_mips_malta.py | 13 +++++++++++-- tests/requirements.txt | 1 - 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/tests/acceptance/linux_ssh_mips_malta.py b/tests/acceptance/li= nux_ssh_mips_malta.py index aafb0c39f6..dbcdc03a80 100644 --- a/tests/acceptance/linux_ssh_mips_malta.py +++ b/tests/acceptance/linux_ssh_mips_malta.py @@ -9,14 +9,19 @@ import os import re import base64 import logging -import paramiko import time =20 -from avocado import skipIf +from avocado import skipIf, skipUnless from avocado_qemu import Test from avocado.utils import process from avocado.utils import archive =20 +PARAMIKO_AVAILABLE =3D True +try: + import paramiko +except ImportError: + PARAMIKO_AVAILABLE =3D False + =20 class LinuxSSH(Test): =20 @@ -171,6 +176,7 @@ class LinuxSSH(Test): self.run_common_commands() self.shutdown_via_ssh() =20 + @skipUnless(PARAMIKO_AVAILABLE, "paramiko module not available") @skipIf(os.getenv('CONTINUOUS_INTEGRATION'), 'Running on Travis-CI') def test_mips_malta32eb_kernel3_2_0(self): """ @@ -186,6 +192,7 @@ class LinuxSSH(Test): =20 self.do_test_mips_malta('be', kernel_path, 'mips') =20 + @skipUnless(PARAMIKO_AVAILABLE, "paramiko module not available") @skipIf(os.getenv('CONTINUOUS_INTEGRATION'), 'Running on Travis-CI') def test_mips_malta32el_kernel3_2_0(self): """ @@ -201,6 +208,7 @@ class LinuxSSH(Test): =20 self.do_test_mips_malta('le', kernel_path, 'mips') =20 + @skipUnless(PARAMIKO_AVAILABLE, "paramiko module not available") @skipIf(os.getenv('CONTINUOUS_INTEGRATION'), 'Running on Travis-CI') def test_mips_malta64eb_kernel3_2_0(self): """ @@ -215,6 +223,7 @@ class LinuxSSH(Test): kernel_path =3D self.fetch_asset(kernel_url, asset_hash=3Dkernel_h= ash) self.do_test_mips_malta('be', kernel_path, 'mips64') =20 + @skipUnless(PARAMIKO_AVAILABLE, "paramiko module not available") @skipIf(os.getenv('CONTINUOUS_INTEGRATION'), 'Running on Travis-CI') def test_mips_malta64el_kernel3_2_0(self): """ diff --git a/tests/requirements.txt b/tests/requirements.txt index 3ae0e29ad7..002ded6a22 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -2,4 +2,3 @@ # in the tests/venv Python virtual environment. For more info, # refer to: https://pip.pypa.io/en/stable/user_guide/#id1 avocado-framework=3D=3D68.0 -paramiko --=20 2.20.1