Message ID | 1414307195-14700-5-git-send-email-ilan.peer@intel.com |
---|---|
State | Changes Requested |
Headers | show |
On Sun, Oct 26, 2014 at 03:06:31AM -0400, Ilan Peer wrote: > diff --git a/tests/hwsim/run-all.sh b/tests/hwsim/run-all.sh > @@ -24,30 +24,36 @@ else > +while [ "$1" != "" ]; do > + case $1 in .. > + * ) exit 1 That breaks many run-all.sh use cases, including all parallel VM testing. There are number of command line arguments that get used on the run-tests.py command line.
> -----Original Message----- > From: hostap-bounces@lists.shmoo.com [mailto:hostap- > bounces@lists.shmoo.com] On Behalf Of Jouni Malinen > Sent: Sunday, October 26, 2014 23:30 > To: hostap@lists.shmoo.com > Subject: Re: [PATCH 4/8] tests: make run-all.sh arguments non positional > > On Sun, Oct 26, 2014 at 03:06:31AM -0400, Ilan Peer wrote: > > diff --git a/tests/hwsim/run-all.sh b/tests/hwsim/run-all.sh @@ -24,30 > > +24,36 @@ else > > +while [ "$1" != "" ]; do > > + case $1 in > .. > > + * ) exit 1 > > That breaks many run-all.sh use cases, including all parallel VM testing. There > are number of command line arguments that get used on the run-tests.py > command line. > Fixing this: will add the original options to the switch as well. Thanks, Ilan.
diff --git a/tests/hwsim/run-all.sh b/tests/hwsim/run-all.sh index 5ec3cf2..e99d796 100755 --- a/tests/hwsim/run-all.sh +++ b/tests/hwsim/run-all.sh @@ -24,30 +24,36 @@ else fi fi -if [ "x$1" = "xvalgrind" ]; then - VALGRIND=valgrind +unset VALGRIND +unset TRACE +unset TRACE_ARGS +while [ "$1" != "" ]; do + case $1 in + -v | --valgrind ) shift + echo "$0: using valgrind" + VALGRIND=valgrind + ;; + -t | --trace ) shift + echo "$0: using Trace" + TRACE=trace + ;; + -n | --channels ) shift + NUM_CH=$1 + shift + echo "$0: using channels=$NUM_CH" + ;; + * ) exit 1 + esac +done + +unset SUFFIX +if [ ! -z "$VALGRIND" ]; then SUFFIX=-valgrind - shift -else - unset VALGRIND - SUFFIX= fi -if [ "x$1" = "xtrace" ] ; then - TRACE=trace +if [ ! -z "$TRACE" ]; then SUFFIX=$SUFFIX-trace TRACE_ARGS="-T" - shift -else - unset TRACE - unset TRACE_ARGS -fi - -NUM_CH=$1 -if [ x${NUM_CH%=[0-9]*} = "xchannels" ]; then - shift -else - unset NUM_CH fi if ! ./start.sh $VALGRIND $TRACE $NUM_CH; then
Signed-off-by: Ilan Peer <ilan.peer@intel.com> --- tests/hwsim/run-all.sh | 44 +++++++++++++++++++++++++------------------- 1 file changed, 25 insertions(+), 19 deletions(-)