2017-06-22 19:23:11 -07:00
|
|
|
# incidentd
|
|
|
|
|
|
|
|
## How to build, deploy, unit test
|
|
|
|
|
|
|
|
For the first time, build the test and create an empty directly on device:
|
|
|
|
|
|
|
|
```
|
2017-11-13 21:06:26 -08:00
|
|
|
root$ make -j incidentd_test && adb shell mkdir /data/nativetest/incidentd_test
|
2017-06-22 19:23:11 -07:00
|
|
|
```
|
|
|
|
|
2017-11-13 21:06:26 -08:00
|
|
|
Run the test on a device manually
|
2017-06-22 19:23:11 -07:00
|
|
|
|
|
|
|
```
|
|
|
|
root$ mmm -j frameworks/base/cmds/incidentd && \
|
2018-01-10 16:50:59 -08:00
|
|
|
adb push $OUT/data/nativetest/incidentd_test/* /data/nativetest/ && \
|
|
|
|
adb shell /data/nativetest/incidentd_test 2>/dev/null
|
2017-06-22 19:23:11 -07:00
|
|
|
```
|
2017-11-13 21:06:26 -08:00
|
|
|
|
|
|
|
Run the test via AndroidTest.xml
|
|
|
|
|
|
|
|
```
|
|
|
|
root$ atest incidentd_test
|
2018-02-01 15:17:04 -08:00
|
|
|
```
|
|
|
|
|
|
|
|
Use clang-format to style the file
|
|
|
|
|
|
|
|
clang-format -style=file -i <file list>
|