New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 805274 link

Starred by 1 user

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , Chrome , Mac
Pri: 3
Type: Bug



Sign in to add a comment

[bluetooth] Platform independent unit tests should be compiled on all platforms

Project Member Reported by jdoerrie@chromium.org, Jan 24 2018

Issue description

Most unit tests in //device/bluetooth are only compiled on a subset of all platforms, even though no platform specific APIs are used. In most cases the tests are disabled because they would not able to pass on all platforms, however they should still be compiled, if possible.

This requires changing the currently existing pattern of 

#if defined(OS_PLATFORM)
...
#endif // defined(OS_PLATFORM)

to the one described in the Chromium Sheriff manual: http://dev.chromium.org/developers/tree-sheriffs/sheriff-details-chromium#TOC-GTest-based-C-Tests

The following files are effected:
- bluetooth_adapter_unittest.cc
- bluetooth_device_unittest.cc
- bluetooth_local_gatt_characteristic_unittest.cc
- bluetooth_local_gatt_descriptor_unittest.cc
- bluetooth_local_gatt_service_unittest.cc
- bluetooth_remote_gatt_characteristic_unittest.cc
- bluetooth_remote_gatt_service_unittest.cc
- bluetooth_remote_gatt_descriptor_unittest.cc
 
Status: Available (was: Untriaged)
Labels: Hotlist-GoodFirstBug
This seems like a relatively mechanical cleanup that would be a good first bug.
Hi, I gave this a shot. I've submitted a patch for it (945371).

Thanks.
Project Member

Comment 4 by bugdroid1@chromium.org, Mar 19 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/008fe2b619f03355652b8988c1724f22e342c6b0

commit 008fe2b619f03355652b8988c1724f22e342c6b0
Author: Arman Ghotb <armanghotb@gmail.com>
Date: Mon Mar 19 19:19:53 2018

[bluetooth] modified platform independent tests to always be compiled

Changed platform checks to the gtest standard so incompatible platforms
will still compile but not run.

R=jdoerrie@chromium.org, ortuno@chromium.org, reillyg@chromium.org

Bug: 805274
Change-Id: Iacc11199b792e4637667175cddf85294a23afd98
Reviewed-on: https://chromium-review.googlesource.com/945371
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Commit-Queue: Reilly Grant <reillyg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#544107}
[modify] https://crrev.com/008fe2b619f03355652b8988c1724f22e342c6b0/AUTHORS
[modify] https://crrev.com/008fe2b619f03355652b8988c1724f22e342c6b0/device/bluetooth/bluetooth_adapter_unittest.cc
[modify] https://crrev.com/008fe2b619f03355652b8988c1724f22e342c6b0/device/bluetooth/bluetooth_device_unittest.cc
[modify] https://crrev.com/008fe2b619f03355652b8988c1724f22e342c6b0/device/bluetooth/bluetooth_local_gatt_characteristic_unittest.cc
[modify] https://crrev.com/008fe2b619f03355652b8988c1724f22e342c6b0/device/bluetooth/bluetooth_local_gatt_descriptor_unittest.cc
[modify] https://crrev.com/008fe2b619f03355652b8988c1724f22e342c6b0/device/bluetooth/bluetooth_local_gatt_service_unittest.cc
[modify] https://crrev.com/008fe2b619f03355652b8988c1724f22e342c6b0/device/bluetooth/bluetooth_remote_gatt_characteristic_unittest.cc
[modify] https://crrev.com/008fe2b619f03355652b8988c1724f22e342c6b0/device/bluetooth/bluetooth_remote_gatt_descriptor_unittest.cc
[modify] https://crrev.com/008fe2b619f03355652b8988c1724f22e342c6b0/device/bluetooth/bluetooth_remote_gatt_service_unittest.cc

Sign in to add a comment