Skip to content
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

clear files created in tmp after test runs #528

Merged
merged 8 commits into from
Jun 10, 2024

Conversation

pretendWhale
Copy link
Contributor

In some cases, the autotester will create files in /tmp during test runs. Currently these are not automatically removed, leading to issues when /tmp becomes full. This PR adds a cleanup of the /tmp directory during test teardown. All files and directories belonging to the current user will be removed at the end of tests.

@@ -257,9 +257,13 @@ def _clear_working_directory(tests_path: str, test_username: str) -> None:
if test_username != getpass.getuser():
sticky_cmd = f"sudo -u {test_username} -- bash -c 'chmod -Rf -t {tests_path}'"
chmod_cmd = f"sudo -u {test_username} -- bash -c 'chmod -Rf ugo+rwX {tests_path}'"
clean_tmp_cmd = (
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is good, just make sure to update the function docstring to note this additional action.

@david-yz-liu david-yz-liu merged commit 16dcb8c into MarkUsProject:master Jun 10, 2024
13 checks passed
@pretendWhale pretendWhale added this to the v2.4.4 milestone Jun 10, 2024
pretendWhale added a commit to pretendWhale/markus-autotesting that referenced this pull request Jul 2, 2024
* ensure users are added in GitHub Actions test configuration
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants