Whamcloud - gitweb
LU-1145 test: add Test-Parameters tag for autotest
authorAndreas Dilger <adilger@whamcloud.com>
Wed, 22 Feb 2012 11:47:28 +0000 (04:47 -0700)
committerOleg Drokin <green@whamcloud.com>
Sat, 3 Mar 2012 14:08:24 +0000 (09:08 -0500)
Allow Test-Parameters line to specify extra tests that should be run
to properly validate a change made to code or a regression test.

The Test-Parameters line can be quite long, depending on the number
of parameters specified.  A single set of test parameters can be
split over multiple lines by escaping the linefeed, though the
individual lines should still be kept below the 70-character limit.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I65e1d41ad0f487df3753f25d9111ade9a0af08b1
Reviewed-on: http://review.whamcloud.com/2176
Reviewed-by: <bruce.korb@gmail.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Chris Gearing <chris@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
build/commit-msg
build/commit.ok_params [new file with mode: 0644]

index 4edbac8..bb771b5 100755 (executable)
@@ -19,6 +19,7 @@ init() {
         readonly SAVE="$(basename $ORIGINAL).$(date +%Y%m%d.%H%M%S)"
         readonly SIGNOFF="Signed-off-by:"
         readonly CHANGEID="Change-Id:"
+        readonly TESTPARAMS="Test-Parameters:"
         readonly INNOCUOUS=$(echo \
                         Acked-by \
                         Tested-by \
@@ -157,7 +158,7 @@ new_changeid() {
 #
 error() {
         (( ${#LINE} > 0 )) && echo "line $NUM: $LINE"
-        echo "error: commit message $*" | fmt --split-only
+        echo "error: commit message $*" | fmt
         HAS_ERROR=true
 } 1>&2
 
@@ -198,6 +199,7 @@ usage() {
        $(for T in $(tr '|' ' ' <<< "$INNOCUOUS"); do       \
             echo "    $T: Some Person <email@domain.com>"; \
          done)
+       $TESTPARAMS optional additional test parameters
        {Organization}-bug-id: associated external change identifier
        EOF
 
@@ -213,6 +215,7 @@ while IFS= read -u3 LINE; do
         case "$LINE" in
         $SIGNOFF* )   do_signoff   ;;
         $CHANGEID* )  do_changeid  ;;
+        $TESTPARAMS* ) ck_wrapup   ;;
 
         "")
                 HAS_LAST_BLANK=true
diff --git a/build/commit.ok_params b/build/commit.ok_params
new file mode 100644 (file)
index 0000000..d565f45
--- /dev/null
@@ -0,0 +1,14 @@
+LU-1145 test: allow Test-Parameters tag for autotest
+
+Allow Test-Parameters line to specify extra tests that should be run
+to properly validate a change made to code or a regression test.
+
+The Test-Parameters line can be quite long, depending on the number
+of parameters specified.  A single set of test parameters can be
+split over multiple lines by escaping the linefeed, though the
+individual lines should still be kept below the 70-character limit.
+
+Test-Parameters: ostcount=5 clientarch=i686 clientdistro=rhel5
+Test-Parameters: ostcount=1 testlist=ost-pools,sanity,sanityn,lfsck \
+       filesystemtype=ldiskfs,zfs serverarch=x86_64
+Signed-off-by: Andreas Dilger <adilger@whamcloud.com>