[Android-development] How to run Qt unit tests under Android?

Fält Simo Simo.Falt at theqtcompany.com
Thu Nov 27 11:56:30 CET 2014


You could install the cpanminus tool first. With that installing cpan modules is easy as eating snow. But if you don't want to do that, you can comment the QMake::Project usage away from the script. It is only used to detect failures of possible insignificant test cases.

-----Original Message-----
From: android-development-bounces+simo.falt=theqtcompany.com at qt-project.org [mailto:android-development-bounces+simo.falt=theqtcompany.com at qt-project.org] On Behalf Of Pekka Nikander
Sent: 27. marraskuuta 2014 12:50
To: BogDan
Cc: android-development at qt-project.org
Subject: Re: [Android-development] How to run Qt unit tests under Android?

Thanks, 

Sorry for being such a newbie here, but how do I install the apparently required Perl QMake::Project module?  My local CPAN complains that the module cannot be found and the manual installation instructions I found use make, which in turn complains about missing prerequisites.  Googling didn't find anything relevant related to QMake::Project but the meta::cpan etc sites, which unfortunately do not seem to include installation instructions.  (I last used Perl some 15-20 years ago, before Python times, and at that time when CPAN etc didn't exist yet, or at least were not widely used.)

I'm running Mac OS X Mavericks.

BTW, in the meanwhile, I was able manually change the linking command to produce a command-line binary, upload the resulting binary and the Qt shared libraries to /data/local/tmp, and to run the test case there with LD_LIBRARY_PATH pointing correctly.  

As this particular one doesn't need Dalvik (as I'm running directly against the relevant binder interfaces in pre C++), the test case seems to execute just fine also in that way.

--Pekka

On 2014-11-27, at 9:44 , BogDan <bog_dan_ro at yahoo.com> wrote:

> Hi,
> 
> You need to use qtbase/tests/auto/android/runtests_androiddeployqt.pl tool.
> 
> Cheers,
> BogDan.
> 
> 
> 
> 
> ----- Original Message -----
> From: Pekka Nikander <pekka.nikander at iki.fi>
> To: android-development at qt-project.org
> Cc: 
> Sent: Thursday, November 27, 2014 7:54 AM
> Subject: [Android-development] How to run Qt unit tests under Android?
> 
> [My apologies if this has been discussed already, but I didn't find anything from the archives or elsewhere.  I'm myself newbie to Qt even though I have over 30 years of programming experience overall.]
> 
> I'm developing some Android-specific functionality for Qt, and would like to test it.  I've figured out how to write unit tests with QtTest/QTest, and I'm able to compile the test cases with qmake & make.  Each test case seems to compile into a separate ARM .so file. 
> 
> Now, how do I run these?  I presume I must run them in the emulator or on a real device, but "make checks" tries to simply run them on the host instead of uploading them and presumably running some wrapper that uses dynamic linker to open and run them.
> 
> What I am missing?
> 
> --Pekka Nikander
> 
> _______________________________________________
> Android-development mailing list
> Android-development at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/android-development
> _______________________________________________
> Android-development mailing list
> Android-development at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/android-development




More information about the Android-development mailing list