summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>2014-03-24 15:08:58 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-03-27 15:17:24 +0100
commit76eefbe8af7655f8d6979069aea07e4cb32c6ee8 (patch)
treeaad935d769d14d1e3d988b44e8dbf0d4beb080be /tests/auto
parentddf2e2367ccf651fc25f02a3e7975a8b57a4bc98 (diff)
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>
Diffstat (limited to 'tests/auto')
-rwxr-xr-xtests/auto/android/runtests_androiddeployqt.pl4
1 files changed, 4 insertions, 0 deletions
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;