rust/src/etc/adb_run_wrapper.sh

24 lines
505 B
Bash
Raw Normal View History

2013-05-29 19:36:53 -05:00
#
# usage : adb_run_wrapper [test dir - where test executables exist] [test executable]
#
PATH=$1
if [ -d "$PATH" ]
2013-05-29 02:04:11 -05:00
then
shift
2013-05-29 19:36:53 -05:00
RUN=$1
2013-05-29 02:04:11 -05:00
2013-05-29 19:36:53 -05:00
if [ ! -z "$RUN" ]
then
shift
while [ -f $PATH/lock ]
do
/system/bin/sleep 1
done
/system/bin/touch $PATH/lock
LD_LIBRARY_PATH=$PATH $PATH/$RUN $@ 1>$PATH/$RUN.stdout 2>$PATH/$RUN.stderr
echo $? > $PATH/$RUN.exitcode
/system/bin/rm $PATH/lock
/system/bin/sync
fi
fi