Skip to content

Two small tweaks to android testing #12256

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 14, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions src/compiletest/compiletest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -219,12 +219,14 @@ pub fn run_tests(config: &config) {
mode_debug_info => {
println!("arm-linux-androideabi debug-info \
test uses tcp 5039 port. please reserve it");
//arm-linux-androideabi debug-info test uses remote debugger
//so, we test 1 task at once
os::setenv("RUST_TEST_TASKS","1");
}
_ =>{}
}

//arm-linux-androideabi debug-info test uses remote debugger
//so, we test 1 task at once.
// also trying to isolate problems with adb_run_wrapper.sh ilooping
os::setenv("RUST_TEST_TASKS","1");
}

let opts = test_opts(config);
Expand Down
18 changes: 2 additions & 16 deletions src/etc/adb_run_wrapper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
# usage : adb_run_wrapper [test dir - where test executables exist] [test executable]
#

# Sometimes android shell produce exitcode "1 : Text File Busy"
# Retry after $WAIT seconds, expecting resource cleaned-up
WAIT=10
TEST_PATH=$1
BIN_PATH=/system/bin
if [ -d "$TEST_PATH" ]
Expand All @@ -16,20 +13,9 @@ then
then
shift

L_RET=1
L_COUNT=0
cd $TEST_PATH
while [ $L_RET -eq 1 ]
do
TEST_EXEC_ENV=22 LD_LIBRARY_PATH=$TEST_PATH PATH=$BIN_PATH:$TEST_PATH $TEST_PATH/$RUN $@ 1>$TEST_PATH/$RUN.stdout 2>$TEST_PATH/$RUN.stderr
L_RET=$?
if [ $L_COUNT -gt 0 ]
then
/system/bin/sleep $WAIT
/system/bin/sync
fi
L_COUNT=$((L_COUNT+1))
done
TEST_EXEC_ENV=22 LD_LIBRARY_PATH=$TEST_PATH PATH=$BIN_PATH:$TEST_PATH $TEST_PATH/$RUN $@ 1>$TEST_PATH/$RUN.stdout 2>$TEST_PATH/$RUN.stderr
L_RET=$?

echo $L_RET > $TEST_PATH/$RUN.exitcode

Expand Down