Skip to content

Commit d413185

Browse files
committed
README: clarify optional report dependencies
Separate core deps from report generation and add Report Generation section. Signed-off-by: Richard Alpe <[email protected]>
1 parent 9ff8b7b commit d413185

File tree

2 files changed

+47
-10
lines changed

2 files changed

+47
-10
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ help:
1616
@echo "Available targets:"
1717
@echo " check - Run self-tests to verify 9pm functionality"
1818
@echo " test - Run unit tests with cmdl-supplied option"
19-
@echo " report - Generate PDF report from last test results"
19+
@echo " report - Generate all reports (markdown, asciidoc, PDF) from JSON"
2020
@echo " help - Show this help message"
2121
@echo
2222
@echo "Variables:"

README.md

Lines changed: 46 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
- **Color-Coded Terminal Output**: Easily identify test statuses with intuitive colors.
1313
- **"On-Fail" Logic**: Define custom actions for failed tests to improve debugging.
1414
- **Masked Failures**: Optionally ignore specific test failures or skips without halting the suite.
15-
- **Rich Reporting**: Generate markdown summaries for easy sharing and tracking.
15+
- **JSON Export**: Export comprehensive test results in JSON format for further processing.
1616
- **Isolated Environment**: Use temporary directories and files for scratch area. Ensuring nothing is left after test execution, even if the test itself crashes.
1717

1818
---
@@ -24,15 +24,13 @@
2424
git clone <repository-url>
2525
cd 9pm
2626
```
27-
2. Install dependencies:
27+
2. Install core dependencies:
2828
```bash
2929
pip install pyyaml
30-
gem install --user-install asciidoctor-pdf rouge
3130
```
3231

3332
> [!NOTE]
34-
> On Debian/Ubuntu systems you can use standard packages for the requirements:
35-
> `sudo apt install python3-yaml ruby-asciidoctor-pdf ruby-rouge`
33+
> This is all you need to run tests and export JSON results. For report generation, see the [Report Generation](#report-generation) section below.
3634
3735
---
3836

@@ -111,12 +109,51 @@ o Execution
111109
`-- o 0002-upload-os.sh
112110
```
113111

114-
## Test Results
112+
## Report Generation
115113

116-
9pm generates detailed reports:
114+
9pm exports test results as JSON by default. Additional report formats can be generated using the `report.py` tool.
117115

118-
1. **Human-Readable Markdown**: `result.md`
119-
2. **GitHub-Compatible Markdown**: `result-gh.md`
116+
### JSON Export (Always Available)
117+
118+
Every test run generates a comprehensive `result.json` file containing:
119+
- Test metadata and timestamps
120+
- Complete hierarchical test structure
121+
- Embedded test output logs
122+
- Summary statistics
123+
124+
### Optional Report Formats
125+
126+
Install additional dependencies for report generation:
127+
128+
```bash
129+
# For PDF reports
130+
gem install --user-install asciidoctor-pdf rouge
131+
132+
# On Debian/Ubuntu
133+
sudo apt install ruby-asciidoctor-pdf ruby-rouge
134+
```
135+
136+
Generate reports from JSON:
137+
138+
```bash
139+
# Generate specific format
140+
python3 report.py result.json github # -> result-gh.md
141+
python3 report.py result.json markdown # -> result.md
142+
python3 report.py result.json asciidoc # -> report.adoc
143+
144+
# Generate all formats
145+
python3 report.py result.json all
146+
147+
# Generate PDF from AsciiDoc
148+
make report # Generates report.pdf
149+
```
150+
151+
### Report Formats
152+
153+
1. **GitHub Markdown** (`result-gh.md`): GitHub-compatible with emoji status indicators
154+
2. **Plain Markdown** (`result.md`): Simple markdown format
155+
3. **AsciiDoc** (`report.adoc`): Comprehensive report with embedded test logs
156+
4. **PDF** (`report.pdf`): Professional report generated from AsciiDoc
120157

121158
### GitHub Emoji Legend
122159

0 commit comments

Comments
 (0)