Răsfoiți Sursa

ktestsctl: option to wait at the end of executing the test units

- useful if one wants to attach to the container
- it may require to stop the container via: docker stop <containerid>
Daniel-Constantin Mierla 7 ani în urmă
părinte
comite
5521b94bcc
1 a modificat fișierele cu 11 adăugiri și 0 ștergeri
  1. 11 0
      ktestsctl

+ 11 - 0
ktestsctl

@@ -13,6 +13,7 @@ $0 [options] cmd [params]
 Options:
   -m | --mysql ..... prepare mysql database
   -q | --quiet ..... execution of unit tests in silent mode
+  -w | --wait ...... wait at the end of running the unit tests
 
 Commands:
   -- command 'run' --
@@ -115,6 +116,7 @@ ktestsrun() {
 
 ### evaluate first the options
 CMDPARAMS=()
+KTESTSWAIT="no"
 while [[ $# -gt 0 ]]
 do
 	key="$1"
@@ -128,6 +130,10 @@ do
 			UNITOUTPUT="no"
 			shift
 		;;
+		-w|--wait)
+			KTESTSWAIT="yes"
+			shift
+		;;
 		*)
 			CMDPARAMS+=("$1")
 			shift
@@ -146,6 +152,11 @@ case $1 in
 		else
 			ktestsrun "${1}"
 		fi
+		if [ "${KTESTSWAIT}" == "yes" ]; then
+			echo
+			echo "=== waiting ..."
+			wait
+		fi
 		;;
 	version)
 		echo  "$0 $VERSION"