Whamcloud - gitweb
LU-8434 tests: add script language option to auster 37/34737/3
authorJames Nunez <jnunez@whamcloud.com>
Mon, 22 Apr 2019 16:46:42 +0000 (10:46 -0600)
committerOleg Drokin <green@whamcloud.com>
Tue, 30 Apr 2019 03:38:29 +0000 (03:38 +0000)
auster is a scipt that kicks off the Lustre test suites.
auster assumes that all scirpts are written in bash and
runs all script using bash. We may want to run other scripts
to test Lustre and we need to allow the user to choose what
scripting language to use to kick off their scripts.

Test-Parameters: trivial

Signed-off-by: James Nunez <jnunez@whamcloud.com>
Change-Id: Ifbd3707171de57912306cf051a98922249c4b2a9
Reviewed-on: https://review.whamcloud.com/34737
Tested-by: Jenkins
Reviewed-by: Joseph Gmitter <jgmitter@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/tests/auster

index 5a4e73d..c8093a5 100755 (executable)
@@ -32,6 +32,7 @@ Run Lustre regression tests suites.
       -v        Verbose mode
       -l        Send logs to the Maloo database after run
                   (can be done later by running maloo_upload.sh)
+      -L        Script language of test suite. Default: bash
       -h        This help.
 
 Suite options
@@ -65,28 +66,30 @@ verbose=false
 repeat_count=1
 upload_logs=false
 reformat=false
+script_lang=bash
 test_logs_dir=/tmp/test_logs/$(date +%Y-%m-%d)/$(date +%H%M%S)
 export ${SLOW:=no}
 export ${NAME:=local}
-while getopts "c:d:D:nkf:S:g:i:rRslhv" opt
+while getopts "c:d:D:nkf:S:g:i:rRslL:hv" opt
 do
-    case "$opt" in
-        c) export CONFIG=$OPTARG;;
-        d) test_logs_dir=$OPTARG/$(date +%Y-%m-%d)/$(date +%H%M%S);;
-        D) test_logs_dir=$OPTARG;;
-        g) test_group_file=$OPTARG;;
-        S) FIRST_SUITE=$OPTARG;;
-        k) export FAIL_ON_ERROR=false;;
-        n) dry_run=:;;
-        v) verbose=:;;
-        i) repeat_count=$OPTARG;;
-        f) NAME=$OPTARG;;
-        R) do_reset=:;;
-        r) reformat=:;;
-       s) export SLOW=yes;;
-        l) upload_logs=true;;
-        h|\?) usage;;
-    esac
+       case "$opt" in
+               c) export CONFIG=$OPTARG;;
+               d) test_logs_dir=$OPTARG/$(date +%Y-%m-%d)/$(date +%H%M%S);;
+               D) test_logs_dir=$OPTARG;;
+               g) test_group_file=$OPTARG;;
+               S) FIRST_SUITE=$OPTARG;;
+               k) export FAIL_ON_ERROR=false;;
+               n) dry_run=:;;
+               v) verbose=:;;
+               i) repeat_count=$OPTARG;;
+               f) NAME=$OPTARG;;
+               R) do_reset=:;;
+               r) reformat=:;;
+               s) export SLOW=yes;;
+               l) upload_logs=true;;
+               L) script_lang=$OPTARG;;
+               h|\?) usage;;
+       esac
 done
 
 # If a test_group_file is specified, then ignore rest of command line
@@ -97,17 +100,6 @@ else
     shift $((OPTIND -1))
 fi
 
-#
-# Various paramters for the tests scripts
-#
-#: ${SIZE:=$((RAMKB * 2))}
-#: ${RSIZE:=512}
-#: ${UID:=1000}
-#: ${MOUNT=/mnt/lustre}
-#: ${MOUNT2:=${MOUNT}2}
-#: ${COUNT:=1000}
-#: ${TMP:=/tmp}
-
 reset_lustre() {
     if $do_reset; then
         stopall
@@ -201,7 +193,7 @@ run_suite() {
        rm -f $TF_FAIL
        touch $TF_SKIP
        local start_ts=$(date +%s)
-       doit bash $suite_script
+       doit $script_lang $suite_script
        local rc=$?
        local duration=$(($(date +%s) - $start_ts))