-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbulk_test.sh
More file actions
executable file
·28 lines (26 loc) · 874 Bytes
/
bulk_test.sh
File metadata and controls
executable file
·28 lines (26 loc) · 874 Bytes
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
#! /bin/bash
source ./venv/bin/activate
files=$(ls -1 ./test_settings | wc -l)
counter=1
for i in $( ls ./test_settings ) ; do
echo Processing settings: $counter/$files >> times.log
out_file=$(echo $i | sed -e "s/\.py//g")
echo $out_file >> times.log
start_time=$(date +%s%N)
rm ./database/greek_texts.db
rm -r ./__pycache__
mv ./test_settings/$i ./settings.py
python setup.py
python load_dir.py ./test_texts
python compare_all.py
python dump_comparisons.py ./test_results/$out_file.csv
counter=$((counter+1))
elapsed_time=$(($(date +%s%N)-start_time))
seconds=$((elapsed_time/1000000000))
hours=$(( seconds / 3600 ))
minutes=$(( ( seconds / 60 ) % 60 ))
secs=$(( seconds % 60 ))
printf " %02d:%02d:%02d\n" $hours $minutes $secs >> times.log
echo 'Ctrl+c now to exit script.'
sleep 5s
done