Skip to content

Fix the extra nodename in diag file + Unit tests restructuring

Andrii Salnikov requested to merge andrii/arc:fix-diag-nodename into master

Fix the extra nodename in diag file

For LRMS backends that handles writting nodenames to diag using LRMS-specific logic the common part that takes it from hostname -f still works and adds extra hostname.

This end up as +1 node in accounting records.

This changeset fixes this bug.

Unit tests restructuring

Current unit tests implementation for backend scripts relies on the hardcoded patches all over the units. Patches are bounded to the jobscript content hardcoded.

When generated jobscript is changed (like in this case) it becomes a nightmare to recreate 30+ patches by hand and edit the content of all unit tests to put new patches code inside.

Instead of doing this nightmare copy-paste job I had restructured the framework to:

  • have this patches as a separate files for easy maintaining (yes, it was a one-time nightmare job too)
  • unit tests framework now writes the new patches automatically for failed tests: so all you need to do is to review the generated patch and if it is OK - replace the old one.

P.S. Don't ask me to split this MR into 2 separated. If you really want it - you can practicing copy-and-paste work for 3 hours by yourself :-)

Edited by Maiken

Merge request reports

Loading