blob: 1f43e952ef2352937543b0a32a0cb00631c2a1ce (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
|
# Fluoride Bluetooth Tests
This document refers to the tests in the packages/modules/Bluetooth/system/test directory.
The tests are designed to be run when the Android runtime is not running. From a terminal, run:
## Before you run tests
```sh
adb shell stop
```
## After you're done
```sh
adb shell start
```
## Running tests
Then see what options the test script provides:
```sh
./run_unit_tests.sh --help
```
But for the impatient, run specific groups of tests like this:
```sh
./run_unit_tests.sh net_test_bluetooth
```
a single test:
```sh
./run_unit_tests.sh net_test_bluetooth.BluetoothTest.AdapterRepeatedEnableDisable
```
## Sample Output
packages/modules/Bluetooth/system/test$ ./run_unit_tests.sh net_test_bluetooth
--- net_test_bluetooth ---
pushing...
/tbd/aosp-master/out/target/product/bullhead/data/nativetest/n...st_bluetooth: 1 file pushed. 9.2 MB/s (211832 bytes in 0.022s)
running...
Running main() from gtest_main.cc
[==========] Running 11 tests from 2 test cases.
[----------] Global test environment set-up.
[----------] 6 tests from BluetoothTest
[ RUN ] BluetoothTest.AdapterEnableDisable
[ OK ] BluetoothTest.AdapterEnableDisable (2538 ms)
[ RUN ] BluetoothTest.AdapterRepeatedEnableDisable
[ OK ] BluetoothTest.AdapterRepeatedEnableDisable (11384 ms)
[ RUN ] BluetoothTest.AdapterSetGetName
[ OK ] BluetoothTest.AdapterSetGetName (2378 ms)
[ RUN ] BluetoothTest.AdapterStartDiscovery
[ OK ] BluetoothTest.AdapterStartDiscovery (2397 ms)
[ RUN ] BluetoothTest.AdapterCancelDiscovery
[ OK ] BluetoothTest.AdapterCancelDiscovery (2401 ms)
[ RUN ] BluetoothTest.AdapterDisableDuringBonding
[ OK ] BluetoothTest.AdapterDisableDuringBonding (11689 ms)
[----------] 6 tests from BluetoothTest (32789 ms total)
[----------] 5 tests from GattTest
[ RUN ] GattTest.GattClientRegister
[ OK ] GattTest.GattClientRegister (2370 ms)
[ RUN ] GattTest.GattClientScanRemoteDevice
[ OK ] GattTest.GattClientScanRemoteDevice (2273 ms)
[ RUN ] GattTest.GattClientAdvertise
[ OK ] GattTest.GattClientAdvertise (2236 ms)
[ RUN ] GattTest.GattServerRegister
[ OK ] GattTest.GattServerRegister (2391 ms)
[ RUN ] GattTest.GattServerBuild
[ OK ] GattTest.GattServerBuild (2435 ms)
[----------] 5 tests from GattTest (11706 ms total)
[----------] Global test environment tear-down
[==========] 11 tests from 2 test cases ran. (44495 ms total)
[ PASSED ] 11 tests.
## Troubleshooting: Your phone is bricked!
Probably not. See [After you're done](#After-you're-done)
|