From patchwork Wed Jul 15 14:29:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Elder X-Patchwork-Id: 8834 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 0CCB0BD792 for ; Wed, 15 Jul 2020 14:30:11 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 8E813609A5; Wed, 15 Jul 2020 16:30:10 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="ggo6Aei0"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 21B5C6093A for ; Wed, 15 Jul 2020 16:30:09 +0200 (CEST) Received: from pyrite.rasen.tech (unknown [IPv6:2400:4051:61:600:2c71:1b79:d06d:5032]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 7C7C9564; Wed, 15 Jul 2020 16:30:07 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1594823408; bh=SHh606syb72Xwp25w5O9O62FiucRbo5fHqUlZGmkaM0=; h=From:To:Cc:Subject:Date:From; b=ggo6Aei08k8RyZBg3p1KczCwpbrqnOYVyqB1KTnDOMKlEPmQj7cih5Ns34iHJWiOk HHLZwZA03NphghtEc1/kp89O/mjyGHs8jLdKnsGz0to+EQk+veKG/aFuStMpIZgcpJ xNdzrnx2DpUCMLuVOw+NCDixikSqrbfUujlxAImI= From: Paul Elder To: libcamera-devel@lists.libcamera.org Date: Wed, 15 Jul 2020 23:29:57 +0900 Message-Id: <20200715142957.24603-1-paul.elder@ideasonboard.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH] tests: v4l2_compat: Fix v4l2-compliance and v4l2-ctl version parsing X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" v4l2-compliance originally printed the SHA before the version, leading to the indexing that was used previously. Now that the version is printed before the SHA, the indexing is incorrect. Fix this. Although v4l2-ctl doesn't suffer the same issue, it is more correct to use the zeroth index like the v4l2-compliance version check now does, so fix that as well. Signed-off-by: Paul Elder Reviewed-by: Laurent Pinchart --- test/v4l2_compat/v4l2_compat_test.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/v4l2_compat/v4l2_compat_test.py b/test/v4l2_compat/v4l2_compat_test.py index b054fe6..9867ece 100755 --- a/test/v4l2_compat/v4l2_compat_test.py +++ b/test/v4l2_compat/v4l2_compat_test.py @@ -94,7 +94,7 @@ def main(argv): return TestSkip ret, out = run_with_stdout(v4l2_compliance, '--version') - if (ret != 0 or version.parse(out[-2].split()[-1]) < MIN_V4L_UTILS_VERSION): + if (ret != 0 or version.parse(out[0].split()[-1]) < MIN_V4L_UTILS_VERSION): print('v4l2-compliance version >= 1.21.0 required') return TestSkip @@ -104,7 +104,7 @@ def main(argv): return TestSkip ret, out = run_with_stdout(v4l2_ctl, '--version') - if (ret != 0 or version.parse(out[-2].split()[-1]) < MIN_V4L_UTILS_VERSION): + if (ret != 0 or version.parse(out[0].split()[-1]) < MIN_V4L_UTILS_VERSION): print('v4l2-ctl version >= 1.21.0 required') return TestSkip