Add --with-cassini-csr_defs option #10
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This MR updates the build and runtime handling of the
csr_defs.json
file used byutils/cxi_dump_csrs.py
. It replaces hardcoded paths with a configuration-time option (--with-cassini-csr_defs
) and an environment variable (CASSINI_CSR_DEFS
) to locate the file at runtime.The previous fallback (
../cassini-headers/install/share/cassini-headers/csr_defs.json
) has been removed, as it was non-functional in most environments. This fallback is now replaced with a clear runtime error and guidance to set the appropriate path via--with-cassini-csr_defs
orCASSINI_CSR_DEFS
when needed.This makes the build process more portable, removes the need for manual patching, and improves integration with systems like Spack or site-specific builds.
This PR fixes an existing defect related to hardcoded, non-relocatable file paths.
Design Documents
Related JIRAs
Risk
LOW
This change only affects how
utils/cxi_dump_csrs.py
locates thecsr_defs.json
file. The script now uses the--with-cassini-csr_defs
option (set at configure time) to determine the file path. If neither is provided, the script defaults to/usr/share/cassini-headers/csr_defs.json
.Tests
Locally tested with:
--with-cassini-csr_defs
) to verify fallback still works.--with-cassini-csr_defs
to verify value is used.utils/cxi_dump_csrs.h
.