[libcamera-devel,5/6] test: object-invoke: invoke method in blocking mode

Message ID 20191027203335.26888-6-jacopo@jmondi.org
State Superseded
Delegated to: Jacopo Mondi
Headers show
Series
  • Add support for blocking method invocation
Related show

Commit Message

Jacopo Mondi Oct. 27, 2019, 8:33 p.m. UTC
Change the object-invoke test to perform the second method invocation
operation in blocking mode.

Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
---
 test/object-invoke.cpp | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Laurent Pinchart Oct. 27, 2019, 11:41 p.m. UTC | #1
On Sun, Oct 27, 2019 at 09:33:34PM +0100, Jacopo Mondi wrote:
> Change the object-invoke test to perform the second method invocation
> operation in blocking mode.
> 
> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
> ---
>  test/object-invoke.cpp | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/test/object-invoke.cpp b/test/object-invoke.cpp
> index 6e0e24b146f0..4ae8c91ab7f0 100644
> --- a/test/object-invoke.cpp
> +++ b/test/object-invoke.cpp
> @@ -102,8 +102,7 @@ protected:
>  		thread_.start();
>  
>  		object.invokeMethod(&InvokedObject::method,
> -				    InvocationTypeAuto, 42);
> -		this_thread::sleep_for(chrono::milliseconds(100));
> +				    InvocationTypeBlocking, 42);

The indentation is wrong here.

With this change, I think you can remote #include <chrono> at the top of
the file. Apart from that,

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

>  
>  		switch (object.status()) {
>  		case InvokedObject::NoCall:

Patch

diff --git a/test/object-invoke.cpp b/test/object-invoke.cpp
index 6e0e24b146f0..4ae8c91ab7f0 100644
--- a/test/object-invoke.cpp
+++ b/test/object-invoke.cpp
@@ -102,8 +102,7 @@  protected:
 		thread_.start();
 
 		object.invokeMethod(&InvokedObject::method,
-				    InvocationTypeAuto, 42);
-		this_thread::sleep_for(chrono::milliseconds(100));
+				    InvocationTypeBlocking, 42);
 
 		switch (object.status()) {
 		case InvokedObject::NoCall: