diff mbox

clean up doxygen warnings and remove warn prints for examples

Message ID 1397731873-10949-1-git-send-email-maxim.uvarov@linaro.org
State Accepted
Headers show

Commit Message

Maxim Uvarov April 17, 2014, 10:51 a.m. UTC
There is no need to print doxygen warnings for examples or tests.
Do not print them.

Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
---
 platform/linux-generic/Makefile | 4 +++-
 test/api_test/odp_common.h      | 5 +++--
 test/api_test/odp_ring_test.c   | 2 +-
 test/api_test/odp_shm_test.h    | 1 +
 test/api_test/odp_timer_ping.c  | 3 ++-
 5 files changed, 10 insertions(+), 5 deletions(-)

Comments

Anders Roxell April 17, 2014, 1 p.m. UTC | #1
On 2014-04-17 14:51, Maxim Uvarov wrote:
> There is no need to print doxygen warnings for examples or tests.
> Do not print them.
> 
> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
> ---
>  platform/linux-generic/Makefile | 4 +++-
>  test/api_test/odp_common.h      | 5 +++--
>  test/api_test/odp_ring_test.c   | 2 +-
>  test/api_test/odp_shm_test.h    | 1 +
>  test/api_test/odp_timer_ping.c  | 3 ++-
>  5 files changed, 10 insertions(+), 5 deletions(-)
> 
> diff --git a/platform/linux-generic/Makefile b/platform/linux-generic/Makefile
> index 15e2a2c..dda9fc1 100644
> --- a/platform/linux-generic/Makefile
> +++ b/platform/linux-generic/Makefile
> @@ -114,7 +114,9 @@ Doxyfile: Doxyfile.in
>  
>  .PHONY: docs
>  docs: $(DOC_DIR) Doxyfile ./include/odp*.h
> -	doxygen
> +	@echo -n "Generating Doxygen documentation... " 
> +	@doxygen 2>&1 |grep -v -e '/test/.*warning:' || true
> +	@echo "DONE."

No, don't like this.
I think we should see the warnings in the test directory, like a
nail in the eye... Maybe someone eventually will fix the warnings. =)

Cheers,
Anders

