Skip to content
Snippets Groups Projects
Commit f4be25b7 authored by Zach Brown's avatar Zach Brown
Browse files

- add an argument to select which tests to run

parent e3e169c0
No related branches found
No related tags found
No related merge requests found
...@@ -24,6 +24,8 @@ cur_y="0" ...@@ -24,6 +24,8 @@ cur_y="0"
# defaults for some options: # defaults for some options:
min_threads=1 min_threads=1
max_threads=4 max_threads=4
possible_tests="sgp_dd ext2_iozone echo_filter"
run_tests="$possible_tests"
# optional output directory # optional output directory
output_dir="" output_dir=""
...@@ -100,6 +102,7 @@ usage() { ...@@ -100,6 +102,7 @@ usage() {
echo " -l <max io len>" echo " -l <max io len>"
echo " -t <minimum number of threads per device>" echo " -t <minimum number of threads per device>"
echo " -T <maximum number of threads per device>" echo " -T <maximum number of threads per device>"
echo " -r <tests to run>"
exit; exit;
} }
...@@ -645,11 +648,12 @@ test_iterator() { ...@@ -645,11 +648,12 @@ test_iterator() {
return $rc; return $rc;
} }
while getopts ":d:b:l:t:T:" opt; do while getopts ":d:b:l:t:T:r:" opt; do
case $opt in case $opt in
b) block=$OPTARG ;; b) block=$OPTARG ;;
d) output_dir=$OPTARG ;; d) output_dir=$OPTARG ;;
l) io_len=$OPTARG ;; l) io_len=$OPTARG ;;
r) run_tests=$OPTARG ;;
t) min_threads=$OPTARG ;; t) min_threads=$OPTARG ;;
T) max_threads=$OPTARG ;; T) max_threads=$OPTARG ;;
\?) usage \?) usage
...@@ -669,6 +673,14 @@ fi ...@@ -669,6 +673,14 @@ fi
block=`echo $block | sed -e 's/,/ /g'` block=`echo $block | sed -e 's/,/ /g'`
[ -z "$block" ] && usage "need block devices" [ -z "$block" ] && usage "need block devices"
run_tests=`echo $run_tests | sed -e 's/,/ /g'`
[ -z "$run_tests" ] && usage "need to specify tests to run with -r"
for t in $run_tests; do
if ! echo $possible_tests | grep -q $t ; then
die "$t isn't one of the possible tests: $possible_tests"
fi
done
[ $min_threads -gt $max_threads ] && \ [ $min_threads -gt $max_threads ] && \
die "min threads $min_threads must be <= min_threads $min_threads" die "min threads $min_threads must be <= min_threads $min_threads"
...@@ -684,10 +696,9 @@ tmpdir=`mktemp -d /tmp/.surveyXXXXXX` || die "couldn't create tmp dir" ...@@ -684,10 +696,9 @@ tmpdir=`mktemp -d /tmp/.surveyXXXXXX` || die "couldn't create tmp dir"
echo each test will operate on $io_len"k" echo each test will operate on $io_len"k"
tests="sgp_dd ext2_iozone echo_filter"
test_results="" test_results=""
for t in $tests; do for t in $run_tests; do
table_set $t 0 0 "T" table_set $t 0 0 "T"
table_set $t 1 0 "L" table_set $t 1 0 "L"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment