Thanks. This stands merged.

Regards--
Subrata

On Tue, 2008-09-09 at 10:55 +0800, Li Zefan wrote:
> Don't warn that TCID, TST_TOTAL and TST_COUNT is not set when using
> tst_kvercmp.
> 
> Signed-off-by: Li Zefan <[EMAIL PROTECTED]>
> ---
>  ltpapicmd   |binary
>  ltpapicmd.c |   14 +++++++++-----
>  2 files changed, 9 insertions(+), 5 deletions(-)
> 
> diff -Nurp ltp-full-20080731.orig/tools/apicmds/ltpapicmd.c 
> ltp-full-20080731/tools/apicmds/ltpapicmd.c
> --- ltp-full-20080731.orig/tools/apicmds/ltpapicmd.c  2008-05-13 
> 18:44:10.000000000 +0800
> +++ ltp-full-20080731/tools/apicmds/ltpapicmd.c       2008-09-09 
> 10:50:39.000000000 +0800
> @@ -166,14 +166,19 @@ int main( int argc,
>      arg_fmt = malloc(1024);
>      cmd_name = malloc(1024);
> 
> +    strcpy(cmd_name, (char *)basename(argv++[0]));
> +
>      if (((TCID = getenv("TCID")) == NULL) || 
>              ((tst_total = getenv("TST_TOTAL")) == NULL) || 
>              ((tst_count = getenv("TST_COUNT")) == NULL))
>      {
> -        fprintf(stderr, "\nSet variables TCID, TST_TOTAL, and TST_COUNT 
> before each test:\n"
> -                "export TCID=<test name>\n"
> -                "export TST_TOTAL=<Total Number of Tests >\n"
> -                "export TST_COUNT=<Test case number>\n\n");
> +        if (strcmp(cmd_name, "tst_kvercmp") != 0)
> +        {
> +            fprintf(stderr, "\nSet variables TCID, TST_TOTAL, and TST_COUNT 
> before each test:\n"
> +                    "export TCID=<test name>\n"
> +                    "export TST_TOTAL=<Total Number of Tests >\n"
> +                    "export TST_COUNT=<Test case number>\n\n");
> +        }
>      }
>      else
>      {
> @@ -194,7 +199,6 @@ int main( int argc,
>          }
>      }
> 
> -    strcpy(cmd_name, (char *)basename(argv++[0]));
> 
>      if (strcmp((char *)cmd_name, "tst_brk") == 0)
>      {


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to