Commit e29ab734 authored by Vincent Stehlé's avatar Vincent Stehlé
Browse files

parser.py: clearer dependencies



Make our dependencies a bit clearer in the documentation and in the warning
messages we print from the parser.
Signed-off-by: Vincent Stehlé's avatarVincent Stehlé <vincent.stehle@arm.com>
parent d083dea1
...@@ -9,6 +9,24 @@ It will proceed to generate a Markdown file listing number of failures, passes, ...@@ -9,6 +9,24 @@ It will proceed to generate a Markdown file listing number of failures, passes,
[UEFI SCT]: https://uefi.org/testtools [UEFI SCT]: https://uefi.org/testtools
## Dependencies
You need to install the [PyYAML] module for the configuration file to be loaded
correctly. Depending on your Linux distribution, this might be available as the
`python3-yaml` package.
It is also recommended to install the [packaging] library for smooth version
detection. Depending on your Linux distribution, this might be available as the
`python3-packaging` package.
See [Configuration file].
If you want to generate the pdf version of this documentation or convert
markdown results to HTML, you need to install [pandoc]. See [Usage] and
[Documentation].
[PyYAML]: https://github.com/yaml/pyyaml
[packaging]: https://github.com/pypa/packaging
[pandoc]: https://pandoc.org
## Quick Start ## Quick Start
If you're using this tool to analyze EBBR test results, use the following If you're using this tool to analyze EBBR test results, use the following
...@@ -40,12 +58,14 @@ $ ./parser.py --md out.md ... ...@@ -40,12 +58,14 @@ $ ./parser.py --md out.md ...
An online help is available with the `-h` option. An online help is available with the `-h` option.
The generated `result md` can be easily converted to HTML using `pandoc` with: The generated `result md` can be easily converted to HTML using [pandoc] with:
``` {.sh} ``` {.sh}
$ pandoc -oresult.html result.md $ pandoc -oresult.html result.md
``` ```
See [Dependencies].
### Custom search ### Custom search
For a custom Key:value search, the next two arguments *MUST be included together.* The program will search and display files that met that constraint, without the crosscheck, and display the names, guid, and key:value to the command line. `python3 parser.py <file.ekl> <file.seq> <search key> <search value>` For a custom Key:value search, the next two arguments *MUST be included together.* The program will search and display files that met that constraint, without the crosscheck, and display the names, guid, and key:value to the command line. `python3 parser.py <file.ekl> <file.seq> <search key> <search value>`
...@@ -167,7 +187,7 @@ $ ./parser.py --input-md 'result.md' ... ...@@ -167,7 +187,7 @@ $ ./parser.py --input-md 'result.md' ...
## Configuration file ## Configuration file
By default, the `EBBR.yaml' configuration file is used to process results. It is By default, the `EBBR.yaml` configuration file is used to process results. It is
intended to help triaging failures when testing specifically for [EBBR] intended to help triaging failures when testing specifically for [EBBR]
compliance. It describes operations to perform on the tests results, compliance. It describes operations to perform on the tests results,
such as marking tests as false positives or waiving failures. such as marking tests as false positives or waiving failures.
...@@ -175,10 +195,10 @@ It is possible to specify another configuration file with the command line ...@@ -175,10 +195,10 @@ It is possible to specify another configuration file with the command line
option `--config <filename>`. option `--config <filename>`.
You need to install the [PyYAML] module for the configuration file to be loaded You need to install the [PyYAML] module for the configuration file to be loaded
correctly. correctly, and installing the [packaging] library is recommended. See
[Dependencies].
[EBBR]: https://github.com/ARM-software/ebbr [EBBR]: https://github.com/ARM-software/ebbr
[PyYAML]: https://github.com/yaml/pyyaml
### Configuration file format ### Configuration file format
...@@ -305,8 +325,8 @@ The database filename can be specified with the `--seq-db` option. ...@@ -305,8 +325,8 @@ The database filename can be specified with the `--seq-db` option.
### Documentation ### Documentation
It is possible to convert this `README.md` into `README.pdf` with pandoc using It is possible to convert this `README.md` into `README.pdf` with [pandoc] using
`make doc`. See `make help`. `make doc`. See `make help` and [Dependencies].
### Sanity checks ### Sanity checks
......
...@@ -14,12 +14,14 @@ import os ...@@ -14,12 +14,14 @@ import os
try: try:
from packaging import version from packaging import version
except ImportError: except ImportError:
print('No packaging...') print('No packaging. You should install python3-packaging...')
try: try:
import yaml import yaml
except ImportError: except ImportError:
print('No yaml...') print(
'No yaml. You should install PyYAML/python3-yaml for configuration'
' file support...')
if 'yaml' in sys.modules: if 'yaml' in sys.modules:
try: try:
......
Markdown is supported
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