>  
>  .PHONY: docs_install
>  docs_install: docs
> diff --git a/test/api_test/odp_common.h b/test/api_test/odp_common.h
> index f5183e1..370a9ec 100644
> --- a/test/api_test/odp_common.h
> +++ b/test/api_test/odp_common.h
> @@ -24,9 +24,10 @@ typedef enum {
>  	ODP_MAX_TEST
>  } odp_test_case_e;
>  
> +/** private */
>  typedef struct {
> -	int testcase; /* specifies which set of API's to exercise */
> -	int numthrds; /* no of pthreads to create */
> +	int testcase; /**< specifies which set of API's to exercise */
> +	int numthrds; /**< no of pthreads to create */
>  } pthrd_arg;
>  
>  extern void odp_print_system_info(void);
> diff --git a/test/api_test/odp_ring_test.c b/test/api_test/odp_ring_test.c
> index 6c2642e..ba2d57c 100644
> --- a/test/api_test/odp_ring_test.c
> +++ b/test/api_test/odp_ring_test.c
> @@ -346,7 +346,7 @@ static void test_ring_stress(stress_type_t type)
>  	}
>  }
>  
> -/* local struct for ring_thread argument */
> +/** @private local struct for ring_thread argument */
>  typedef struct {
>  	pthrd_arg thrdarg;
>  	int stress_type;
> diff --git a/test/api_test/odp_shm_test.h b/test/api_test/odp_shm_test.h
> index 3b3f49b..7b504f2 100644
> --- a/test/api_test/odp_shm_test.h
> +++ b/test/api_test/odp_shm_test.h
> @@ -13,6 +13,7 @@
>  #ifndef ODP_SHM_TEST_H
>  #define ODP_SHM_TEST_H
>  
> +/** @private */
>  typedef struct {
>  	int foo;
>  	int bar;
> diff --git a/test/api_test/odp_timer_ping.c b/test/api_test/odp_timer_ping.c
> index 8b297d8..63ef619 100644
> --- a/test/api_test/odp_timer_ping.c
> +++ b/test/api_test/odp_timer_ping.c
> @@ -44,6 +44,7 @@ static odp_timer_t test_timer_ping;
>  static odp_timer_tmo_t test_ping_tmo;
>  
>  #define PKTSIZE      64
> +/** @private packet struct */
>  struct packet {
>  	struct icmphdr hdr;
>  	char msg[PKTSIZE-sizeof(struct icmphdr)];
> @@ -54,7 +55,7 @@ struct protoent *proto;
>  
>  struct sockaddr_in dst_addr;
>  
> -/* local struct for ping_timer_thread argument */
> +/** local struct for ping_timer_thread argument */
>  typedef struct {
>  	pthrd_arg thrdarg;
>  	int result;
> -- 
> 1.8.5.1.163.gd7aced9
> 
> 
> _______________________________________________
> lng-odp mailing list
> lng-odp@lists.linaro.org
> http://lists.linaro.org/mailman/listinfo/lng-odp
Maxim Uvarov April 17, 2014, 3:06 p.m. UTC | #2
On 04/17/2014 05:00 PM, Anders Roxell wrote:
> On 2014-04-17 14:51, Maxim Uvarov wrote:
>> There is no need to print doxygen warnings for examples or tests.
>> Do not print them.
>>
>> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
>> ---
>>   platform/linux-generic/Makefile | 4 +++-
>>   test/api_test/odp_common.h      | 5 +++--
>>   test/api_test/odp_ring_test.c   | 2 +-
>>   test/api_test/odp_shm_test.h    | 1 +
>>   test/api_test/odp_timer_ping.c  | 3 ++-
>>   5 files changed, 10 insertions(+), 5 deletions(-)
>>
>> diff --git a/platform/linux-generic/Makefile b/platform/linux-generic/Makefile
>> index 15e2a2c..dda9fc1 100644
>> --- a/platform/linux-generic/Makefile
>> +++ b/platform/linux-generic/Makefile
>> @@ -114,7 +114,9 @@ Doxyfile: Doxyfile.in
>>   
>>   .PHONY: docs
>>   docs: $(DOC_DIR) Doxyfile ./include/odp*.h
>> -	doxygen
>> +	@echo -n "Generating Doxygen documentation... "
>> +	@doxygen 2>&1 |grep -v -e '/test/.*warning:' || true
>> +	@echo "DONE."
> No, don't like this.
> I think we should see the warnings in the test directory, like a
> nail in the eye... Maybe someone eventually will fix the warnings. =)
>
> Cheers,
> Anders
In case if someone needs it I can redirect output to file and write that 
there are N not critical warnings.
How do you think will it work?

Maxim.

>
>>   
>>   .PHONY: docs_install
>>   docs_install: docs
>> diff --git a/test/api_test/odp_common.h b/test/api_test/odp_common.h
>> index f5183e1..370a9ec 100644
>> --- a/test/api_test/odp_common.h
>> +++ b/test/api_test/odp_common.h
>> @@ -24,9 +24,10 @@ typedef enum {
>>   	ODP_MAX_TEST
>>   } odp_test_case_e;
>>   
>> +/** private */
>>   typedef struct {
>> -	int testcase; /* specifies which set of API's to exercise */
>> -	int numthrds; /* no of pthreads to create */
>> +	int testcase; /**< specifies which set of API's to exercise */
>> +	int numthrds; /**< no of pthreads to create */
>>   } pthrd_arg;
>>   
>>   extern void odp_print_system_info(void);
>> diff --git a/test/api_test/odp_ring_test.c b/test/api_test/odp_ring_test.c
>> index 6c2642e..ba2d57c 100644
>> --- a/test/api_test/odp_ring_test.c
>> +++ b/test/api_test/odp_ring_test.c
>> @@ -346,7 +346,7 @@ static void test_ring_stress(stress_type_t type)
>>   	}
>>   }
>>   
>> -/* local struct for ring_thread argument */
>> +/** @private local struct for ring_thread argument */
>>   typedef struct {
>>   	pthrd_arg thrdarg;
>>   	int stress_type;
>> diff --git a/test/api_test/odp_shm_test.h b/test/api_test/odp_shm_test.h
>> index 3b3f49b..7b504f2 100644
>> --- a/test/api_test/odp_shm_test.h
>> +++ b/test/api_test/odp_shm_test.h
>> @@ -13,6 +13,7 @@
>>   #ifndef ODP_SHM_TEST_H
>>   #define ODP_SHM_TEST_H
>>   
>> +/** @private */
>>   typedef struct {
>>   	int foo;
>>   	int bar;
>> diff --git a/test/api_test/odp_timer_ping.c b/test/api_test/odp_timer_ping.c
>> index 8b297d8..63ef619 100644
>> --- a/test/api_test/odp_timer_ping.c
>> +++ b/test/api_test/odp_timer_ping.c
>> @@ -44,6 +44,7 @@ static odp_timer_t test_timer_ping;
>>   static odp_timer_tmo_t test_ping_tmo;
>>   
>>   #define PKTSIZE      64
>> +/** @private packet struct */
>>   struct packet {
>>   	struct icmphdr hdr;
>>   	char msg[PKTSIZE-sizeof(struct icmphdr)];
>> @@ -54,7 +55,7 @@ struct protoent *proto;
>>   
>>   struct sockaddr_in dst_addr;
>>   
>> -/* local struct for ping_timer_thread argument */
>> +/** local struct for ping_timer_thread argument */
>>   typedef struct {
>>   	pthrd_arg thrdarg;
>>   	int result;
>> -- 
>> 1.8.5.1.163.gd7aced9
>>
>>
>> _______________________________________________
>> lng-odp mailing list
>> lng-odp@lists.linaro.org
>> http://lists.linaro.org/mailman/listinfo/lng-odp
Mike Holmes April 17, 2014, 5:07 p.m. UTC | #3
We do need to warn on on examples, they end up in the API_DOC, examples
that are run regularly are the very best form of documentation in my
opinion.

I think we need to move examples to a new dir so that we have /test with no
doxygen at all,  and /examples which do.

I could see tests migrating to examples if they really show how something
works and at that time they are "doxified" to quote Bill :)


On 17 April 2014 11:06, Maxim Uvarov <maxim.uvarov@linaro.org> wrote:

> On 04/17/2014 05:00 PM, Anders Roxell wrote:
>
>> On 2014-04-17 14:51, Maxim Uvarov wrote:
>>
>>> There is no need to print doxygen warnings for examples or tests.
>>> Do not print them.
>>>
>>> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
>>> ---
>>>   platform/linux-generic/Makefile | 4 +++-
>>>   test/api_test/odp_common.h      | 5 +++--
>>>   test/api_test/odp_ring_test.c   | 2 +-
>>>   test/api_test/odp_shm_test.h    | 1 +
>>>   test/api_test/odp_timer_ping.c  | 3 ++-
>>>   5 files changed, 10 insertions(+), 5 deletions(-)
>>>
>>> diff --git a/platform/linux-generic/Makefile b/platform/linux-generic/
>>> Makefile
>>> index 15e2a2c..dda9fc1 100644
>>> --- a/platform/linux-generic/Makefile
>>> +++ b/platform/linux-generic/Makefile
>>> @@ -114,7 +114,9 @@ Doxyfile: Doxyfile.in
>>>     .PHONY: docs
>>>   docs: $(DOC_DIR) Doxyfile ./include/odp*.h
>>> -       doxygen
>>> +       @echo -n "Generating Doxygen documentation... "
>>> +       @doxygen 2>&1 |grep -v -e '/test/.*warning:' || true
>>> +       @echo "DONE."
>>>
>> No, don't like this.
>> I think we should see the warnings in the test directory, like a
>> nail in the eye... Maybe someone eventually will fix the warnings. =)
>>
>> Cheers,
>> Anders
>>
> In case if someone needs it I can redirect output to file and write that
> there are N not critical warnings.
> How do you think will it work?
>
> Maxim.
>
>
>
>>      .PHONY: docs_install
>>>   docs_install: docs
>>> diff --git a/test/api_test/odp_common.h b/test/api_test/odp_common.h
>>> index f5183e1..370a9ec 100644
>>> --- a/test/api_test/odp_common.h
>>> +++ b/test/api_test/odp_common.h
>>> @@ -24,9 +24,10 @@ typedef enum {
>>>         ODP_MAX_TEST
>>>   } odp_test_case_e;
>>>   +/** private */
>>>   typedef struct {
>>> -       int testcase; /* specifies which set of API's to exercise */
>>> -       int numthrds; /* no of pthreads to create */
>>> +       int testcase; /**< specifies which set of API's to exercise */
>>> +       int numthrds; /**< no of pthreads to create */
>>>   } pthrd_arg;
>>>     extern void odp_print_system_info(void);
>>> diff --git a/test/api_test/odp_ring_test.c
>>> b/test/api_test/odp_ring_test.c
>>> index 6c2642e..ba2d57c 100644
>>> --- a/test/api_test/odp_ring_test.c
>>> +++ b/test/api_test/odp_ring_test.c
>>> @@ -346,7 +346,7 @@ static void test_ring_stress(stress_type_t type)
>>>         }
>>>   }
>>>   -/* local struct for ring_thread argument */
>>> +/** @private local struct for ring_thread argument */
>>>   typedef struct {
>>>         pthrd_arg thrdarg;
>>>         int stress_type;
>>> diff --git a/test/api_test/odp_shm_test.h b/test/api_test/odp_shm_test.h
>>> index 3b3f49b..7b504f2 100644
>>> --- a/test/api_test/odp_shm_test.h
>>> +++ b/test/api_test/odp_shm_test.h
>>> @@ -13,6 +13,7 @@
>>>   #ifndef ODP_SHM_TEST_H
>>>   #define ODP_SHM_TEST_H
>>>   +/** @private */
>>>   typedef struct {
>>>         int foo;
>>>         int bar;
>>> diff --git a/test/api_test/odp_timer_ping.c b/test/api_test/odp_timer_
>>> ping.c
>>> index 8b297d8..63ef619 100644
>>> --- a/test/api_test/odp_timer_ping.c
>>> +++ b/test/api_test/odp_timer_ping.c
>>> @@ -44,6 +44,7 @@ static odp_timer_t test_timer_ping;
>>>   static odp_timer_tmo_t test_ping_tmo;
>>>     #define PKTSIZE      64
>>> +/** @private packet struct */
>>>   struct packet {
>>>         struct icmphdr hdr;
>>>         char msg[PKTSIZE-sizeof(struct icmphdr)];
>>> @@ -54,7 +55,7 @@ struct protoent *proto;
>>>     struct sockaddr_in dst_addr;
>>>   -/* local struct for ping_timer_thread argument */
>>> +/** local struct for ping_timer_thread argument */
>>>   typedef struct {
>>>         pthrd_arg thrdarg;
>>>         int result;
>>> --
>>> 1.8.5.1.163.gd7aced9
>>>
>>>
>>> _______________________________________________
>>> lng-odp mailing list
>>> lng-odp@lists.linaro.org
>>> http://lists.linaro.org/mailman/listinfo/lng-odp
>>>
>>
>
> _______________________________________________
> lng-odp mailing list
> lng-odp@lists.linaro.org
> http://lists.linaro.org/mailman/listinfo/lng-odp
>
diff mbox

Patch

diff --git a/platform/linux-generic/Makefile b/platform/linux-generic/Makefile
index 15e2a2c..dda9fc1 100644
--- a/platform/linux-generic/Makefile
+++ b/platform/linux-generic/Makefile
@@ -114,7 +114,9 @@  Doxyfile: Doxyfile.in
 
 .PHONY: docs
 docs: $(DOC_DIR) Doxyfile ./include/odp*.h
-	doxygen
+	@echo -n "Generating Doxygen documentation... " 
+	@doxygen 2>&1 |grep -v -e '/test/.*warning:' || true
+	@echo "DONE."
 
 .PHONY: docs_install
 docs_install: docs
diff --git a/test/api_test/odp_common.h b/test/api_test/odp_common.h
index f5183e1..370a9ec 100644
--- a/test/api_test/odp_common.h
+++ b/test/api_test/odp_common.h
@@ -24,9 +24,10 @@  typedef enum {
 	ODP_MAX_TEST
 } odp_test_case_e;
 
+/** private */
 typedef struct {
-	int testcase; /* specifies which set of API's to exercise */
-	int numthrds; /* no of pthreads to create */
+	int testcase; /**< specifies which set of API's to exercise */
+	int numthrds; /**< no of pthreads to create */
 } pthrd_arg;
 
 extern void odp_print_system_info(void);
diff --git a/test/api_test/odp_ring_test.c b/test/api_test/odp_ring_test.c
index 6c2642e..ba2d57c 100644
--- a/test/api_test/odp_ring_test.c
+++ b/test/api_test/odp_ring_test.c
@@ -346,7 +346,7 @@  static void test_ring_stress(stress_type_t type)
 	}
 }
 
-/* local struct for ring_thread argument */
+/** @private local struct for ring_thread argument */
 typedef struct {
 	pthrd_arg thrdarg;
 	int stress_type;
diff --git a/test/api_test/odp_shm_test.h b/test/api_test/odp_shm_test.h
index 3b3f49b..7b504f2 100644
--- a/test/api_test/odp_shm_test.h
+++ b/test/api_test/odp_shm_test.h
@@ -13,6 +13,7 @@ 
 #ifndef ODP_SHM_TEST_H
 #define ODP_SHM_TEST_H
 
+/** @private */
 typedef struct {
 	int foo;
 	int bar;
diff --git a/test/api_test/odp_timer_ping.c b/test/api_test/odp_timer_ping.c
index 8b297d8..63ef619 100644
--- a/test/api_test/odp_timer_ping.c
+++ b/test/api_test/odp_timer_ping.c
@@ -44,6 +44,7 @@  static odp_timer_t test_timer_ping;
 static odp_timer_tmo_t test_ping_tmo;
 
 #define PKTSIZE      64
+/** @private packet struct */
 struct packet {
 	struct icmphdr hdr;
 	char msg[PKTSIZE-sizeof(struct icmphdr)];
@@ -54,7 +55,7 @@  struct protoent *proto;
 
 struct sockaddr_in dst_addr;
 
-/* local struct for ping_timer_thread argument */
+/** local struct for ping_timer_thread argument */
 typedef struct {
 	pthrd_arg thrdarg;
 	int result;