Преглед изворни кода

ktestsctl: proper selection of test name parameter

Daniel-Constantin Mierla пре 7 година
родитељ
комит
6e39bdbea3
1 измењених фајлова са 3 додато и 2 уклоњено
  1. 3 2
      ktestsctl

+ 3 - 2
ktestsctl

@@ -64,7 +64,7 @@ ktestsrun() {
 	echo "=== unit tests execution start ==="
 	echo "running test units at: ${LOGDATE}" >${LOGFILE}
 	echo "" >>${LOGFILE}
-	if [ $# -lt 2 ] ; then
+	if [ $# -lt 1 ] ; then
 		UNITSLIST=`find units/t* -maxdepth 1 -type d`
 	else
 		UNITSLIST=`find units/${1}* -maxdepth 1 -type d`
@@ -149,12 +149,13 @@ set -- "${CMDPARAMS[@]}" # restore positional parameters
 
 ### main command switch
 #
+echo
 case $1 in
 	run)
 		if [ $# -lt 2 ] ; then
 			ktestsrun
 		else
-			ktestsrun "${1}"
+			ktestsrun "${2}"
 		fi
 		if [ "${KTESTSWAIT}" == "yes" ]; then
 			echo