forked from moodlehq/moodle-performance-comparison
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathclean_data.sh
executable file
·42 lines (34 loc) · 888 Bytes
/
clean_data.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
41
42
#!/bin/bash
#
# Cleans all test results data
#
# Data generated by test runs can become huge
# this script gets rid of all previous results.
#
##############################################
# Exit on errors.
set -e
# Dependencies.
. ./lib/lib.sh
# Get config.
load_properties "defaults.properties"
load_properties "webserver_config.properties"
delete_files "runs/*.php"
delete_files "runs_samples/*.jtl"
delete_files "runs_outputs/*.output"
delete_files "logs/*.log"
# Also backups.
delete_files "$backupsdir/*"
# Delete compare files.
if [ -f "moodle/site_data.properties" ]; then
delete_files "moodle/site_data.properties" 1
fi
if [ -f "test_files.properties" ]; then
delete_files "test_files.properties" 1
fi
outputinfo="
#######################################################################
Runs results and backups deleted successfully.
"
echo "$outputinfo"
exit 0