From patchwork Fri Jul 10 14:15:07 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Elder X-Patchwork-Id: 8741 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 169AABD792 for ; Fri, 10 Jul 2020 14:15:33 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 9A8A76048B; Fri, 10 Jul 2020 16:15:32 +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="PAljE+52"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 180BD6048A for ; Fri, 10 Jul 2020 16:15:31 +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 7502924A; Fri, 10 Jul 2020 16:15:29 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1594390530; bh=pu7Y9MxN2gTKVDBey7sxu6mu7whTzq2FyzcyUFtoUqY=; h=From:To:Cc:Subject:Date:From; b=PAljE+52Jb+PW5i2FZvJW968iwt8cx4uIzwwnv+KxC+cA5RncxTfbbJSlnkXU8P1J nueXywuF4n8Y14SHfUv/5EVVtK6R+e5s8ui6MOHM+6QdsnS61rztoUE5VsPUGHDMVU 9oakllNyVicrBgmR56aGXYvnMII983yEUv0bsCmo= From: Paul Elder To: libcamera-devel@lists.libcamera.org Date: Fri, 10 Jul 2020 23:15:07 +0900 Message-Id: <20200710141508.468834-1-paul.elder@ideasonboard.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 1/2] tests: v4l2_compat: Prettify failure output 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" When a test is being run on a video device, there is output like so: Testing /dev/video0 with uvcvideo driver... and when it succeeds, "success" is appended: Testing /dev/video0 with uvcvideo driver... success On failure, however, the output of v4l2-compliance is printed before "failure" is printed, resulting in the first line of the v4l2-compliance output to be printed on the same line as the message: Testing /dev/video2 with uvcvideo driver... v4l2-compliance SHA: not available, 64 bits failure Move printing of "failure" to the print_output_arr(), where the failed test output is printed, to prettify the output upon failure. Signed-off-by: Paul Elder --- 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 99b3d5a..8a8e59e 100755 --- a/test/v4l2_compat/v4l2_compat_test.py +++ b/test/v4l2_compat/v4l2_compat_test.py @@ -55,6 +55,7 @@ def extract_result(result): def print_output_arr(output_arr): + print('failed') print('\n'.join(output_arr)) @@ -135,7 +136,6 @@ def main(argv): ret = test_v4l2_compliance(v4l2_compliance, v4l2_compat, device, driver) if ret == TestFail: failed.append(device) - print('failed') else: print('success') drivers_tested[driver] = True