Thanks for the quick response.
Reference files and current test files are generated using the function `test-hdl-process-file-fn`:
This particular xref test compares a list of xref objects gathered from a Verilog file using the following test function:
(cl-defun verilog-ext-test-xref-fn (&key refs type)
(let (ret-val)
(dolist (ref refs (nreverse ret-val))
(push (verilog-ext-xref--find-symbol ref type) ret-val))))
The function `verilog-ext-xref--find-symbol` returns a list of `xref-items` with their respective `xref-file-locations` from a hash-table created previously by parsing the file using tree-sitter.
This list is pretty printed to a file using `pp-29` as `pp-default-function` for compatibility in tests between Emacs 29 and 30.
Use of font-lock to have a list of fontified xref matches is customizable. In this case the files are parsed and `font-lock-ensure` is run. This did not seem to be a problem and the behaviour is the same for versions from 29.1 to 30.1.
I tried to override the existing definitions on `pp.el` and `xref.el` so that all Emacs versions in CI used the same code. However the `snapshot` build still fails.