This repository was archived by the owner on Dec 4, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathtest.sh
More file actions
executable file
·51 lines (35 loc) · 1.34 KB
/
test.sh
File metadata and controls
executable file
·51 lines (35 loc) · 1.34 KB
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
43
44
45
46
47
48
49
50
51
#!/bin/sh
# cleanup the runtimes file
echo "Runtime of RevBayes tutorials in seconds:" > runtime.txt
echo "Number of wrong results:" > Test_results.txt
# Let us go through all tutorial directories
for d in */ ; do
# check if there is a scripts directory
if [ -d "$d/scripts" ]; then
# we need to go into the directory
cd $d
# print the name of the directory into our output
echo "$d" >> ../Test_results.txt
echo "$d" >> ../runtime.txt
# now go through all the tutorial scripts
for s in scripts/*.Rev ; do
# get the current time for checking the runtime
date1=$(date +"%s")
# now run RevBayes
rb ../seed.Rev $s
# check how long the run took
date2=$(date +"%s")
diff=$(($date2-$date1))
echo "$s -- $diff" >> ../runtime.txt
echo " $s" >> ../Test_results.txt
# now also check the difference in the results
# for f in output/*.Rev ; do
# diff -I '#.*' ../expected_output/$d/$f output/$f | wc -l >> ../Test_results.txt
# done
# cleaning up
# rm -rf output
done
cd ..
echo "$d"
fi
done