verification/rvgen: Restructure the templates files
authorNam Cao <namcao@linutronix.de>
Fri, 4 Jul 2025 13:20:03 +0000 (15:20 +0200)
committerSteven Rostedt (Google) <rostedt@goodmis.org>
Thu, 24 Jul 2025 14:42:46 +0000 (10:42 -0400)
commitccb21fc879636f9197b29908895174218e11d8ef
tree9f4f4161ff5018f733848e3351029df65a08ec55
parentf40a7c060207090f41998025fcd1cfad06ea2780
verification/rvgen: Restructure the templates files

To simply the scripts and to allow easy integration of new monitor types,
restructure the template files as followed:

1. Move the template files to be in the same directory as the rvgen
   package. Furthermore, the installation will now only install the
   templates to the package directory, not /usr/share/. This simplify
   templates reading, as the scripts do not need to find the templates at
   multiple places.

2. Move dot2k_templates/* to:
     - templates/dot2k/
     - templates/container/

   This allows sharing templates reading code between DA monitor generation
   and container generation (and any future generation type).

   For template files which can be shared between different generation
   types, support putting them in templates/

This restructure aligns with the recommendation from:
https://python-packaging.readthedocs.io/en/latest/non-code-files.html

Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Link: https://lore.kernel.org/462d90273f96804d3ba850474877d5f727031258.1751634289.git.namcao@linutronix.de
Reviewed-by: Gabriele Monaco <gmonaco@redhat.com>
Signed-off-by: Nam Cao <namcao@linutronix.de>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
14 files changed:
tools/verification/rvgen/Makefile
tools/verification/rvgen/dot2k_templates/Kconfig [deleted file]
tools/verification/rvgen/dot2k_templates/Kconfig_container [deleted file]
tools/verification/rvgen/dot2k_templates/main.c [deleted file]
tools/verification/rvgen/dot2k_templates/main_container.c [deleted file]
tools/verification/rvgen/dot2k_templates/main_container.h [deleted file]
tools/verification/rvgen/dot2k_templates/trace.h [deleted file]
tools/verification/rvgen/rvgen/dot2k.py
tools/verification/rvgen/rvgen/templates/Kconfig [new file with mode: 0644]
tools/verification/rvgen/rvgen/templates/container/Kconfig [new file with mode: 0644]
tools/verification/rvgen/rvgen/templates/container/main.c [new file with mode: 0644]
tools/verification/rvgen/rvgen/templates/container/main.h [new file with mode: 0644]
tools/verification/rvgen/rvgen/templates/dot2k/main.c [new file with mode: 0644]
tools/verification/rvgen/rvgen/templates/dot2k/trace.h [new file with mode: 0644]