Android: Enable script to run single autotest

To make it easier to debug failures, adds the "testcase"
commandline option, which takes the name of the test to
run and then just runs this single test.

Change-Id: Ib202bb2a5dac889b6691f9c4d0620b3e0941cf3d
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
This commit is contained in:
Eskil Abrahamsen Blomfeldt 2013-08-05 09:52:14 +02:00 committed by The Qt Project
parent 812e23cea2
commit d05ce9c61e

View File

@ -79,6 +79,7 @@ GetOptions('h|help' => \$help
, 'ant=s' => \$ant_tool
, 'strip=s' => \$strip_tool
, 'readelf=s' => \$readelf_tool
, 'testcase=s' => \$testcase
) or pod2usage(2);
pod2usage(1) if $help;
pod2usage(-verbose => 2) if $man;
@ -253,7 +254,14 @@ print "Building $tests_dir \n";
system("make distclean") if ($make_clean);
system("$qmake_path CONFIG-=QTDIR_build -r") == 0 or die "Can't run qmake\n"; #exec qmake
system("make -j$jobs") == 0 or warn "Can't build all tests\n"; #exec make
my $testsFiles=`find . -name libtst_*.so`; # only tests
my $testsFiles = "";
if ($testcase) {
$testsFiles=`find . -name libtst_$testcase.so`; # only tests
} else {
$testsFiles=`find . -name libtst_*.so`; # only tests
}
foreach (split("\n",$testsFiles))
{
chomp; #remove white spaces