debugd: Conditionally build cellular and WiMAX support.

This CL conditionally compiles cellular and WiMAX support in debugd
based on the 'cellular' and 'wimax' USE flags.

When USE='-cellular', the following DBus methods do nothing and return
an empty response:
  org.chromium.debugd.GetModemStatus
  org.chromium.debugd.RunModemCommand

When USE='-wimax', the following DBus method does nothing and returns an
empty response:
  org.chromium.debugd.GetWiMaxStatus

BUG=chromium:343417
CQ-DEPEND=CL:186350
TEST=Tested the following:
1. `USE='cellular gdmwimax wimax' FEATURES=test emerge-$BOARD platform2`
2. `USE='-cellular -gdmwimax -wimax' FEATURES=test emerge-$BOARD platform2`
3. Verify the following commands return valid output when debugd is
   built with cellular/WiMAX support, and return an empty string when
   debugd is built without cellular/WiMAX support:

     # Test on a system with a Gobi3k modem
     dbus-send --system --print-reply --dest=org.chromium.debugd \
        /org/chromium/debugd org.chromium.debugd.GetModemStatus
     dbus-send --system --print-reply --dest=org.chromium.debugd \
        /org/chromium/debugd org.chromium.debugd.RunModemCommand \
        string:'AT'

     # Test on a system with a WiMAX module
     dbus-send --system --print-reply --dest=org.chromium.debugd \
        /org/chromium/debugd org.chromium.debugd.GetWiMaxStatus

4. Verify the 'modem-status', 'mm-status', and 'wimax-status' section
   under chrome://system report valid information when debugd is built
   with cellular/WiMAX support, and no information when debugd is built
   without cellular/WiMAX support.

Change-Id: Ifd25eb450521719275769d3d1413cf3d4cc43db6
Reviewed-on: https://chromium-review.googlesource.com/186304
Reviewed-by: Gaurav Shah <gauravsh@chromium.org>
Reviewed-by: Jorge Lucangeli Obes <jorgelo@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Ben Chan <benchan@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
4 files changed
tree: bd5b23317d0e9596573edda5d51d6febd668137c
  1. doc/
  2. share/
  3. src/
  4. .gitignore
  5. debugd.gyp
  6. OWNERS
  7. README