[vz-dev] Fwd: Question about Unit Tests in cross-compile environment

Hannes Schmelzer hannes at schmelzer.or.at
Wed Nov 1 13:12:50 CET 2017


no ideas?
should i send some pull-request of my current solution instead?

cheers,
Hannes


-------- Forwarded Message --------
Subject: 	Question about Unit Tests in cross-compile environment
Date: 	Tue, 26 Sep 2017 22:21:49 +0200
From: 	Hannes Schmelzer <hannes at schmelzer.or.at>
To: 	volkszaehler-dev at demo.volkszaehler.org


I build the vzlogger with the buildroot toolchain and i have troubles
there with the unit tests.

Actually i simple disable these tests there with setting
'set(ENABLE_GOOGLEMOCK FALSE)' within CMakeLists.txt

I'm not sure if this is the 100% right way.
Fact is, that we cannot run the produced binary on the build host.

Would it be an idea for having some 'if cross-compile' within the
CMakeLists for switching off the unit tests ?


buildroot today passes these arguments per default to the cmake build:

DCMAKE_COLOR_MAKEFILE=OFF -DBUILD_DOC=OFF -DBUILD_DOCS=OFF
-DBUILD_EXAMPLE=OFF -DBUILD_EXAMPLES=OFF -DBUILD_TEST=OFF
-DBUILD_TESTS=OFF -DBUILD_TESTING=OFF -DBUILD_SHARED_LIBS=ON

maybe we can hook on something there ...

-DBUILD_TEST=OFF

might be an idea.


cheers,
Hannes


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://demo.volkszaehler.org/pipermail/volkszaehler-dev/attachments/20171101/45c654b3/attachment.html>


More information about the volkszaehler-dev mailing list