[tools 2/2] winetest/cron: Optionally purge the really old test results.
Francois Gouget
fgouget at codeweavers.com
Thu Apr 8 08:29:45 CDT 2021
Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
---
Why are we keeping the old results forever?
This results in a pretty high disk usage on winehq:
data 27GB
old-data/<dirs> 18GB
old-data/*.bz2 62GB with the oldest build being from 2007
On my server I intend to use something like this:
build_compress=60
build_expire=90
Actually we may as well compress the files directly in build-index while
moving them to old-data.
---
winetest/winetest.cron | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/winetest/winetest.cron b/winetest/winetest.cron
index df27116a3..d7f0344e2 100755
--- a/winetest/winetest.cron
+++ b/winetest/winetest.cron
@@ -19,6 +19,7 @@
# Leave empty to disable the corresponding task
build_compress=120 # days before compressing old-data builds
+build_expire= # days before deleting old-data builds
winetest_expire=120 # days before deleting winetest binaries
queue_expire=30 # days before deleting queued reports
@@ -84,6 +85,15 @@ then
rm -rf "$dir"
fi )
+ # remove old build reports
+ if [ -n "$build_expire" ]
+ then (
+ set -e
+ cd old-data
+ find . -mtime "+$build_expire" -name "*.tar.*" -print0 | \
+ xargs -0 rm -f
+ fi )
+
# remove old winetest binaries
if [ -n "$winetest_expire" ]
then (
--
2.20.1
More information about the wine-devel
mailing list