diff options
Diffstat (limited to 'tests/auto/android/runtests_androiddeployqt.pl')
-rwxr-xr-x | tests/auto/android/runtests_androiddeployqt.pl | 43 |
1 files changed, 22 insertions, 21 deletions
diff --git a/tests/auto/android/runtests_androiddeployqt.pl b/tests/auto/android/runtests_androiddeployqt.pl index c949e1cf87..fe67257b4b 100755 --- a/tests/auto/android/runtests_androiddeployqt.pl +++ b/tests/auto/android/runtests_androiddeployqt.pl @@ -2,41 +2,33 @@ ############################################################################# ## ## Copyright (C) 2012-2013 BogDan Vatra <bogdan@kde.org> -## Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +## Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ## Contact: http://www.qt-project.org/legal ## ## This file is part of the test suite of the Qt Toolkit. ## -## $QT_BEGIN_LICENSE:LGPL$ +## $QT_BEGIN_LICENSE:LGPL21$ ## Commercial License Usage ## Licensees holding valid commercial Qt licenses may use this file in ## accordance with the commercial license agreement provided with the ## Software or, alternatively, in accordance with the terms contained in -## a written agreement between you and Digia. For licensing terms and -## conditions see http://qt.digia.com/licensing. For further information +## a written agreement between you and Digia. For licensing terms and +## conditions see http://qt.digia.com/licensing. For further information ## use the contact form at http://qt.digia.com/contact-us. ## ## GNU Lesser General Public License Usage ## Alternatively, this file may be used under the terms of the GNU Lesser -## General Public License version 2.1 as published by the Free Software -## Foundation and appearing in the file LICENSE.LGPL included in the -## packaging of this file. Please review the following information to -## ensure the GNU Lesser General Public License version 2.1 requirements -## will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +## General Public License version 2.1 or version 3 as published by the Free +## Software Foundation and appearing in the file LICENSE.LGPLv21 and +## LICENSE.LGPLv3 included in the packaging of this file. Please review the +## following information to ensure the GNU Lesser General Public License +## requirements will be met: https://www.gnu.org/licenses/lgpl.html and +## http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ## ## In addition, as a special exception, Digia gives you certain additional -## rights. These rights are described in the Digia Qt LGPL Exception +## rights. These rights are described in the Digia Qt LGPL Exception ## version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ## -## GNU General Public License Usage -## Alternatively, this file may be used under the terms of the GNU -## General Public License version 3.0 as published by the Free Software -## Foundation and appearing in the file LICENSE.GPL included in the -## packaging of this file. Please review the following information to -## ensure the GNU General Public License version 3.0 requirements will be -## met: http://www.gnu.org/copyleft/gpl.html. -## -## ## $QT_END_LICENSE$ ## ############################################################################# @@ -79,6 +71,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 +91,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; @@ -300,6 +294,7 @@ sub waitForProcess my $src_dir_qt=abs_path(dirname($0)."/../../.."); my $quadruplor_dir="$src_dir_qt/tests/auto/android"; my $qmake_path="$src_dir_qt/bin/qmake"; +my $androiddeployqt_path="$src_dir_qt/bin/androiddeployqt"; my $tests_dir="$src_dir_qt/tests$testsubset"; my $temp_dir=tempdir(CLEANUP => 1); my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time); @@ -349,6 +344,7 @@ sub startTest { #killProcess($packageName); print "Someone should kill $packageName\n"; + system("$adb_tool $device_serial uninstall $packageName") if ($uninstall); return 1; } @@ -362,6 +358,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; } @@ -389,9 +386,9 @@ foreach (split("\n",$testsFiles)) print $res if (!$silent); my $application=basename(cwd); if ($silent) { - $cmd="androiddeployqt --install ${deployqt_device_serial} --output ${temp_dir} --deployment debug --verbose --input android-libtst_${application}.so-deployment-settings.json >/dev/null 2>&1"; + $cmd="$androiddeployqt_path --install ${deployqt_device_serial} --output ${temp_dir} --deployment debug --verbose --input android-libtst_${application}.so-deployment-settings.json >/dev/null 2>&1"; } else { - $cmd="androiddeployqt --install ${deployqt_device_serial} --output ${temp_dir} --deployment debug --verbose --input android-libtst_${application}.so-deployment-settings.json"; + $cmd="$androiddeployqt_path --install ${deployqt_device_serial} --output ${temp_dir} --deployment debug --verbose --input android-libtst_${application}.so-deployment-settings.json"; } $res = qx(${cmd}); print $res if (!$silent); @@ -496,6 +493,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. |