File tree Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ # removes log dirs where only one test was run
3
+ # because those are considered tests that are not interesting anymore
4
+
5
+ # Root directory containing the timestamp folders
6
+ ROOT_DIR=" ."
7
+
8
+ # Loop through each main folder
9
+ for dir in " $ROOT_DIR " /* /* ; do
10
+ # Check if it exists and is a directory
11
+ [ -d " $dir " ] || continue
12
+
13
+ # Count the number of subdirectories (ignoring files)
14
+ subdirs=($( find " $dir " -mindepth 1 -maxdepth 1 -type d) )
15
+ if [ ${# subdirs[@]} -le 1 ]; then
16
+ # delete test type dirs
17
+ rm -r " $dir "
18
+ fi
19
+ parent_dir=$( dirname $dir )
20
+ subdirs=($( find " $parent_dir " -mindepth 1 -maxdepth 1 -type d) )
21
+ if [ ${# subdirs[@]} -eq 0 ]; then
22
+ # delete parent folder
23
+ rm " ${parent_dir} /report.html"
24
+ rmdir " ${parent_dir} "
25
+ fi
26
+ done
27
+
28
+ #
29
+ for dir in " ${ROOT_DIR} " /* ; do
30
+ [ -d " ${dir} " ] || continue
31
+
32
+ subdirs=($( find " $dir " -mindepth 1 -maxdepth 1 -type d) )
33
+ if [ ${# subdirs[@]} -eq 0 ]; then
34
+ # delete parent folder
35
+ rm " ${dir} /report.html"
36
+ rmdir " ${dir} "
37
+ fi
38
+ done
You can’t perform that action at this time.
0 commit comments