From patchwork Fri Dec 21 08:13:09 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 69 Return-Path: Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 2497560B0C for ; Fri, 21 Dec 2018 09:13:21 +0100 (CET) Received: from localhost.localdomain (cpc89242-aztw30-2-0-cust488.18-1.cable.virginm.net [86.31.129.233]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id B11C059D; Fri, 21 Dec 2018 09:13:20 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1545380000; bh=BFM1NP2krs11zA02ifV8CXfvRZDRo5Sx3781VKuO7rk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jxCsAmPbjdE7Bo+CMVcXtTXMDliwNO4mQuDeYBwncwmRqKRkRml8+CW1cN0/kCk5f 0EliQxXj0BwDB5VqQ81Yn928SOVePmNbpAubKuABi8LN+aLKr36DJsEd22gztI2CLB +pHwxE8fj0ywWyg6BwuBWlQjPbBona3WshAndMlQ= From: Kieran Bingham To: LibCamera Devel Date: Fri, 21 Dec 2018 08:13:09 +0000 Message-Id: <20181221081311.3291-4-kieran.bingham@ideasonboard.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181221081311.3291-1-kieran.bingham@ideasonboard.com> References: <20181221081311.3291-1-kieran.bingham@ideasonboard.com> Subject: [libcamera-devel] [PATCH 3/5] test: libtest: Return all non-zero init values X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Dec 2018 08:13:21 -0000 A skipped test is currently defined as returning 77. If this is returned by the init stage, currently the execute call will continue on to the run stage. Correct this such that any non-zero return code from the init phase will abort the test. Signed-off-by: Kieran Bingham --- test/libtest/test.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/libtest/test.cpp b/test/libtest/test.cpp index 1bb6ebcb9e8a..9d537ea08698 100644 --- a/test/libtest/test.cpp +++ b/test/libtest/test.cpp @@ -20,7 +20,7 @@ int Test::execute() int ret; ret = init(); - if (ret < 0) + if (ret) return ret; ret = run();