Currently the CIAO Android port has been tested using Android NDKr8e running on an Android 4.1.2 platform (API level 16).
The ACE test framework has been updated to be able to deploy CIAO regression tests in a mixed runtime environment. In this setup the plan launcher, naming service and execution manager run on a Linux host platform. CIAO nodes can be configured to run either on the Linux host platform or an Android device.
The tested configuration runs one node (with node manager, locality manager and component DLLs) on an Android device (a Beaglebone) and (the) other node(s) on linux.
The tests currently refactored to be able to run in such a test setup are listed in CIAO/examples/ciao_android.lst. For those tests minor changes are made in the run-test.pl scripts.
Below is a list of requirements needed to be able to set up an Android build and test environment:
libincov
as well. For the described cross build xerces2 and libiconv-1.13.1 were ported to
Android (see below for more information)
localeconv()
method.
--- xerces-c-src_2_8_0/src/xercesc/runConfigure 2007-08-28 20:44:56.000000000 +0200 +++ ../android/xerces-c-src_2_8_0/src/xercesc/runConfigure 2013-09-19 14:23:55.604126857 +0200 @@ -324,7 +324,8 @@ if test $thread = "none"; then else THREADS=pthread threadingDefines="-DXML_USE_PTHREADS" - threadingLibs="-lpthread" + threadingLibs="" +# threadingLibs="-lpthread" if test $platform = "hp-11"; then if test $thread; then case $thread in
--- xerces-c-src_2_8_0/src/xercesc/util/XMLAbstractDoubleFloat.cpp 2007-08-28 20:44:52.000000000 +0200 +++ ../android/xerces-c-src_2_8_0/src/xercesc/util/XMLAbstractDoubleFloat.cpp 2013-09-19 11:18:07.244662085 +0200 @@ -437,6 +437,7 @@ void XMLAbstractDoubleFloat::normalizeZe void XMLAbstractDoubleFloat::normalizeDecimalPoint(char* const toNormal) { +# if 0 // find the locale-specific decimal point delimiter lconv* lc = localeconv(); char delimiter = *lc->decimal_point; @@ -450,6 +451,7 @@ void XMLAbstractDoubleFloat::normalizeDe *period = delimiter; } } +# endif }
On the host, not only TAO_IDL, but also DAnCE and CIAO are needed, so the following workspace was used for the host build:
{ ACE/ace ACE/apps/gperf/src ACE/protocols/ace/INet TAO/tao TAO/TAO_IDL TAO/orbsvcs/orbsvcs/CosNaming.mpc TAO/orbsvcs/orbsvcs/CosNaming_Serv.mpc TAO/orbsvcs/orbsvcs/CosNaming_Skel.mpc TAO/orbsvcs/Naming_Service TAO/orbsvcs/orbsvcs/Svc_Utils.mpc CIAO/tools DAnCE/dance DAnCE/tools CIAO/ccm CIAO/ciao CIAO/examples/Hello }Setup the Android target build:
Create ace/config.h: #include "ace/config-android.h"
Create bin/MakeProjectCreator/config/default.features:
ssl=0 bzip2=0 xerces2=1 cross_compile=1Create include/makeinclude/platform_macros.GNU:
fl=0 xt=0 CROSS_COMPILE=arm-linux-androideabi- xerces2=1 debug=0 buildbits=0Include the include/makeinclude/platform_android.GNU file.
ACE_TEST_VERBOSE=1 ANDROID_ABI=armeabi-v7a ANDROID_ARCH=arm ACE_ROOT= the path to the ACE_ROOT of the target CIAO_ROOT= the path to the CIAO_ROOT of the target DANCE_ROOT= the path to the DANCE_ROOT of the target HOST_ROOT= the path to the ACE_ROOT of the host MPC_ROOT= the path to the MPC_ROOT of the target TAO_ROOT= the path to the TAO_ROOT of the targetRunning test on mixed environment
Ensure the following environment variables are (re)set:
ACE_ROOT= the path to the ACE_ROOT of the host ACE_TEST_VERBOSE=1 ANDROID_ACE_ROOT=the path to the ACE_ROOT of the target ANDROID_ARCH=arm ANDROID_CIAO_ROOT=the path to the CIAO_ROOT of the target ANDROID_DANCE_ROOT=the path to the DANCE_ROOT of the target ANDROID_OS=remote ANDROID_REMOTE_SHELL="ssh targetname" with targetname is the hostname of the Android device ANDROID_TAO_ROOT=the path to the TAO_ROOT of the target CIAO_ROOT=the path to the CIAO_ROOT of the host DANCE_ROOT=/the path to the DANCE_ROOT of the host DOC_TEST_2=ANDROID HOST_ROOT=the path to the ACE_ROOT of the host TAO_ROOT= the path to the TAO_ROOT of the host