Skip to content

Commit 3e535f2

Browse files
committed
---
yaml --- r: 65498 b: refs/heads/master c: c28c495 h: refs/heads/master v: v3
1 parent 7c6cf4e commit 3e535f2

File tree

2 files changed

+20
-8
lines changed

2 files changed

+20
-8
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 0521d54ca1e194ba8564f4a000c50b7f708022ba
2+
refs/heads/master: c28c495414d8d5bec83ca4c7e2781c1a7cc8d489
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 18e3db7392d2d0697b7e27d6d986139960144d85
55
refs/heads/try: 7b78b52e602bb3ea8174f9b2006bff3315f03ef9

trunk/src/etc/adb_run_wrapper.sh

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
#
22
# usage : adb_run_wrapper [test dir - where test executables exist] [test executable]
33
#
4+
5+
# Sometimes android shell produce exitcode "1 : Text File Busy"
6+
# Retry after $WAIT seconds, expecting resource cleaned-up
7+
WAIT=10
48
PATH=$1
59
if [ -d "$PATH" ]
610
then
@@ -10,14 +14,22 @@ then
1014
if [ ! -z "$RUN" ]
1115
then
1216
shift
13-
while [ -f $PATH/lock ]
17+
18+
L_RET=1
19+
L_COUNT=0
20+
while [ $L_RET -eq 1 ]
1421
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`
1630
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+
2234
fi
2335
fi

0 commit comments

Comments
 (0)