File tree Expand file tree Collapse file tree 1 file changed +19
-7
lines changed Expand file tree Collapse file tree 1 file changed +19
-7
lines changed Original file line number Diff line number Diff line change 1
1
#
2
2
# usage : adb_run_wrapper [test dir - where test executables exist] [test executable]
3
3
#
4
+
5
+ # Sometimes android shell produce exitcode "1 : Text File Busy"
6
+ # Retry after $WAIT seconds, expecting resource cleaned-up
7
+ WAIT=10
4
8
PATH=$1
5
9
if [ -d " $PATH " ]
6
10
then
10
14
if [ ! -z " $RUN " ]
11
15
then
12
16
shift
13
- while [ -f $PATH /lock ]
17
+
18
+ L_RET=1
19
+ L_COUNT=0
20
+ while [ $L_RET -eq 1 ]
14
21
do
15
- /system/bin/sleep 1
22
+ LD_LIBRARY_PATH=$PATH $PATH /$RUN $@ 1> $PATH /$RUN .stdout 2> $PATH /$RUN .stderr
23
+ L_RET=$?
24
+ if [ $L_COUNT -gt 0 ]
25
+ then
26
+ /system/bin/sleep $WAIT
27
+ /system/bin/sync
28
+ fi
29
+ L_COUNT=` expr $L_COUNT +1`
16
30
done
17
- /system/bin/touch $PATH /lock
18
- LD_LIBRARY_PATH=$PATH $PATH /$RUN $@ 1> $PATH /$RUN .stdout 2> $PATH /$RUN .stderr
19
- echo $? > $PATH /$RUN .exitcode
20
- /system/bin/rm $PATH /lock
21
- /system/bin/sync
31
+
32
+ echo $L_RET > $PATH /$RUN .exitcode
33
+
22
34
fi
23
35
fi
You can’t perform that action at this time.
0 commit comments