From: Garrett C. <yab...@us...> - 2010-01-30 21:05:40
|
Update of /cvsroot/ltp/ltp/testscripts/build In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv7845/testscripts/build Modified Files: build_test_function.sh Log Message: Add superuser exec support so ~280 some tests in the standard set won't fail when you try and execute them. Signed-off-by: Garrett Cooper <yan...@gm...> Index: build_test_function.sh =================================================================== RCS file: /cvsroot/ltp/ltp/testscripts/build/build_test_function.sh,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** build_test_function.sh 30 Jan 2010 05:53:56 -0000 1.3 --- build_test_function.sh 30 Jan 2010 21:05:32 -0000 1.4 *************** *** 148,153 **** test_ltp() { - [ "x${1}" != x ] && export LTPROOT="$1" - # XXX (garrcoop): I haven't tracked down the root cause for the # issue, but some versions of sed combined with some terminal --- 148,151 ---- *************** *** 155,159 **** # platforms when executing runltp. Thus, we should effectively close # /dev/stdin before executing runltp via execltp. ! "${1:-.}/bin/execltp" -v < /dev/null } --- 153,171 ---- # platforms when executing runltp. Thus, we should effectively close # /dev/stdin before executing runltp via execltp. ! CMD="${1:-.}/bin/execltp" ! ! if [ "x${1}" != x ] ; then ! export LTPROOT="$1" ! fi ! ! if type su > /dev/null && groups | grep wheel ; then ! CMD="su -c \"${CMD}\"" ! elif type sudo > /dev/null && sudo sh -c 'exit 0' ; then ! CMD="sudo -- \"$CMD\"" ! fi ! ! echo "Will execute using: $CMD" ! ! $CMD } |