I could see dropping __FILE__  but because these are tests, surely knowing
what produced the output is valuable.

Doing the override at all is a test we need to add :)

On 22 December 2014 at 12:18, Maxim Uvarov <[email protected]> wrote:

> Current test output is too long and even prints data from empty prints:
> odp_buffer_pool.c:91:odp_buffer_pool_init_global():  pool_entry_s size
>  256
> odp_buffer_pool.c:92:odp_buffer_pool_init_global():  pool_entry_t size
>  256
> odp_buffer_pool.c:93:odp_buffer_pool_init_global():  odp_buffer_hdr_t size
> 112
> odp_buffer_pool.c:94:odp_buffer_pool_init_global():
>
> Remove file and function names prefixes for validation tests.
>
> Signed-off-by: Maxim Uvarov <[email protected]>
> ---
>  test/validation/common/odp_cunit_common.c | 22 ++++++++++++++++++++++
>  1 file changed, 22 insertions(+)
>
> diff --git a/test/validation/common/odp_cunit_common.c
> b/test/validation/common/odp_cunit_common.c
> index 2fab033..cefeaf0 100644
> --- a/test/validation/common/odp_cunit_common.c
> +++ b/test/validation/common/odp_cunit_common.c
> @@ -14,6 +14,9 @@
>  #include <odp.h>
>  #include <odp_cunit_common.h>
>  #include <odph_linux.h>
> +#include <stdarg.h>
> +#include <string.h>
> +
>  /* Globals */
>  static odph_linux_pthread_t thread_tbl[MAX_WORKERS];
>
> @@ -41,6 +44,25 @@ __attribute__((__weak__)) int tests_global_init(void)
>         return 0;
>  }
>
> +int odp_override_log(odp_log_level_e level __attribute__((__unused__)),
> +                                    const char *fmt, ...)
> +{
> +       va_list args;
> +       int r;
> +
> +       va_start(args, fmt);
> +
> +       /* Skip __FILE__, __LINE__, __func__ output */
> +       va_arg(args, char *);
> +       va_arg(args, int);
> +       va_arg(args, char *);
> +
> +       r = vfprintf(stderr, " ", args);
> +       va_end(args);
> +
> +       return r;
> +}
> +
>  int main(void)
>  {
>         int ret;
> --
> 1.8.5.1.163.gd7aced9
>
>
> _______________________________________________
> lng-odp mailing list
> [email protected]
> http://lists.linaro.org/mailman/listinfo/lng-odp
>



-- 
*Mike Holmes*
Linaro  Sr Technical Manager
LNG - ODP
_______________________________________________
lng-odp mailing list
[email protected]
http://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to