pavilion2 icon indicating copy to clipboard operation
pavilion2 copied to clipboard

Added -f and --follow option to pav log command.

Open smehta99 opened this issue 2 years ago • 2 comments

Usage: pav log -f/--follow <log_type> <test_id>

example: pav log -f build 72

smehta99 avatar Oct 25 '22 16:10 smehta99

You also need to make a unit test for this. I would:

  • Add a 'FOLLOW_TEST' class variable, defaulted to false.
  • Exit the follow loop after successfully reading data when FOLLOW_TEST is true.
  • In the unit test:
    • Set the follow sleep time to really short (0.1)
    • Set FOLLOW_TEST to True
    • Create a pav test that prints some stuff in test test run and run it.
    • Grab the log command, and use the silence() method on it.
    • Use threading to background the call to the log.run method.
    • Wait 0.2 seconds
    • Append something to the log.
    • Wait for the log.run thread to finish.
    • Check that the thing you appended is in the command output.

Let's work on this in the Pavilion meeting today as a group.

Paul-Ferrell avatar Oct 27 '22 15:10 Paul-Ferrell

There is a bug where where build hash log doesn't change from the previous run and ends up not finding the new hash. I will fix it when I return.

smehta99 avatar Nov 22 '22 17:11 smehta99