From patchwork Wed Oct 9 11:01:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 175615 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp588028ill; Wed, 9 Oct 2019 04:02:00 -0700 (PDT) X-Google-Smtp-Source: APXvYqx60Jdc8MYYOUQuWOsEnM8jpcxnslUVIa7s+fEz0YvV6ojH5hbbvzSRGRF0+qoclNtMjyIk X-Received: by 2002:a17:902:6507:: with SMTP id b7mr2473745plk.65.1570618920851; Wed, 09 Oct 2019 04:02:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570618920; cv=none; d=google.com; s=arc-20160816; b=QsASygt8KRkARPiB/yZ34BWtD5FXZ3B+RSydTG1fPYFxDgweKV4Tz9jeIiGO+0mpv/ FM4qT/RSMsD/s4m1b+MikZaxLgVkdz5r9RbQNW1tt1jnT6nN9KICcXMifoYiMppCZvf5 9tntPjth4ZkqRYW+xtfPKfr82qxoJ/soxCv2vP/YWGe6x7ma22Qnux265qiQJ2Utf3w5 BRfMhlkfETDHZOk4F7fQVpy4h/cJzc5HaDhk4R0MQVm8d3SBhCV3YTE/wYKgFG5ECaVO h7dzmN5rSc5IrVPlVN25q+vGOgQmQ95/PktflS08HJ7Aitih7/jkOdIehnl8vhQTYMYj iwHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:message-id:date:to:from:dkim-signature:delivered-to; bh=e3hRgD+Ng8JZ0vNlAq4vtyCyJe0lWgmHBZSaru84LtA=; b=ngN4LGMze4STCX4yRZ0ua/tcN9zmJ/Doao9PQK4WMxcsmgcTfayyy/uRPQynKZKeCF t+dEXc7H6Amxrsf+jLQnlJGxeUD0YC3J1AQJCS7NGYvIcgTuFSaQFThIXeHDUqaG/vuN nN1v+Qd4i+5pB75UhsciSbYM8a0lPbVr64NFtcrJXJrXe25qZCuxVSv3/UvBgc/VyT6/ kWuqxxjIxq3aYPg0WlVYQCf9jssQRQRObxb/F0IYi6pGMLoRQVFjBP6OiYrvfI7+/GIt PGQLtRj55y3byCIED8Yo9DO/SGVW2X6UsSFnN1b8ualNtqn+OCrCNehQAy2Ts8ctGisF 5XnA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=lFUBbnap; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id s1si1894880pgk.575.2019.10.09.04.02.00; Wed, 09 Oct 2019 04:02:00 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=lFUBbnap; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from ec2-34-214-78-129.us-west-2.compute.amazonaws.com (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id 31C157F467; Wed, 9 Oct 2019 11:01:57 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-wr1-f65.google.com (mail-wr1-f65.google.com [209.85.221.65]) by mail.openembedded.org (Postfix) with ESMTP id BB1DB6C3B1 for ; Wed, 9 Oct 2019 11:01:54 +0000 (UTC) Received: by mail-wr1-f65.google.com with SMTP id b9so2370339wrs.0 for ; Wed, 09 Oct 2019 04:01:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=UKm0eOXY0XzA5fQqJdld1bqIl6sQwKb5JzaoQSDeSNU=; b=lFUBbnap9djOzexAXG8zy9kYE4RpDxeYdH/wJSN3i+zens3tHLTZHZoGbJ9SghWU+a JOvzbyctG2R9d8jLgSbeVlVQoewuufZV94yy1OVko0YXIpsYLqntIXqKldPwfKeK3R3L yE2MiZhy62XI3qu9bnCkWH/AZYgmNBfXWZs2vQ0jO5f2qDUh6ayqDhwSUAeR0jmoVflz V2soYu4KCrNHNMuyis1qDF8osH2DITeiBnQQBQ9KMrxIslxvs/IoBhpkCfdFp4/lwjqR B9yWu0eraKVnfH4bxyiponITYSLCoJTdaaa1hCuiEzRfELkmIENbjVUgOdGe89G0VIuz sYDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=UKm0eOXY0XzA5fQqJdld1bqIl6sQwKb5JzaoQSDeSNU=; b=fPAMpW7v5zv2HY4Ty5RYOJrYAuFX47d4YuseExUdrnmWwSzcC+lnsq+12uUTuHWyrk ihdTCviyytI70mXQjeX959tC9uDWti/wcNdUXg+P12gp3/c34lij5SaIsQi7gXo/NViF gFdlTPgJdO7YhVXGl3tjKypMddoVJeg8PlH3jvtznPqjcGVcEiBEE6xBm+CJm0RuUQa+ bsZNDCAxNzig7PrcK22E101lIp6wNbPlidEvViym60dLUzVjKRyQD1XbrbSQf4C+BV11 HP0D03+BtbqPP1Zk6vC4CUKVrvSvZ+IiE48I07TP+SzZdsi3zVrLzfMdACfii2VzQwF4 p0ZQ== X-Gm-Message-State: APjAAAXOJs3QiCuhVi6zx7pT1vAFNPDZDWasJyg1+KorvtVYIW0wyLLj 93xVIJ4zYmgSNTAdtP1htMxWfJhhulM= X-Received: by 2002:adf:f50a:: with SMTP id q10mr2279520wro.157.1570618915147; Wed, 09 Oct 2019 04:01:55 -0700 (PDT) Received: from flashheart.burtonini.com (35.106.2.81.in-addr.arpa. [81.2.106.35]) by smtp.gmail.com with ESMTPSA id w17sm1660777wmi.30.2019.10.09.04.01.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Oct 2019 04:01:53 -0700 (PDT) From: Ross Burton To: openembedded-core@lists.openembedded.org Date: Wed, 9 Oct 2019 12:01:51 +0100 Message-Id: <20191009110151.25071-1-ross.burton@intel.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Subject: [OE-core] [PATCH] oeqa/selftest/imagefeatures: improve test_hypervisor_fmts X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: openembedded-core-bounces@lists.openembedded.org Errors-To: openembedded-core-bounces@lists.openembedded.org If this test fails then the output doesn't help in any meaningful way, so improve the test to output the unparsable JSON and display unexpected output. Signed-off-by: Ross Burton --- meta/lib/oeqa/selftest/cases/imagefeatures.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) -- 2.20.1 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core diff --git a/meta/lib/oeqa/selftest/cases/imagefeatures.py b/meta/lib/oeqa/selftest/cases/imagefeatures.py index 8213d63e375..cf2a42aab5c 100644 --- a/meta/lib/oeqa/selftest/cases/imagefeatures.py +++ b/meta/lib/oeqa/selftest/cases/imagefeatures.py @@ -161,8 +161,12 @@ class ImageFeatures(OESelftestTestCase): sysroot = get_bb_var('STAGING_DIR_NATIVE', 'core-image-minimal') result = runCmd('qemu-img info --output json %s' % image_path, native_sysroot=sysroot) - self.assertTrue(json.loads(result.output).get('format') == itype, - msg="Could not parse '%s'" % result.output) + try: + data = json.loads(result.output) + self.assertEqual(data.get('format'), itype, + msg="Unexpected format in '%s'" % (result.output)) + except json.decoder.JSONDecodeError: + self.fail("Could not parse '%ss'" % result.output) def test_long_chain_conversion(self): """