Android: Fix missing data from some autotests

After a test ended, we would instantly try to fetch its output,
but at this point, it might still not be available through the
adb interface, probably due to some cache synchronization in the
file system? Adding an arbitrary three second pause between
finishing the test and requesting the file fixes this. If the
error pops up later again, we could do something more robust,
like going in a loop for X seconds until the file has been fetched.
Especially if detecting task finish was successful.

Task-number: QTBUG-37444
Change-Id: I5442e1e0181f489b0626834a390e46c15bc0b371
Reviewed-by: Simo Fält <simo.falt@digia.com>
bb10
Eskil Abrahamsen Blomfeldt 2014-03-24 15:08:58 +01:00 committed by The Qt Project
parent ddf2e2367c
commit 76eefbe8af
1 changed files with 4 additions and 0 deletions

View File

@ -217,6 +217,10 @@ sub startTest
print "Someone should kill $packageName\n";
return 1;
}
# Wait for three seconds to allow process to write all data
sleep(3);
system("$adb_tool $device_serial pull /data/data/$packageName/output.xml $output_dir/$output_file.xml") if ($get_xml);
system("$adb_tool $device_serial pull /data/data/$packageName/output.txt $output_dir/$output_file.txt") if ($get_txt);
return 1;