• Home
  • History
  • Annotate
  • only in /external/parameter-framework/upstream/tools/coverage/
NameDateSize

..10-Aug-20184 KiB

aplog2coverage.sh10-Aug-20184.2 KiB

coverage.py10-Aug-201834.9 KiB

coverage.xsl10-Aug-201810.5 KiB

README.md10-Aug-20181.9 KiB

README.md

1# Domain coverage report
2
3## Introduction
4
5During the PFW's life cycle, criteria states are changed and configurations are
6applied.
7
8This report gives the coverage for :
9
10- Criterion: detect easily which criterion state aren't used.
11- Configuration: detect configuration that are never applied.
12- Configuration rule: part of the rules that are useless and could be removed.
13- Total average coverage
14
15Two things are needed to generate a coverage report:
16
171. The Settings file
182. parameter-framework logs
19
20## How to get the Settings file
21
22Usually, you have this file at hand.  But if getting the Settings file is
23painful, you may use remote-process to print it:
24
25    remote-process <host> <port> getDomainsWithSettingsXML > domains.xml
26
27## How to get PFW logs
28
29You must get the logs from the start of the parameter-framework.
30
31On Android, you should stop the process instantiating the parameter-framework,
32clear the logs, start the process and get the logs using logcat.  E.g:
33
34    $ adb shell stop your_process
35    $ adb logcat -c
36    $ adb logcat > coverage.log &
37    $ adb shell start your_process
38    ... do your testing ...
39    kill the background logcat started above
40
41## How to generate the report
42
43Then execute :
44
45    $ aplog2coverage.sh -d domains.xml -e<some_regex> coverage.log -o coverageReport.html
46
47You may pass several log files.
48
49The regex (-e argument) is used to match relevant log lines: If you have
50several PFW instances running, you need to have a way to tell which instance is
51logging each line.  Besides, if accelerates the parsing by eliminating
52irrelevant log lines.
53
54You may pass the optional `-f` argument to ignore some parse errors.
55
56### Limitations
57
58- Having more than one dot (".") in log paths is not supported (see the sort
59  implementation (sort -rn -k2 -t.) in aplog2coverage.sh).
60- A PFW start log line must be at the head of the oldest log: no
61  applyconfiguration or set criterion log should be found before the PFW start.
62