#
#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
#
#
unset LD_LIBRARY_PATH
unset LD_LIBRARY_PATH_32
unset LD_LIBRARY_PATH_64
unset LD_PRELOAD
unset LD_PRELOAD_32
unset LD_PRELOAD_64
export NLSPATH=""
export TOPDIR="../../"
export NTHREADS=2
export NLOOPS=100
export DO_CLEANUP="no"
export INDEX_HTML="index.html"
export LD_LIBRARY_PATH="../lib"
export LD_LIBRARY_PATH_32="../lib"
export LD_LIBRARY_PATH_64="../lib"
--nthreads=*)
;;
--nloops=*)
;;
--topdir=*)
;;
--cleanup)
;;
--help)
;;
*)
;;
esac
if [ "${UNKNOWN_ARG}" = "yes" ] ; then
echo "$1: Invalid argument"
shift
continue
fi
shift
done
export NTHREADS NLOOPS TOPDIR DO_CLEANUP
echo "Usage [1]: `basename $0` [ --nthreads=<number-of-threads> ] [ --nloops=<number-of-loops> ] [ --topdir=\$(top_srcdir) ]"
echo "Please set --nloops and --nthreads to something reasonable."
exit 1
fi
}
if [ ! -f rwstderr.cat ] ; then
echo "Message catalog 'rwstderr.cat' missing or not found!"
echo "Some tests will not perform correctly."
return
fi
if [ ! -f rwstderr ] ; then
fi
cd ${HERE}
}
cat /dev/null > ${INDEX_HTML}
}
if [ "${DO_CLEANUP}" = "yes" ] ; then
return
fi
echo "------------------------------------------------------------"
echo "Test programs atomic_add and atomic_xchg take a very long"
echo "time to run. Please be patient."
echo "------------------------------------------------------------"
do
echo "------------------------------------------------------------"
if [ -f ${file} ] ; then
echo -n "Running test program ${file} ... "
logfile="${file}.out"
ret=$?
echo "SUCCESS."
else
echo "FAIL."
fi
if [ "x${pat}" != "x" ] ; then
echo "############################################################"
echo "############################################################"
fi
else
echo "Test program ${file} not found. Skipping."
fi
echo "------------------------------------------------------------"
done
}
if [ "${DO_CLEANUP}" = "yes" ] ; then
return
fi
"atomic_add" \
"atomic_xchg"
do
echo "------------------------------------------------------------"
if [ -f ${file} ] ; then
echo -n "Running test program ${file} ... "
logfile="${file}.out"
else
fi
ret=$?
echo "SUCCESS."
else
echo "FAIL."
fi
if [ "x${pat}" != "x" ] ; then
echo "############################################################"
echo "############################################################"
fi
else
echo "Test program ${file} not found. Skipping."
fi
echo "------------------------------------------------------------"
done
}
if [ "${DO_CLEANUP}" = "no" ] ; then
return
fi
"atomic_add" \
"atomic_xchg"
do
rm -f "${file}.out"
done
rm -f ${INDEX_HTML}
}
check_args $@
exit 0