diff options
author | BogDan Vatra <bogdan@kde.org> | 2014-07-21 10:43:04 +0300 |
---|---|---|
committer | BogDan Vatra <bogdan@kde.org> | 2014-07-21 20:38:00 +0200 |
commit | b3791615655eb2ed7ac0d8a31edc93194ab8cc0c (patch) | |
tree | cd4f183d56ada7bf5e45950243e10fde78fb9667 /tests | |
parent | e8a97d874332f7fb6d4c80481ea923ccb6bc09b6 (diff) |
Android: Add uninstall option.
Uninstall option will uninstall the test afer has been executed.
It is useful when you are using your own phone to execute the tests.
Change-Id: I2a3f6c3a93099d70c98f9ce059da22c409b55843
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/auto/android/runtests_androiddeployqt.pl | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/auto/android/runtests_androiddeployqt.pl b/tests/auto/android/runtests_androiddeployqt.pl index 3946da964f..28fe976c50 100755 --- a/tests/auto/android/runtests_androiddeployqt.pl +++ b/tests/auto/android/runtests_androiddeployqt.pl @@ -79,6 +79,7 @@ my $total_failed = 0; my $failed_insignificants = 0; my $ci_use = 0; my $start = time(); +my $uninstall = 0; GetOptions('h|help' => \$help , man => \$man @@ -98,6 +99,7 @@ GetOptions('h|help' => \$help , 'testcase=s' => \$testcase , 'silent' => sub { $silent = 1 } , 'ci' => sub { $ci_use = 1 } + , 'uninstall' => sub { $uninstall = 1 } ) or pod2usage(2); pod2usage(1) if $help; pod2usage(-verbose => 2) if $man; @@ -350,6 +352,7 @@ sub startTest { #killProcess($packageName); print "Someone should kill $packageName\n"; + system("$adb_tool $device_serial uninstall $packageName") if ($uninstall); return 1; } @@ -363,6 +366,7 @@ sub startTest my $insig = print_output("$output_dir/$output_file.txt", $packageName, $insignificance); } + system("$adb_tool $device_serial uninstall $packageName") if ($uninstall); return 1; } @@ -497,6 +501,10 @@ Suppress output of system commands. Enables checking if test is insignificant or not. Also prints test summary after all tests has been executed. +=item B<-uninstall> + +Uninstalls the test after has been executed. + =item B<-h --help> Print a brief help message and exits. |