Message ID | 20190904203013.9028-43-alex.bennee@linaro.org |
---|---|
State | Superseded |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:ce:0:0:0:0 with SMTP id r14csp434246ilq; Wed, 4 Sep 2019 14:02:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqxpCTtLkxtUTzp/VdJGG6GF4I/m7jrhKK0BbnLwuHnNQs3BjYHCSHJ1y2KGxtbDgZ/oBCnx X-Received: by 2002:a05:620a:1369:: with SMTP id d9mr13648332qkl.345.1567630922114; Wed, 04 Sep 2019 14:02:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567630922; cv=none; d=google.com; s=arc-20160816; b=zKHj3d19unH1xWfVHBBICC8k2LkvI9An6+9DL9Y3KztUzpQc3ldwC5nqfd9uPJ1FlJ Gd02EArohlxyWnc6rqi5GwfapSbAQhPLNNom1ShazGY4R2G4z1M5uLKFzCcdBWZL2IdZ 63rEc/sauyZa1+FtZdqCpXg9lLREU5iXqAxmNnGuiEOCP7QYHtSLseArIiYMe1yE2Q6T jfSI9nHE5aYZcnAZ+fKlOkF4S9w3m56rCuXm894YJapSKFLbUmxu+AZnub4ww3dKusae z4FymzBszRO0/XySbowBu1wVQgDhvwr4sH/hZ7BuBeKIYlWPxiBQUGyrdAbHBBoG/zMd 4kzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=hNdc0bOvReThYAW1J8YFGDoTrvBZD9ylSfMtDKRLzHM=; b=IJbDb+WHyMokPRUbPxkBT4RsXIsKAuinotAhmOwDr3fiuvBq6K9gbp1JGhwaC91uCr 2/qf9Zf76VaFcakQNgs3XgBGim7/Pd1DceqMvNxfCpgFSpG0I3WGq60r/zhKRfDykxsA GqJteRgdbsatZB//PuaFSLfDgqBEDSXQMd+NWA6tpRPHhuJ/ICwQOS7RYGCycx0/HSuQ 9sBC+g1HOIq+o0D2U2Lqbw+kanVx5ifw/7u7C+e5uAdCpkmiN7JS2orE4hPiCrN8AkYK oxsM9+n/Ey/TFbj8sRMIYqj7uLhMI8A6T24VCO2RZKJPejXFnZgEvfiPL2bYo6Mn6Sln MvHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=UjDZo5LX; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: <qemu-devel-bounces+patch=linaro.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id u188si131823qka.97.2019.09.04.14.02.02 for <patch@linaro.org> (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 04 Sep 2019 14:02:02 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=UjDZo5LX; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:39696 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <qemu-devel-bounces+patch=linaro.org@nongnu.org>) id 1i5cPh-00055A-42 for patch@linaro.org; Wed, 04 Sep 2019 17:02:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51572) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <alex.bennee@linaro.org>) id 1i5c3u-0000uZ-Tz for qemu-devel@nongnu.org; Wed, 04 Sep 2019 16:39:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <alex.bennee@linaro.org>) id 1i5c3t-0003Tn-DE for qemu-devel@nongnu.org; Wed, 04 Sep 2019 16:39:30 -0400 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]:43868) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from <alex.bennee@linaro.org>) id 1i5c3t-0003Sl-5i for qemu-devel@nongnu.org; Wed, 04 Sep 2019 16:39:29 -0400 Received: by mail-wr1-x431.google.com with SMTP id y8so185237wrn.10 for <qemu-devel@nongnu.org>; Wed, 04 Sep 2019 13:39:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=hNdc0bOvReThYAW1J8YFGDoTrvBZD9ylSfMtDKRLzHM=; b=UjDZo5LXyP2ofViw8/x2hmCVzuMJzJ/7nMdPSJ/8cu4QEs8pgHlHFUNNmTEMqNDNeJ Z0Jz+2wI+RUzQd+nQMPUxzcnsB1mIrPsGDYHUcxc2KL7/2LoYUe+SGIENJLDKOmjwmSC e/z/qRmrFN0slVNw2CgrGF+2kgxbMczmsmQjdfw8UrHrAznTlfw+rKZojLG341wF0s20 5mDdAIScbXz2Qhsh2CvW4w/4cX3l2r94YJumDbME0XNSHgE2I6+iNqkgOSA121U5h1O/ BrjZ0AGQbjDE4BGT9XNHtNJNU/8r46fsaTcuRY0aAreJ/SbfC6eAsqT4a0bkvElEkV8T hk6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=hNdc0bOvReThYAW1J8YFGDoTrvBZD9ylSfMtDKRLzHM=; b=PBgrElex0z6QeIsWQhsP/Q1L/T2a9MvA9ZxAcyhBsdA1G/cSMsfFUu59Tmnn06z1gZ /25v7kfKYCEForZKgd377jzSrbqxxNQM5FK4ynXzIpp2ErOoQdcFIgx4+dV6gFtXVWVJ Y/GJQaOKotPRyu76fIF9JcSkIQIGYLYZa8AL8wlhng7yR5AcP7Qcb9ZKy5ttzRr3Y/7c adhqur6wlh2VLRVmO5quFVmgoWCTIDunp9Lau1TH/m3Luvqs+pnVIhqFWllfz2OEYu0n lRN+aFkpYCbeAfiuCshtshImwMo6rCMBznkcj0sQWxjwcEahD9j5e9hjAQRtds2/dv5O AAUQ== X-Gm-Message-State: APjAAAVk+QwpAH2DuTHMKC1Z6xfk1hohV9i321qbH+8ASktNsyoDP5SO 9AdIOaC4EPaHYA7xgVV9BDMNRw== X-Received: by 2002:a5d:43cc:: with SMTP id v12mr9511609wrr.75.1567629568037; Wed, 04 Sep 2019 13:39:28 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id h32sm29731448wrh.62.2019.09.04.13.39.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Sep 2019 13:39:26 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 33EAB1FFC2; Wed, 4 Sep 2019 21:30:17 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= <alex.bennee@linaro.org> To: qemu-devel@nongnu.org Date: Wed, 4 Sep 2019 21:30:13 +0100 Message-Id: <20190904203013.9028-43-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190904203013.9028-1-alex.bennee@linaro.org> References: <20190904203013.9028-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::431 Subject: [Qemu-devel] [PATCH v1 42/42] tests/docker: don't always encoding for subprocess.check_output X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Cc: fam@euphon.net, berrange@redhat.com, stefanb@linux.vnet.ibm.com, =?utf-8?q?Alex_Benn=C3=A9e?= <alex.bennee@linaro.org>, richard.henderson@linaro.org, f4bug@amsat.org, =?utf-8?q?Philippe_Mat?= =?utf-8?q?hieu-Daud=C3=A9?= <philmd@redhat.com>, cota@braap.org, stefanha@redhat.com, marcandre.lureau@redhat.com, pbonzini@redhat.com, aurelien@aurel32.net Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" <qemu-devel-bounces+patch=linaro.org@nongnu.org> |
Series |
current testing/next queue (podman, docker, ci)
|
expand
|
diff --git a/tests/docker/docker.py b/tests/docker/docker.py index 8f391eb278b..e5b7632464b 100755 --- a/tests/docker/docker.py +++ b/tests/docker/docker.py @@ -258,10 +258,16 @@ class Docker(object): return self._do_kill_instances(True) def _output(self, cmd, **kwargs): - return subprocess.check_output(self._command + cmd, - stderr=subprocess.STDOUT, - encoding='utf-8', - **kwargs) + if sys.version_info[1] >= 6: + return subprocess.check_output(self._command + cmd, + stderr=subprocess.STDOUT, + encoding='utf-8', + **kwargs) + else: + return subprocess.check_output(self._command + cmd, + stderr=subprocess.STDOUT, + **kwargs) + def inspect_tag(self, tag): try:
This was only added in Python 3.6 and not all the build hosts have that recent a python3. However those that do will complain if everything isn't properly utf-8 clean: ./tests/docker/docker.py --engine auto build qemu:debian-amd64 tests/docker/dockerfiles/debian-amd64.docker --add-current-user Sending build context to Docker daemon 3.584kB Step 1/16 : FROM qemu:debian9 pull access denied for qemu, repository does not exist or may require 'docker login' Traceback (most recent call last): File "./tests/docker/docker.py", line 659, in <module> sys.exit(main()) File "./tests/docker/docker.py", line 655, in main return args.cmdobj.run(args, argv) File "./tests/docker/docker.py", line 452, in run extra_files_cksum=cksum) File "./tests/docker/docker.py", line 306, in build_image quiet=quiet) File "./tests/docker/docker.py", line 231, in _do_check return subprocess.check_call(self._command + cmd, **kwargs) File "/usr/lib/python3.4/subprocess.py", line 561, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['docker', 'build', '-t', 'qemu:debian-amd64', '-f', '/tmp/docker_buildjvzs88tf/tmpyvtj7ub0.docker', '/tmp/docker_buildjvzs88tf']' returned non-zero exit status 1 Error in atexit._run_exitfuncs: Traceback (most recent call last): File "./tests/docker/docker.py", line 258, in _kill_instances return self._do_kill_instances(True) File "./tests/docker/docker.py", line 239, in _do_kill_instances labels = json.loads(resp)[0]["Config"]["Labels"] File "/usr/lib/python3.4/json/__init__.py", line 312, in loads s.__class__.__name__)) TypeError: the JSON object must be str, not 'bytes' make: *** [docker-image-debian-amd64] Error 1 Signed-off-by: Alex Bennée <alex.bennee@linaro.org> --- tests/docker/docker.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) -- 2.20.1