Skip to content

Fix #5524: automatically export new COCOTB_ prefixes variables in...#5527

Open
mattiagaggi wants to merge 1 commit intococotb:masterfrom
mattiagaggi:fix/issue-5524-automatically-export-new-cocotb-prefixes-variables
Open

Fix #5524: automatically export new COCOTB_ prefixes variables in...#5527
mattiagaggi wants to merge 1 commit intococotb:masterfrom
mattiagaggi:fix/issue-5524-automatically-export-new-cocotb-prefixes-variables

Conversation

@mattiagaggi
Copy link
Copy Markdown

Summary

Centralize the export of COCOTB_-prefixed environment variables in Makefile.inc instead of repeating inline VAR=value prefixes on every simulator's command line. This reduces duplication across all 13 simulator Makefiles and ensures new COCOTB_ variables are automatically available to subprocesses.

Changes

  • Add deprecation-aware fallbacks for COCOTB_TEST_MODULES (from MODULE) and COCOTB_TESTCASE (from TESTCASE) in Makefile.deprecations, matching the existing pattern for COCOTB_TOPLEVEL/TOPLEVEL
  • Export COCOTB_TEST_MODULES, COCOTB_TESTCASE, COCOTB_TEST_FILTER, COCOTB_TOPLEVEL, TOPLEVEL_LANG, and GPI_EXTRA centrally in Makefile.inc
  • Remove redundant inline environment variable assignments from all simulator Makefiles: activehdl, cvc, dsim, ghdl, icarus, ius, nvc, questa-compat, questa-qisqrun, riviera, vcs, verilator, xcelium

Testing

  • Run the existing test suite against multiple simulators (e.g. Icarus, Verilator, GHDL) to confirm COCOTB_TEST_MODULES, COCOTB_TESTCASE, COCOTB_TEST_FILTER, and COCOTB_TOPLEVEL propagate correctly
  • Verify deprecated variable names (MODULE, TESTCASE, TOPLEVEL) still work and trigger deprecation warnings
  • Verify make COCOTB_TEST_FILTER=test_foo sim filters tests as expected
  • Confirm no behavioral change for users already using the COCOTB_-prefixed variables

Closes #5524

…s in Makefiles

In Makefile.inc, add export statements for COCOTB_TEST_MODULES, COCOTB_TESTCASE, COCOTB_TEST_FILTER, COCOTB_TOPLEVEL, and TOPLEVEL_LANG (applying the deprecation fallback logic before exporting). Then remove the redundant inline VAR=value environment variable prefixes from every simulator Makefile's run command lines, since the exported variables will already be in the environment.
@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines:
2 pipeline(s) were filtered out due to trigger conditions.

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.

automatically export new COCOTB_ prefixes variables in Makefiles

2 participants