From patchwork Fri Jul 1 08:45:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 16505 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 E1A33BD808 for ; Fri, 1 Jul 2022 08:45:56 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 8D3FA65654; Fri, 1 Jul 2022 10:45:56 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1656665156; bh=M6y+5uZi7jFH5zs87INDd42XiuZf/QXSalaa9/bjY4c=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=ZRNwt/nrjFkTOYlK0QHLgf4yiRg7aw+S6X7ZczipHWctLZOyHk2o1U3mdtwhy5YcQ XR1GsOc8nxRGP62Exw1lLDnpR1BzxUJLagODeaa46LjPZqmP3gpSWwFBJhIhfyD5R4 eDBIyC4CeXH3tVA22OzIlCE96Oam5FherdKQNf1sZHM8kyMXy9kmNVHTVTteDPkeX5 0vPsMGKh6E+79xj9/fkqsQv6/U/gfd53qWsh4iSZHrHq8SI3RldLfAHerWNknQUZFi ZJJpdQVI6uE3bRKW4tu6TBL7zzVKyriWp6SOQY4I2WUuG2tiC1ePeQU/vngXN8uWTt Jg5Id1fO1K3tg== 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 D512C65697 for ; Fri, 1 Jul 2022 10:45:46 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="dbhKjCtc"; dkim-atps=neutral Received: from deskari.lan (91-158-154-79.elisa-laajakaista.fi [91.158.154.79]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 5AB6425C; Fri, 1 Jul 2022 10:45:46 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1656665146; bh=M6y+5uZi7jFH5zs87INDd42XiuZf/QXSalaa9/bjY4c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dbhKjCtc55+BbVQEuTt323BOTxo+1UhNWMqzYChnNJ8aYApmuavflkYgmzX1TpyFk Zoi1YV/4VfNebhO+G2a9cSjTOLx9Hl/IjP9lYRbDU1wYzh5u9D0WOR4Fj3DwulOBLv v983tYYov8imXbw123T162IZyZw2+5PL56PzhzZU= To: libcamera-devel@lists.libcamera.org, David Plowman , Kieran Bingham , Laurent Pinchart , Jacopo Mondi Date: Fri, 1 Jul 2022 11:45:17 +0300 Message-Id: <20220701084521.31831-14-tomi.valkeinen@ideasonboard.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220701084521.31831-1-tomi.valkeinen@ideasonboard.com> References: <20220701084521.31831-1-tomi.valkeinen@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v3 13/17] py: unittests.py: Use new events support 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: , X-Patchwork-Original-From: Tomi Valkeinen via libcamera-devel From: Tomi Valkeinen Reply-To: Tomi Valkeinen Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart --- test/py/unittests.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/py/unittests.py b/test/py/unittests.py index 794e46be..fab791d1 100755 --- a/test/py/unittests.py +++ b/test/py/unittests.py @@ -201,9 +201,9 @@ class SimpleCaptureMethods(CameraTesterBase): if not events: continue - ready_reqs = cm.get_ready_requests() - - reqs += ready_reqs + for ev in cm.get_events(): + self.assertEqual(ev.type, libcam.Event.Type.RequestCompleted) + reqs.append(ev.request) if len(reqs) == num_bufs: break @@ -267,9 +267,9 @@ class SimpleCaptureMethods(CameraTesterBase): while running: events = sel.select() for key, _ in events: - ready_reqs = cm.get_ready_requests() - - reqs += ready_reqs + for ev in cm.get_events(): + self.assertEqual(ev.type, libcam.Event.Type.RequestCompleted) + reqs.append(ev.request) if len(reqs) == num_bufs: running = False