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

The lib/tests/tmpdir.hpp setup does not clean up old entires #821

Open
eivindjahren opened this issue Jul 21, 2021 · 3 comments
Open

The lib/tests/tmpdir.hpp setup does not clean up old entires #821

eivindjahren opened this issue Jul 21, 2021 · 3 comments

Comments

@eivindjahren
Copy link
Collaborator

We have ran into a problem on our jenkins instances that tmp is filled up. The tmpdir setup should probably clean up older entries as to not contribute to the problem.

@mortalisk
Copy link
Contributor

Do you mean remove all other folders under ".../ecl_test" that have a creation timestamp older than, say, 1 day?

@eivindjahren
Copy link
Collaborator Author

eivindjahren commented Jul 23, 2021

@mortalisk Should probably do the same thing that pytest does as to not create confusion:

Keep temporary files of runs under /tmp/ecl_test_of_${USER/}. Keep temporary files of at most three runs and name them
/tmp/ecl_test_of_${USER}/ecl_test_${i}/. If you have done 50 test runs as user jenkinsuser it should then have the following folders:

  • /tmp/ecl_test_jenkinsuser/ecl_test_48/
  • /tmp/ecl_test_jenkinsuser/ecl_test_49/
  • /tmp/ecl_test_jenkinsuser/ecl_test_50/

This means tmpdir.hpp should figure out which is the largest and smallest ecl_test_${i}$ in /tmp/ecl_test_${USER} currently, delete the smallest one, create /tmp/ecl_test_jenkinsuser/ecl_test_$[i+1}/ and yield that to the test.

@pinkwah
Copy link
Collaborator

pinkwah commented Aug 9, 2021

You could do it by created timestamp so you don't need to regex or otherwise interpret the numbers.

@eivindjahren eivindjahren changed the title The /lib/tests/tmpdir.hpp setup does not clean up old entires The lib/tests/tmpdir.hpp setup does not clean up old entires Nov 18, 2021
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

No branches or pull requests

3 participants