-
Notifications
You must be signed in to change notification settings - Fork 0
Modified daqsystemtest_integtest_bundle.sh so that it makes copies of pytest directories for failed tests #277
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
… the logfile directories for failed tests.
wesketchum
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I followed the instructions and saw the failed test directories get created. I additionally ran a test with some passing/some failing, and saw the behavior I would expect (passing tests logs as they have been, failing test logs get copied).
The one minor thing is that I see some of the symbolic links for configcurrent and runcurrent are pointing to the original pytest dir (not the copied one), so at some point they may become invalid, but I think that's ok as those aren't relevant when doing historical review of tests. We could consider not copying or removing those soft links just to avoid any potential confusion.
|
Good idea. I've added a couple of lines that remove the symbolic links in the copied directory. |
|
Hi @bieryAtFnal, -> Bash script:
and more.
-> Python:
As mentioned, none of this is needed but suggestions for improvements if you like them. |
…_integtest_bundle.sh
… of the 'mapfile' command, as suggested by Michal.
|
I believe that I have implemented all of the suggestions from @MRiganSUSX ... |
Description
This change is correlated with DUNE-DAQ/integrationtest#138.
In recent discussions about improvements that people would like to see in the available regression tests, it was mentioned that it would be helpful if the log files, etc. from failed tests did not disappear as quickly as they sometimes do.
We looked into options that are available with pytest, but it didn't seem possible to save directories from failed tests longer than ones from successful tests.
So, we have added logic to our "bundle" scripts to do this. (initially, just the
daqsystemtestbundle script)The complication with doing that, is that it is not obvious how to get a run of the pytest program to return the name of the current pytest subdirectory (e.g.
/tmp/pytest-of-${USER}/pytest-1234).One idea was to have the
integrationtestinfrastructure code print the pytest output directory name to the console, capture that in the bundle script, etc. Unfortunately, that wouldn't work when we have the--concise-outputoption enabled in the bundle script (the purpose of that option is to suppress the console output).The idea that I implemented was to have the bundle script pass some unique keys to the
integrationtestinfrastructure, have theintegrationtestinfrastructure write that information to a file in the pytest output directory, and have the bundle script look for a file with the relevant keys to find which pytest subdir corresponds to the most recent test.Once the bundle script knows the correct pytest output directory, it is easy to make a copy of it.
The bundle script also now has logic to clean up old "failed" pytest output dirs (older than 26 hours or more than 10 failed directories).
Here are suggested steps for testing these changes. These steps locally modified the
readout_type_scan_testso that it often/always fails, and with that, we can see the creation of "failed" pytest output directories happening.Type of change
Testing checklist
pytest -s minimal_system_quick_test.py)daqsystemtest_integtest_bundle.sh)Further checks