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

Pekka Nikander pekka.nikander at iki.fi
Thu Nov 27 11:55:45 CET 2014


Sorry for the noise, installing cpanminus and using it helped:

http://www.cpan.org/modules/INSTALL.html

i.e. 

sudo cpan App::cpanminus
sudo cpanm QMake::Project

did the thing.

--Pekka

On 2014–11–27, at 12:49 , Pekka Nikander <pekka.nikander at iki.fi> wrote:

> 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
> 
> _______________________________________________
> Android-development mailing list
> Android-development at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/android-development

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4827 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/android-development/attachments/20141127/841c6207/attachment.bin>


More information about the Android-development mailing list