public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Subrata Modak <subrata@linux.vnet.ibm.com>
To: Paul Larson <paul.larson@canonical.com>
Cc: LTP Mailing List <ltp-list@lists.sourceforge.net>
Subject: Re: [LTP] Add option to skip tests
Date: Fri, 14 Aug 2009 22:54:22 +0530	[thread overview]
Message-ID: <1250270663.5958.6.camel@subratamodak.linux.ibm.com> (raw)
In-Reply-To: <4A845364.6070308@canonical.com>

Wow !! Thatś great and it works fine now.

On Thu, 2009-08-13 at 12:54 -0500, Paul Larson wrote:
> You were not providing the full path.  Here's a new version that
> should
> let you either provide absolute or relative path (including no patch
> assuming the file is in LTPROOT).  See if this works better for you.
> 
> 
> Add a -S option to runltp that allows the user to specify a SKIPFILE
> of
> tests to skip.
> 
> Signed-off-by: Paul Larson <paul.larson@canonical.com>
> ---
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> differences
> between files
> attachment
> (runltp-skipfile-2.patch)
> 
> 
> diff --git a/runltp b/runltp
> index c26f4ab..15da5ab 100755
> --- a/runltp
> +++ b/runltp
> @@ -141,6 +141,7 @@ usage()
>      -q              Print less verbose output to screen.
>      -r LTPROOT      Fully qualified path where testsuite is
> installed.
>      -s PATTERN      Only run test cases which match PATTERN.
> +    -S SKIPFILE     Skip tests specified in SKIPFILE
>      -t DURATION     Execute the testsuite for given duration.
> Examples:
>                        -t 60s = 60 seconds
>                        -t 45m = 45 minutes
> @@ -193,7 +194,7 @@ main()
>      local DEFAULT_FILE_NAME_GENERATION_TIME=`date +"%Y_%b_%d-%Hh_%Mm_
> %Ss"`
>      version_date=`head -n 1 $LTPROOT/ChangeLog`
> 
> -    while getopts a:c:C:d:D:f:ehi:g:l:m:Nno:pqr:s:t:T:vw:x:b:B: arg
> +    while getopts a:c:C:d:D:f:ehi:g:l:m:Nno:pqr:s:S:t:T:vw:x:b:B: arg
>      do  case $arg in
>          a)  EMAIL_TO=$OPTARG
>              ALT_EMAIL_OUT=1;;
> @@ -353,6 +354,12 @@ main()
>          r)  LTPROOT=$OPTARG;;
>      
>          s)  TAG_RESTRICT_STRING=$OPTARG;;
> +
> +       S)  case $OPTARG in
> +            /*)
> +                SKIPFILE=$OPTARG;;
> +            *)
> +                SKIPFILE="$LTPROOT/$OPTARG";;

We just needed an:
+ esac ;;
here.

Anyways this option will be used in LTP from now onwards.

Regards--
Subrata

>      
>          t)  # In case you want to specify the time 
>              # to run from the command line 
> @@ -630,6 +637,14 @@ main()
>          mv -f ${TMP}/alltests ${TMP}/alltests.orig
>             grep $TAG_RESTRICT_STRING ${TMP}/alltests.orig >
> ${TMP}/alltests #Not worth checking return codes for this case
>      fi
> +
> +    # Blacklist or skip tests if a SKIPFILE was specified with -S
> +    if [ -n "$SKIPFILE" ]
> +    then
> +        for file in $( cat $SKIPFILE ); do
> +            sed -i "/$file/d" ${TMP}/alltests
> +        done
> +    fi
>      
>      # check for required users and groups
>      ${LTPROOT}/IDcheck.sh &>/dev/null || \
> 


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

      parent reply	other threads:[~2009-08-14 17:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-12 21:50 [LTP] Add option to skip tests Paul Larson
2009-08-13 17:17 ` Subrata Modak
2009-08-13 17:54   ` Paul Larson
2009-08-13 22:40     ` Garrett Cooper
2009-08-14 17:24     ` Subrata Modak [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1250270663.5958.6.camel@subratamodak.linux.ibm.com \
    --to=subrata@linux.vnet.ibm.com \
    --cc=ltp-list@lists.sourceforge.net \
    --cc=paul.larson@canonical.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox