From 90a89391f8110fbd1ff9b3041d548dac7e73a99a Mon Sep 17 00:00:00 2001 From: James Nunez Date: Mon, 22 Apr 2019 10:46:42 -0600 Subject: [PATCH] LU-8434 tests: add script language option to auster 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 Change-Id: Ifbd3707171de57912306cf051a98922249c4b2a9 Reviewed-on: https://review.whamcloud.com/34737 Tested-by: Jenkins Reviewed-by: Joseph Gmitter Reviewed-by: Jian Yu Tested-by: Maloo Reviewed-by: Oleg Drokin --- lustre/tests/auster | 52 ++++++++++++++++++++++------------------------------ 1 file changed, 22 insertions(+), 30 deletions(-) diff --git a/lustre/tests/auster b/lustre/tests/auster index 5a4e73d..c8093a5 100755 --- a/lustre/tests/auster +++ b/lustre/tests/auster @@ -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)) -- 1.8.3.1