Modified daqsystemtest_integtest_bundle.sh so that it makes copies of pytest directories for failed tests #277
+86
−6
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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