diff mbox

validation: possibility to inactive preconded test

Message ID 1452514714-7238-1-git-send-email-christophe.milard@linaro.org
State Superseded
Headers show

Commit Message

Christophe Milard Jan. 11, 2016, 12:18 p.m. UTC
When marking a test which has a precondition as temporarly inactive,
it feels better to be able to keep the precondition function:
ODP_TEST_INFO_CONDITIONAL(send_failure, check_send_failure)
will be marked as inactive by:
ODP_TEST_INFO_INACTIVE(send_failure, check_send_failure)
rather than:
ODP_TEST_INFO_INACTIVE(send_failure)
Remarking the test as active later on is then only a matter of changing
back the macro name.

Signed-off-by: Christophe Milard <christophe.milard@linaro.org>
---
 test/validation/common/odp_cunit_common.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Mike Holmes Jan. 11, 2016, 12:40 p.m. UTC | #1
Looks good, but maybe the implementers guide needs an update.
The example is now out of date, we can have the guide automatically use the
code frm in test as part of the doc if you think that helps keep it in sync

On 11 January 2016 at 07:18, Christophe Milard <christophe.milard@linaro.org
> wrote:


> When marking a test which has a precondition as temporarly inactive,

> it feels better to be able to keep the precondition function:

> ODP_TEST_INFO_CONDITIONAL(send_failure, check_send_failure)

> will be marked as inactive by:

> ODP_TEST_INFO_INACTIVE(send_failure, check_send_failure)

> rather than:

> ODP_TEST_INFO_INACTIVE(send_failure)

> Remarking the test as active later on is then only a matter of changing

> back the macro name.

>

> Signed-off-by: Christophe Milard <christophe.milard@linaro.org>

> ---

>  test/validation/common/odp_cunit_common.h | 2 +-

>  1 file changed, 1 insertion(+), 1 deletion(-)

>

> diff --git a/test/validation/common/odp_cunit_common.h

> b/test/validation/common/odp_cunit_common.h

> index 8dbbb9f..37e8e8c 100644

> --- a/test/validation/common/odp_cunit_common.h

> +++ b/test/validation/common/odp_cunit_common.h

> @@ -44,7 +44,7 @@ static inline void odp_cunit_test_missing(void) { }

>  /* A test case that is unconditionally inactive. Its name will be

> registered

>   * with CUnit but it won't be executed and will be reported as inactive in

>   * the result summary. */

> -#define ODP_TEST_INFO_INACTIVE(test_func) \

> +#define ODP_TEST_INFO_INACTIVE(test_func, args...) \

>         {#test_func, odp_cunit_test_missing, odp_cunit_test_inactive}

>

>  /* A test case that may be marked as inactive at runtime based on the

> --

> 2.1.4

>

>



-- 
Mike Holmes
Technical Manager - Linaro Networking Group
Linaro.org <http://www.linaro.org/> *│ *Open source software for ARM SoCs
diff mbox

Patch

diff --git a/test/validation/common/odp_cunit_common.h b/test/validation/common/odp_cunit_common.h
index 8dbbb9f..37e8e8c 100644
--- a/test/validation/common/odp_cunit_common.h
+++ b/test/validation/common/odp_cunit_common.h
@@ -44,7 +44,7 @@  static inline void odp_cunit_test_missing(void) { }
 /* A test case that is unconditionally inactive. Its name will be registered
  * with CUnit but it won't be executed and will be reported as inactive in
  * the result summary. */
-#define ODP_TEST_INFO_INACTIVE(test_func) \
+#define ODP_TEST_INFO_INACTIVE(test_func, args...) \
 	{#test_func, odp_cunit_test_missing, odp_cunit_test_inactive}
 
 /* A test case that may be marked as inactive at runtime based on the