Commit 2049e5b8 authored by Vincent Stehlé's avatar Vincent Stehlé
Browse files

README.md: document transformations using filter



Document how the `--filter' option can be somewhat (ab)used to apply
transformations to tests data.
Signed-off-by: Vincent Stehlé's avatarVincent Stehlé <vincent.stehle@arm.com>
parent 55b34617
......@@ -47,6 +47,24 @@ $ ./parser.py --filter "x['result'] == 'FAILURE'" ...
Filtering takes place after the configuration rules, which are described below.
This filtering mechanism can also be (ab)used to transform tests results.
Example command, which adds a "comment" field (and keeps all the tests):
``` {.sh}
$ ./parser.py \
--filter "x.update({'comment': 'Transformed'}) or True" ...
```
Example command, which removes filenames prefixes in the "log" field (and keeps
all the tests):
``` {.sh}
$ ./parser.py \
--filter "x.update({'log': re.sub(r'/.*/', '', x['log'])}) \
or True" ...
```
## Configuration file
It is possible to use a configuration file with command line option `--config
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment