diff mbox

validation: common: fix application exit status

Message ID 1417682082-17597-1-git-send-email-taras.kondratiuk@linaro.org
State Accepted
Commit dd8bdc1bea57f9a396b8df314af933f0986969fd
Headers show

Commit Message

Taras Kondratiuk Dec. 4, 2014, 8:34 a.m. UTC
An exit status of 77 from a test application will denote a skipped test
for automake. So if exactly 77 failed we'd get a wrong result. Just
return -1 if any failure detected.

Reported-by: Stuart Haslam <stuart.haslam@arm.com>
Signed-off-by: Taras Kondratiuk <taras.kondratiuk@linaro.org>
---

Automake test manual:
http://www.gnu.org/software/automake/manual/html_node/Scripts_002dbased-Testsuites.html
---
 test/validation/common/odp_cunit_common.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Taras Kondratiuk Dec. 17, 2014, 3:50 p.m. UTC | #1
Maxim, this patch is ready for merge.

On 12/08/2014 03:29 PM, Stuart Haslam wrote:
> On Thu, Dec 04, 2014 at 08:34:42AM +0000, Taras Kondratiuk wrote:
>> An exit status of 77 from a test application will denote a skipped test
>> for automake. So if exactly 77 failed we'd get a wrong result. Just
>> return -1 if any failure detected.
>>
>> Reported-by: Stuart Haslam <stuart.haslam@arm.com>
>> Signed-off-by: Taras Kondratiuk <taras.kondratiuk@linaro.org>
>
> Reviewed-by: Stuart Haslam <stuart.haslam@arm.com>
>
>> ---
>>
>> Automake test manual:
>> http://www.gnu.org/software/automake/manual/html_node/Scripts_002dbased-Testsuites.html
>> ---
>>   test/validation/common/odp_cunit_common.c |    2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/test/validation/common/odp_cunit_common.c b/test/validation/common/odp_cunit_common.c
>> index 14ba840..5ae457d 100644
>> --- a/test/validation/common/odp_cunit_common.c
>> +++ b/test/validation/common/odp_cunit_common.c
>> @@ -75,5 +75,5 @@ int main(void)
>>   	odp_term_local();
>>   	odp_term_global();
>>
>> -	return ret;
>> +	return (ret) ? -1 : 0;
>>   }
>> --
>> 1.7.9.5
>>
>>
>
Maxim Uvarov Dec. 17, 2014, 4:38 p.m. UTC | #2
Merged,
Maxim.

On 12/04/2014 11:34 AM, Taras Kondratiuk wrote:
> An exit status of 77 from a test application will denote a skipped test
> for automake. So if exactly 77 failed we'd get a wrong result. Just
> return -1 if any failure detected.
>
> Reported-by: Stuart Haslam <stuart.haslam@arm.com>
> Signed-off-by: Taras Kondratiuk <taras.kondratiuk@linaro.org>
> ---
>
> Automake test manual:
> http://www.gnu.org/software/automake/manual/html_node/Scripts_002dbased-Testsuites.html
> ---
>   test/validation/common/odp_cunit_common.c |    2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/test/validation/common/odp_cunit_common.c b/test/validation/common/odp_cunit_common.c
> index 14ba840..5ae457d 100644
> --- a/test/validation/common/odp_cunit_common.c
> +++ b/test/validation/common/odp_cunit_common.c
> @@ -75,5 +75,5 @@ int main(void)
>   	odp_term_local();
>   	odp_term_global();
>   
> -	return ret;
> +	return (ret) ? -1 : 0;
>   }
diff mbox

Patch

diff --git a/test/validation/common/odp_cunit_common.c b/test/validation/common/odp_cunit_common.c
index 14ba840..5ae457d 100644
--- a/test/validation/common/odp_cunit_common.c
+++ b/test/validation/common/odp_cunit_common.c
@@ -75,5 +75,5 @@  int main(void)
 	odp_term_local();
 	odp_term_global();
 
-	return ret;
+	return (ret) ? -1 : 0;
 }