I'm writing Marionette test cases for our NFC subsystem. However, we
have not changed the emulator to emulate actual NFC hardware (this would
be completely out of scope). Instead we inject NFC messages by
telnetting into nfcd to test the pipe through Gecko up to Gaia. For that
reason I need to distinguish between emulator build (which needs to
include the telnet server) and a device build (that uses the actual NFC
chip) for nfcd.
What I ended up doing is to add this to our Android.mk:
ifeq ($(TARGET_PRODUCT),full)
LOCAL_CFLAGS += -DEMULATOR_BUILD
endif
This is working just fine.
Arno
On 4/28/13 10:50 PM, Vicamo Yang wrote:
No, and I suggest you don't at least for Gecko code. All device specific
issue would be better solved in per device configs in Gonk. Emulator
should behave exactly the same as a physical device except the lack of
drivers of a few devices. For me, there is no strong reason we should
ever differ emulator from others.
On 04/19/2013 04:41 PM, Arno Puder wrote:
Hi,
is there an #ifdef I can use to conditionally compile code for an
emulator build?
Arno
_______________________________________________
dev-b2g mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-b2g