From: Paul Larson <paul.larson@canonical.com>
To: subrata@linux.vnet.ibm.com
Cc: LTP Mailing List <ltp-list@lists.sourceforge.net>
Subject: Re: [LTP] Add option to skip tests
Date: Thu, 13 Aug 2009 12:54:44 -0500 [thread overview]
Message-ID: <4A845364.6070308@canonical.com> (raw)
In-Reply-To: <1250183880.6656.21.camel@subratamodak.linux.ibm.com>
[-- Attachment #1: Type: text/plain, Size: 359 bytes --]
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>
---
[-- Attachment #2: runltp-skipfile-2.patch --]
[-- Type: text/x-patch, Size: 1765 bytes --]
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";;
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 || \
[-- Attachment #3: Type: text/plain, Size: 355 bytes --]
------------------------------------------------------------------------------
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
[-- Attachment #4: Type: text/plain, Size: 155 bytes --]
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
next prev parent reply other threads:[~2009-08-13 17:54 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 [this message]
2009-08-13 22:40 ` Garrett Cooper
2009-08-14 17:24 ` Subrata Modak
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=4A845364.6070308@canonical.com \
--to=paul.larson@canonical.com \
--cc=ltp-list@lists.sourceforge.net \
--cc=subrata@linux.vnet.ibm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.