From patchwork Sat Jul 25 12:24:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: You-Sheng Yang X-Patchwork-Id: 8999 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 6D3B4BD879 for ; Sat, 25 Jul 2020 13:03:30 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 467D8612F1; Sat, 25 Jul 2020 15:03:29 +0200 (CEST) Received: from mail-pg1-f171.google.com (mail-pg1-f171.google.com [209.85.215.171]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 8A77261223 for ; Sat, 25 Jul 2020 14:24:55 +0200 (CEST) Received: by mail-pg1-f171.google.com with SMTP id w2so6843052pgg.10 for ; Sat, 25 Jul 2020 05:24:55 -0700 (PDT) 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=kSKmT6S8K89Zy2ALnmBZGLkqWO9SHmmfudG5vSedVO4=; b=NkGxbvNk/ssS9R2YDe72D4dou7yj8vaL68FYY62YQUV6NM6wCv4IRENONk4GWBBtel Y90YwF41ZMbA6RYvekCkCw9C6IyzS/uQyCDMlQl1sv8/MBuT9XBc6BgN7sHl3kXFWD54 AqbyEmim54Fcaee2dv0csVpmehO9wsEksGOW2otm18JsTxLcA/bZqNZe2WIfubU3krBi 3IW4PBkRTipVlJaZg/2VzwX4jY5xz5CIi5iO4jrH57dOdu3QBGIRGEPIEzxTug2V1C1x z8z1Qamdx//nhZj4rtJPRXU/sWkft8R6bFM5wrgDa0qe5AdL8yoTXHritqmVeJR5AuZ2 9KdQ== X-Gm-Message-State: AOAM532CE9MY5XSJwNyLtvsjB5hh/7hrOBW6hv0bR61pN3hEwcxTlKXJ X9ApsyaZPV+j5zV3vWHxcDyIXmEHiFY= X-Google-Smtp-Source: ABdhPJwWoPVi44SPzj+rJGk4vNy3Emz6YM4dfrnet6ECwbpbmxFmUQ/t/bMA/1YC9mNephwtEqMxDA== X-Received: by 2002:a63:9201:: with SMTP id o1mr11028193pgd.99.1595679893751; Sat, 25 Jul 2020 05:24:53 -0700 (PDT) Received: from localhost (61-220-137-37.HINET-IP.hinet.net. [61.220.137.37]) by smtp.gmail.com with ESMTPSA id d37sm8887731pgd.18.2020.07.25.05.24.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 Jul 2020 05:24:53 -0700 (PDT) From: You-Sheng Yang To: libcamera-devel@lists.libcamera.org Date: Sat, 25 Jul 2020 20:24:42 +0800 Message-Id: <20200725122442.1679820-4-vicamo.yang@canonical.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200725122442.1679820-1-vicamo.yang@canonical.com> References: <20200725122442.1679820-1-vicamo.yang@canonical.com> MIME-Version: 1.0 X-Mailman-Approved-At: Sat, 25 Jul 2020 15:03:26 +0200 Subject: [libcamera-devel] [PATCH 3/3] test: list-cameras: skip if no camera is available 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" Signed-off-by: You-Sheng Yang --- test/list-cameras.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/list-cameras.cpp b/test/list-cameras.cpp index e6a407a..f4cd3b7 100644 --- a/test/list-cameras.cpp +++ b/test/list-cameras.cpp @@ -26,7 +26,7 @@ protected: return TestFail; } - return 0; + return cm_->cameras().size() ? TestPass : TestSkip; } int run()