-
Notifications
You must be signed in to change notification settings - Fork 19
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
nightly test polish #1665
nightly test polish #1665
Conversation
tools/hammer_loop.sh
Outdated
rm -r "$REGION_ROOT"/8810 | ||
rm -r "$REGION_ROOT"/8820 | ||
rm -r "$REGION_ROOT"/8830 | ||
# If empty, remove the region directory |
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.
Are there cases where this wouldn't be empty? If not, should we do rm -r "$REGION_ROOT"
versus deleting region dirs individually?
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.
So, what I want here was something I don't think this is going to give me, and you are
right to call out what this half measure was doing.
What I want is for the caller to be able to supply a directory and have this (and any
other tests) use that directory as a place where the regions are created.
The problem arises if that directory is not empty. I don't want this test to blindly
destroy whatever exists. My half measure was to only remove directories that I
knew this tests created.
However, I now think a better solution is to, like we do with TEST_ROOT
, is to create
a specific subdirectory inside REGION_ROOT
, and put all region directories inside that.
This way I can always remove $REGION_ROOT/<my_test_unique_subdir>
and not have
to care what is in that directory, or even know what exact directories exist inside it, which
will be a problem when I make these tests have multiple region sets.
I'll refactor this and all the places where we use REGION_ROOT
tools/hammer_loop.sh
Outdated
@@ -42,7 +42,7 @@ else | |||
rm -r "$TEST_ROOT" | |||
fi | |||
REGION_ROOT=${REGION_ROOT:-/var/tmp} | |||
MY_REGION_ROOT=${REGION_ROOT/hammer_loop} |
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.
This is wrong, and should be MY_REGION_ROOT=${REGION_ROOT}/hammer_loop
Should be fixed in newer commits.
Updates to the nightly tests and the tests it calls.
All the nightly tests have their own named directory for test logs
This makes cleanup at the end easier.
In all tests, dsc now logs to this or a specified directory.
All the nightly tests now have a
REGION_ROOT
, and this is where dsc or the crucible downstairs will create region directories. This makes it easier for the caller to direct the tests to use a specific location instead of everyone piling in to/var/tmp
If a test finishes without error, it will clean up logs and regions that were created as part of the test. If there is an error, then we leave things behind. We clean up the contents of
REGION_ROOT
but only what each test creates itself.Updated
tools/test_nightly.sh
to print the name of the test it is running, and just cleaned up the output a bit.