aboutsummaryrefslogtreecommitdiff
path: root/runltp
diff options
context:
space:
mode:
authorNaresh Kamboju <naresh.kamboju@linaro.org>2017-12-20 18:33:57 +0530
committerCyril Hrubis <chrubis@suse.cz>2017-12-20 15:02:18 +0100
commitfe857cbcd8246bf1ec63c749f04f4eba75856b01 (patch)
tree5a31a80b6d3aa473fa71c2c39ed020ef8564b3cd /runltp
parentd6aff87ba6103201b54059056d57019837050384 (diff)
runltp: skipfile: skipped test cases should be visible as TCONF in results
When we skip tests in LTP by using "./runltp -S SKIPFILE", they get removed from the test list completely, leaving no trace in the results. This patch will add SKIPFILE listed test cases names to results as TCONF. when testcase_name listed in SKIPFILE the main alltests will get that testcase_name followed by exit 32; Example: SKIPFILE the user defined content $ cat SKIPFILE testcase_name $ ./runltp -f syscalls -S SKIPFILE The runtime generated alltests file gets as $ cat alltests testcase_name exit 32; The final results file shows as $ cat results testcase_name TCONF The good practise with SKIPFILE is, tests listed in a SKIPFILE should be a single testcase_name per line. However, test script takes only first column by using awk {print $1} We can add comments inside SKIPFILE starting with # The script will ignore line starting with # Signed-off-by: Naresh Kamboju <naresh.kamboju@linaro.org> Acked-by: Cyril Hrubis <chrubis@suse.cz>
Diffstat (limited to 'runltp')
-rwxr-xr-xrunltp8
1 files changed, 4 insertions, 4 deletions
diff --git a/runltp b/runltp
index 8e40d6742..302c4a728 100755
--- a/runltp
+++ b/runltp
@@ -692,10 +692,10 @@ main()
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[ \t]/d" ${TMP}/alltests
+ if [ -n "${SKIPFILE}" ]; then
+ for test_name in $(awk '{print $1}' "${SKIPFILE}"); do
+ case "${test_name}" in \#*) continue;; esac
+ sed -i "/\<${test_name}\>/c\\${test_name} exit 32;" alltests
done
fi