Skip to content

Git reporting fixes#238

Merged
machshev merged 2 commits into
lowRISC:masterfrom
hcallahan-lowrisc:git_reporting_fixes
Jul 22, 2026
Merged

Git reporting fixes#238
machshev merged 2 commits into
lowRISC:masterfrom
hcallahan-lowrisc:git_reporting_fixes

Conversation

@hcallahan-lowrisc

@hcallahan-lowrisc hcallahan-lowrisc commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Description

Fixes one minor papercut (for me), and adds a small reporting feature

  • Don't crash so ungracefully when a remote named exactly 'origin' is not present (the report is not generated)
  • Print "(dirty)" next to the sha in the report to denote if changes were present when this job was run

Checklist

  • All commits are signed off (git commit -s), indicating acceptance of the CLA
  • Commit messages follow the conventional commit format (<type>[(<scope>)][!]: <description>)
    • The commit type correctly reflects the semver impact of the change
    • Breaking changes are marked with ! or a BREAKING CHANGE: footer
  • New behaviour is covered by tests

Previously, gen_results() would crash with ValueError from GitPython when the
project checkout had no remote named 'origin'.
This only affected developer clones — CI checkouts always have 'origin' pointing
at the canonical upstream — but the crash discarded the entire report after the
simulation had already run.

The Markdown revision line falls back to a plain commit-sha string with no link
if a remote named 'origin' is not present.

Signed-off-by: Harry Callahan <[email protected]>
The revision URL in a report points at a specific commit sha, but if the working
tree had modifications when the simulation ran, that sha misrepresents the code
that was actually tested.
Append " (dirty)" to the revision line to make this explicit.

The dirty state is captured at flow init time (alongside self.commit) so it
reflects the checkout when the sim started, not when the report was generated.
The suffix is applied on top of both dvsim's own revision formatting and any
string supplied via revision_info from downstream HJSON (e.g. OpenTitan's
common_project_cfg.hjson), and is idempotent so downstream revision commands can
add their own marker without producing a doubled suffix.

Signed-off-by: Harry Callahan <[email protected]>

@machshev machshev left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@machshev
machshev added this pull request to the merge queue Jul 22, 2026
Merged via the queue into lowRISC:master with commit 8cad555 Jul 22, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants