From patchwork Wed Sep 8 08:14:37 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Elder X-Patchwork-Id: 13766 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 7F1A7BDB1D for ; Wed, 8 Sep 2021 08:15:06 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 49D946917A; Wed, 8 Sep 2021 10:15:06 +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="o6ApS6wG"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 33D9B69179 for ; Wed, 8 Sep 2021 10:15:04 +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 44E87993; Wed, 8 Sep 2021 10:15:01 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1631088904; bh=h1yQazzvczXDSFiptddBzYZaEVPm0ehcDiNNS8tiw58=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=o6ApS6wGq4GoVw9XCFoFEoCEyLRnK9gmFrNjJ9Ss0xptfZrJdu9RDYah+nn2ORBkM dlumCx73yTHQ+b1PBtIC0whtDLqFdskqUkg5bewAUkU5dg7N6rPdOgmGim86D8IjoU Cv1VajW6rBHr8JRJ0yU1QKYKN6g5DA119966pSmA= From: Paul Elder To: libcamera-devel@lists.libcamera.org Date: Wed, 8 Sep 2021 17:14:37 +0900 Message-Id: <20210908081437.4022697-8-paul.elder@ideasonboard.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210908081437.4022697-1-paul.elder@ideasonboard.com> References: <20210908081437.4022697-1-paul.elder@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 7/7] test: v4l2_compat_test: Fix v4l2-compliance 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 changed their version string: v4l2-compliance 1.21.0-4618 v4l2-compliance SHA: cc211b76476aca2c072ffa83a9b003957d5f3909, 64 bits, 64-bit time_t v4l2-compliance 1.21.0-4838, 64 bits, 64-bit time_t The current parsing takes the last result of split, which works for the former, but not the latter. Take the second result of split instead, and strip away any commas. Signed-off-by: Paul Elder Reviewed-by: Kieran Bingham Reviewed-by: Laurent Pinchart Tested-by: Laurent Pinchart --- test/v4l2_compat/v4l2_compat_test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/v4l2_compat/v4l2_compat_test.py b/test/v4l2_compat/v4l2_compat_test.py index 51bfa952..ae892ced 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[0].split()[-1]) < MIN_V4L_UTILS_VERSION: + if ret != 0 or version.parse(out[0].split()[1].replace(',', '')) < MIN_V4L_UTILS_VERSION: print('v4l2-compliance version >= 1.21.0 required') return TestSkip