diff options
author | Theodore Ts'o <tytso@mit.edu> | 2022-11-22 16:46:23 -0500 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2022-11-22 16:46:23 -0500 |
commit | f0214737d7895ae6b66fa7e1ae37b4152de8b0c8 (patch) | |
tree | 4403399888b2052f54be503064d11763e422ccb2 | |
parent | 966edd60181009d68e6a0e29fae72d4715657616 (diff) | |
download | xfstests-bld-f0214737d7895ae6b66fa7e1ae37b4152de8b0c8.tar.gz |
kvm-xfstests: add support for the --testrunid command-line option
Being able to specify the testrunid makes it easier to create
regression tests.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
-rwxr-xr-x | run-fstests/kvm-xfstests | 10 | ||||
-rw-r--r-- | run-fstests/util/parse_cli | 3 |
2 files changed, 8 insertions, 5 deletions
diff --git a/run-fstests/kvm-xfstests b/run-fstests/kvm-xfstests index 8fe3fbab..3830bc2d 100755 --- a/run-fstests/kvm-xfstests +++ b/run-fstests/kvm-xfstests @@ -85,13 +85,15 @@ fi EXTRA_ARG=$(echo "$EXTRA_ARG" | sed -e 's/:/ /') -DATE=$(date +%Y%m%d%H%M) +if test -z "$TESTRUNID" ; then + TESTRUNID=$(date +%Y%m%d%H%M) +fi if test -n "$SKIP_LOG" ; then - LOGFILE=/tmp/log.$DATE + LOGFILE=/tmp/log.$TESTRUNID else mkdir -p "$DIR/logs" - LOGFILE="$DIR/logs/log.$DATE" - RESULTFILE="$DIR/logs/results-$DATE.tar.xz" + LOGFILE="$DIR/logs/log.$TESTRUNID" + RESULTFILE="$DIR/logs/results-$TESTRUNID.tar.xz" fi if test -n "$INITRD" ; then diff --git a/run-fstests/util/parse_cli b/run-fstests/util/parse_cli index 4436a4d5..02f326e8 100644 --- a/run-fstests/util/parse_cli +++ b/run-fstests/util/parse_cli @@ -6,6 +6,7 @@ DO_AEX="yes" API="1.5" ORIG_CMDLINE="$*" ORIG_CMDLINE_B64=$(echo -n "$ORIG_CMDLINE" | sed -e "s/^ //" | base64 -w 0) +TESTRUNID= ourtmp=$(mktemp --tmpdir --directory xfstests-cli.XXXXXXXX) done_cleanup=false @@ -666,7 +667,7 @@ while (( $# >= 1 )); do KBUILD_OPTS="$1" ;; --testrunid) shift - supported_flavors gce + supported_flavors gce kvm TESTRUNID="$1" ;; --email) shift |