-
Notifications
You must be signed in to change notification settings - Fork 12
tests: get rid of absolute paths and add usage of temp directory to store test artifacts when needed #351
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
… directory for the artifacts
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.
Changes look good to me. This should solve #334.
scripts/wasmtestreport.py
Outdated
except FileNotFoundError: | ||
pass | ||
|
||
# Remove artifacts directory if it was temp and not requested to keep |
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.
If the script crashes between creating the temp and here, will this linger?
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.
Have handled script crashing issues by encompassing the cleanup logic in the finally block.
# Prepare artifacts root | ||
created_temp_dir = False | ||
if artifacts_dir_arg: | ||
artifacts_root = artifacts_dir_arg.resolve() |
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.
if the artifacts dir is requested but not writable, this will behave unexpectedly. Perhaps a try/except would help on it to make sure?
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.
Have added a test for writability and have enclosed directory creation with try/except blocks
parser.add_argument("--testfiles", type=Path, nargs = "+", help="Run one or more specific test files") | ||
parser.add_argument("--debug", action="store_true", help="Enable detailed stdout/stderr output for subprocesses") | ||
parser.add_argument("--artifacts-dir", type=Path, help="Directory to store build artifacts (default: temp dir)") | ||
parser.add_argument("--keep-artifacts", action="store_true", help="Keep artifacts directory after run for troubleshooting") |
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.
It seems to me that clean-results and keep-artifacts are mutually exclusive, conceptually, but there's nothing that prevents a user from asking for both right now.
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.
Have added a check so that the user does not provide contradictory flags.
The Store counters by machine keys (e.g. number_of_Lind_wasm_Timeout) created in get_empty_result(), but the HTML loops use the labels from error_types: |
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.
My concerns look to have been addressed, looks good to me
Reference issue: Link
This PR takes care of some of the issues listed in Issue 291
Removed Absolute Paths
Test artifacts can now be retained in a specific directory of your choice / default temp directory