2018-10-31 17:03:21 +00:00
|
|
|
# rust2rpm
|
|
|
|
|
2022-04-27 09:21:54 +00:00
|
|
|
rust2rpm is a tool for automatically generating RPM spec files for Rust crates.
|
2018-10-31 17:03:21 +00:00
|
|
|
|
2023-10-09 20:18:40 +00:00
|
|
|
## Testing
|
2022-04-27 09:21:54 +00:00
|
|
|
|
2023-10-09 20:18:40 +00:00
|
|
|
### tox
|
2022-04-27 09:21:54 +00:00
|
|
|
|
2023-10-09 20:18:40 +00:00
|
|
|
Invoking `tox` will automatically run the test suite for all supported versions
|
|
|
|
of Python. `tox -- -vv` can be used to show very verbose output from pytest.
|
2022-04-27 09:21:54 +00:00
|
|
|
|
2023-10-10 00:54:06 +00:00
|
|
|
The tox configuration also includes environments for running `mypy` (static
|
|
|
|
analysis) and `coverage` (running tests and writing a test coverage report
|
|
|
|
in HTML format).
|
|
|
|
|
2023-10-09 20:18:40 +00:00
|
|
|
### pytest
|
2018-10-31 17:03:21 +00:00
|
|
|
|
2023-10-09 20:18:40 +00:00
|
|
|
The tests can also be run manually in a virtualenv:
|
2018-10-31 17:03:21 +00:00
|
|
|
|
2023-10-09 20:18:40 +00:00
|
|
|
```shell
|
|
|
|
python3 -m venv venv
|
|
|
|
source venv/bin/activate
|
|
|
|
pip install -r requirements.txt pytest
|
|
|
|
PYTHONPATH=. python3 -m pytest -vv
|
|
|
|
deactivate
|
2018-10-31 17:03:21 +00:00
|
|
|
```
|
2022-04-27 09:21:54 +00:00
|
|
|
|
2023-10-09 20:18:40 +00:00
|
|
|
The `UPDATE_FIXTURES=1` environment variable can be set to rewrite the test
|
|
|
|
fixtures for expected (!) changes in the spec file generator.
|
2022-07-21 11:11:13 +00:00
|
|
|
|
2023-10-09 20:18:40 +00:00
|
|
|
## Documentation
|
2022-07-23 17:28:37 +00:00
|
|
|
|
2023-10-09 20:18:40 +00:00
|
|
|
Documentation for rust2rpm and its configuration file formats is available in
|
2023-10-10 00:54:06 +00:00
|
|
|
the `docs/` directory in AsciiDoc format. The included build script can be used
|
|
|
|
to build man pages from the AsciiDoc sources with asciidoctor.
|