diff options
author | Theodore Ts'o <tytso@mit.edu> | 2024-02-09 01:27:52 -0500 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2024-04-11 18:01:23 -0400 |
commit | fda9d3c3d440d7761be0b7e1a10a3cda6f72803f (patch) | |
tree | 29e66c4faa63a604d414818bf7ecd6aa28c13265 /test-appliance | |
parent | ff934652c6f773015db396c9720d85751be763f3 (diff) | |
download | xfstests-bld-fda9d3c3d440d7761be0b7e1a10a3cda6f72803f.tar.gz |
test-appliance: add initial support for optionally building ltp
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'test-appliance')
-rwxr-xr-x | test-appliance/files/root/runltptests.sh | 88 |
1 files changed, 88 insertions, 0 deletions
diff --git a/test-appliance/files/root/runltptests.sh b/test-appliance/files/root/runltptests.sh new file mode 100755 index 00000000..e107b491 --- /dev/null +++ b/test-appliance/files/root/runltptests.sh @@ -0,0 +1,88 @@ +#!/bin/bash + +API_MAJOR=1 +API_MINOR=5 +. /root/test-config +. /root/runtests_utils + +RESULTS=/results +RUNSTATS="$RESULTS/run-stats" + +runtests_setup + +if test -n "$FSTESTOPT" ; then + set $FSTESTOPT +else + set "" +fi + +RPT_COUNT=1 + +while [ "$1" != "" ]; do + case "$1" in + aex) + DO_AEX=t + ;; + ltptests) + ;; + count) shift + RPT_COUNT=$1 + ;; + extra_opt) shift + EXTRA_OPT="$EXTRA_OPT $1" + ;; + *) + echo " " + echo "Unrecognized option $1" + echo " " + esac + shift +done + +if test ! -f /.dockerenv ; then + dmesg -n 5 +fi +cd /root/ltp + +if test -n "$FSTESTEXC" ; then + echo $FSTESTEXC | tr , \\n > /tmp/exclude-tests +else + rm -f /tmp/exclude-tests +fi +if test -n "$DO_AEX" ; then + if test -f "/root/ltptests.exclude" ; then + sed -e 's/#.*//' -e 's/[ \t]*$//' -e '/^$/d' \ + < "/root/ltptests.exclude" >> /tmp/exclude-tests + fi +fi + +if test -f /tmp/exclude-tests ; then + EXCLUDE=$(tr "\\n" " " < /tmp/exclude-tests) + echo "EXCLUDE=( $EXCLUDE )" >> /root/ltp/config +fi +cp /root/ltp/config /results + +touch "$RESULTS/fstest-completed" + +runtests_before_tests + +mkdir -p /results/ltp /root/ltp/results +set -vx +mount --bind /results/ltp /root/ltp/results + +cp config "$RESULTS/config" +echo -n "BEGIN LTP " ; date +logger "BEGIN LTP" + +./runltp + +free -m + +echo -n "END LTP " ; date +logger "END TEST $i: $TESTNAME " + +umount /root/ltp/results + +runtests_after_tests + +runtests_save_results_tar |