2016-11-23 02:03:20 +03:00
|
|
|
#!/bin/sh
|
2020-06-17 20:23:13 +03:00
|
|
|
# Copyright (c) 2020 Cisco Systems, Inc. All rights reserved.
|
|
|
|
# $COPYRIGHT$
|
|
|
|
#
|
|
|
|
# Additional copyrights may follow
|
|
|
|
#
|
|
|
|
# $HEADER$
|
2016-11-23 02:03:20 +03:00
|
|
|
|
|
|
|
retval=-1
|
2020-06-17 20:23:13 +03:00
|
|
|
argv=$*
|
2016-11-23 02:03:20 +03:00
|
|
|
|
2020-06-17 20:23:13 +03:00
|
|
|
set $*
|
|
|
|
while shift; do
|
|
|
|
if test "$1" = "--test-name"; then
|
|
|
|
progname=`basename $2`
|
|
|
|
break
|
|
|
|
fi
|
|
|
|
done
|
2016-11-23 02:03:20 +03:00
|
|
|
echo "--> Testing $progname"
|
|
|
|
|
|
|
|
for threads in 1 2 4 5 8 ; do
|
2020-06-17 20:23:13 +03:00
|
|
|
$argv $threads
|
2016-11-23 02:03:20 +03:00
|
|
|
result=$?
|
|
|
|
if test "$result" = "0" ; then
|
|
|
|
echo " - $threads threads: Passed"
|
2020-06-17 20:23:13 +03:00
|
|
|
if test $retval -eq -1 ; then
|
2016-11-23 02:03:20 +03:00
|
|
|
retval=0
|
|
|
|
fi
|
|
|
|
elif test "$result" = "77" ; then
|
|
|
|
echo " - $threads threads: Skipped"
|
2020-06-17 20:23:13 +03:00
|
|
|
if test $retval -eq -1 ; then
|
2016-11-23 02:03:20 +03:00
|
|
|
retval=77
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
echo " - $threads threads: Failed"
|
2020-06-17 20:23:13 +03:00
|
|
|
retval=$result
|
2016-11-23 02:03:20 +03:00
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
exit $retval
|