Message ID | 20190808231015.14330-3-ricardo.martincoski@gmail.com |
---|---|
State | Accepted |
Headers | show
Return-Path: <buildroot-bounces@busybox.net> X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.136; helo=silver.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=<UNKNOWN>) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="UbLZPYNd"; dkim-atps=neutral Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 464PKS5J1mz9sDB for <incoming-buildroot@patchwork.ozlabs.org>; Fri, 9 Aug 2019 09:12:28 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 0B73D204B9; Thu, 8 Aug 2019 23:12:27 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id dbgY+xy+Ir9q; Thu, 8 Aug 2019 23:12:20 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 0FE96204CF; Thu, 8 Aug 2019 23:12:17 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 9ACA31BF383 for <buildroot@lists.busybox.net>; Thu, 8 Aug 2019 23:12:15 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 97E58204AF for <buildroot@lists.busybox.net>; Thu, 8 Aug 2019 23:12:15 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id d1XX8Nj9EMjJ for <buildroot@lists.busybox.net>; Thu, 8 Aug 2019 23:12:15 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-qt1-f178.google.com (mail-qt1-f178.google.com [209.85.160.178]) by silver.osuosl.org (Postfix) with ESMTPS id CBBC420468 for <buildroot@buildroot.org>; Thu, 8 Aug 2019 23:12:14 +0000 (UTC) Received: by mail-qt1-f178.google.com with SMTP id f7so1160705qtq.12 for <buildroot@buildroot.org>; Thu, 08 Aug 2019 16:12:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=+QEC1mgt37mdSxVapZUmW0TUp1mfnLYq13i54tpYh3Y=; b=UbLZPYNdmQBkUtIugDwu6+xouQTd4EkwjhdamaRbYcEYFUzdhEQO5mpJ9if3V/tXjK VF8Z/6ZRAL8qIf/3p7Lf4yc3oMaGUFKPkeZ+7oQbnJd7UmaCyz7E3axJqeK9CJxM/q54 eWkRpaAE2zizG2VwrM+rH1ZXkq8/oWgAPsGK/b5TM50PFwRNPFDiNWksw2IqBMmz4LIw lcQRbyyMZ7slhhTB7BHfeu8VvaDw0ldTKliLK5BkKRUxnQy5YFxFdca3Hr6A+hafr/NR FvKHWkpapNX47FaUz6THo5olxmro3BkP9P4PADDbcCqfET5RVCgdllpUHNYFEr+xqIA9 CAZQ== 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; bh=+QEC1mgt37mdSxVapZUmW0TUp1mfnLYq13i54tpYh3Y=; b=eR6ZRxFbmH8EeVOZyH7oWsXQz6eIxyTX/nNAIW59VPlnyEcpxXVAZx6QXhAvuoz8R+ ItdD04N4ywHobJNKlTNpTj4gwxidJErwAElyiKv0DG89b1405LGPRDGgZh1mATv2OCYX TPR6QMNH0IREtGhTsZAVBYNilGF2Vzz2jSKjelB9Yl6ShD7SSzDLKN/OojpCjuIlCbHZ KcsApec9vqLZcaCJqQhWK9+2lOnkc9iyA58j+/KNhxr2NsE8jM/Fm+7aXdoiylH6U1mq qcTKWwnBZ0cnX5e9/ndEzrBXp3iOdAmW24KJ0aq1ZRDU+ueTfORJdPg68t9UHb3BaQOQ Y1fQ== X-Gm-Message-State: APjAAAUrtFQXgUE2z/kYrEznAqSu85RaV9oidQWzhDqY1VANZD3zrlP4 4uYcw1YyzQNoj8c+6Ol6WgLFScLE X-Google-Smtp-Source: APXvYqxrebx8IjKnC6/HxG9P8UPmQpoeBg8Zglj0NGl4S/gTVvb6QqnXNdcWnH/pGZR10nPZ8jTNIA== X-Received: by 2002:ac8:444c:: with SMTP id m12mr15616023qtn.306.1565305933695; Thu, 08 Aug 2019 16:12:13 -0700 (PDT) Received: from ultri5.home (189.27.173.197.dynamic.adsl.gvt.net.br. [189.27.173.197]) by smtp.gmail.com with ESMTPSA id p59sm42473961qtd.75.2019.08.08.16.12.12 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 08 Aug 2019 16:12:13 -0700 (PDT) From: Ricardo Martincoski <ricardo.martincoski@gmail.com> To: buildroot@buildroot.org Date: Thu, 8 Aug 2019 20:10:12 -0300 Message-Id: <20190808231015.14330-3-ricardo.martincoski@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190808231015.14330-1-ricardo.martincoski@gmail.com> References: <20190808231015.14330-1-ricardo.martincoski@gmail.com> Subject: [Buildroot] [PATCH 2/5] support/testing: do not print non-utf-8 chars on cbor test X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot <buildroot.busybox.net> List-Unsubscribe: <http://lists.busybox.net/mailman/options/buildroot>, <mailto:buildroot-request@busybox.net?subject=unsubscribe> List-Archive: <http://lists.busybox.net/pipermail/buildroot/> List-Post: <mailto:buildroot@busybox.net> List-Help: <mailto:buildroot-request@busybox.net?subject=help> List-Subscribe: <http://lists.busybox.net/mailman/listinfo/buildroot>, <mailto:buildroot-request@busybox.net?subject=subscribe> Cc: Ricardo Martincoski <ricardo.martincoski@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" <buildroot-bounces@busybox.net> |
Series |
test infra using Python 3
|
expand
|
diff --git a/support/testing/tests/package/sample_python_cbor_enc.py b/support/testing/tests/package/sample_python_cbor_enc.py index 1bde92bb9f..31d937d4b8 100644 --- a/support/testing/tests/package/sample_python_cbor_enc.py +++ b/support/testing/tests/package/sample_python_cbor_enc.py @@ -9,6 +9,6 @@ data = { } } serialized = cbor.dumps(data) -print(serialized) +print(serialized.decode(errors="ignore")) with open("/tmp/data.cbor", "wb") as f: f.write(serialized)
The python-cbor sample script to be run on the target dumps a binary variable to the target stdout. This is done for debug purposes-only, in the case the test on test infra fails. This non-utf-8 is currently silently ignored by the Emulator class / pexpect.spawn from the test infra because the infra uses Python 2, that in turn do not differentiate between string and byte data. Make the code Python3-friendly (Python 3 in the host) by doing the right thing and encoding the data before printing it. Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com> --- support/testing/tests/package/sample_python_cbor_enc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)