From: Paul Larson <paul.larson@canonical.com>
To: LTP Mailing List <ltp-list@lists.sourceforge.net>
Subject: [LTP] Add option to skip tests
Date: Wed, 12 Aug 2009 16:50:17 -0500 [thread overview]
Message-ID: <4A833919.9040603@canonical.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1132 bytes --]
One problem that LTP has long suffered is that certain tests are known
to be broken, sometimes for long periods of time. In an ideal world, I
think it best that these should be skipped, or at least removed from the
default list of tests to run, but this isn't always practical due to a
number of reasons. Of course, another option is that a 'whitelist' of
tests to run can be created and passed to runltp, but this becomes hard
to maintain as there are often new tests that you may want to keep up
with, and with each release of LTP, the list would have to be reexamined.
So I wanted to see what people thought about a simple option, -S, to
specify a list of tests that you want to blacklist from the current run.
This is handy if you have an automated testing environment with an
architecture that doesn't always get great attention and a list of tests
that you know to be broken on that arch.
The skipfile is simply a list of test names, one per line.
Thanks,
Paul Larson
---
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.patch --]
[-- Type: text/x-patch, Size: 1651 bytes --]
diff --git a/runltp b/runltp
index c26f4ab..746a1ec 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,8 @@ main()
r) LTPROOT=$OPTARG;;
s) TAG_RESTRICT_STRING=$OPTARG;;
+
+ S) SKIPFILE=$OPTARG;;
t) # In case you want to specify the time
# to run from the command line
@@ -630,6 +633,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 reply other threads:[~2009-08-12 21:50 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-12 21:50 Paul Larson [this message]
2009-08-13 17:17 ` [LTP] Add option to skip tests Subrata Modak
2009-08-13 17:54 ` Paul Larson
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=4A833919.9040603@canonical.com \
--to=paul.larson@canonical.com \
--cc=ltp-list@lists.sourceforge.net \
/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