From 76eefbe8af7655f8d6979069aea07e4cb32c6ee8 Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt Date: Mon, 24 Mar 2014 15:08:58 +0100 Subject: Android: Fix missing data from some autotests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- tests/auto/android/runtests_androiddeployqt.pl | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tests/auto') diff --git a/tests/auto/android/runtests_androiddeployqt.pl b/tests/auto/android/runtests_androiddeployqt.pl index 1cc52d0495..3d57dcfd65 100755 --- a/tests/auto/android/runtests_androiddeployqt.pl +++ b/tests/auto/android/runtests_androiddeployqt.pl @@ -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; -- cgit v1.2.3