forked from rjfarmer/mesa-helios-test
-
Notifications
You must be signed in to change notification settings - Fork 1
/
cleanup.sh
40 lines (30 loc) · 1.02 KB
/
cleanup.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/bash
#SBATCH --job-name=cleanup
#SBATCH --nodes=1
#SBATCH --export=ALL
#SBATCH --time=0:20:00
#SBATCH --mail-type=FAIL
# wait a bit for final jobs to finish. there seems to be a race
# condition where the output from the last job to finish isn't on disk
# at the time the cleanup script is executed
sleep 30
cd ${MESA_DIR}
rm -r star/test_suite/*/*LOGS*
rm -r star/test_suite/*/*photo*
rm star/test_suite/*/star
rm star/test_suite/*/*.mod
rm -r binary/test_suite/*/*LOGS*
rm -r binary/test_suite/*/*photo*
rm binary/test_suite/*/binary
rm binary/test_suite/*/*.mod
rm -r astero/test_suite/*/*LOGS*
rm -r astero/test_suite/*/*photo*
rm astero/test_suite/*/star
rm astero/test_suite/*/*.mod
cp --parents star/test_suite/*/*.txt ${OUT_FOLD}
cp --parents binary/test_suite/*/*.txt ${OUT_FOLD}
cp --parents astero/test_suite/*/*.txt ${OUT_FOLD}
cp --parents star/test_suite/*/png/*png ${OUT_FOLD}
echo "test results copied to storage, removing MESA_DIR"
rm -rf $MESA_DIR
echo "MESA_DIR has been removed from scratch, cleanup complete"