-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathrun-all.sh
executable file
·53 lines (42 loc) · 1.61 KB
/
run-all.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
43
44
45
46
47
48
49
50
51
52
#!/bin/bash
export LC_NUMERIC=C
bench="math"
function sypet-logo {
echo "$(tput setaf 4) ____ ___ __ $(tput sgr 0)"
echo "$(tput setaf 4) / __/_ __/ _ \___ / /_$(tput sgr 0)"
echo "$(tput setaf 4) _\ \/ // / ___/ -_) __/$(tput sgr 0)"
echo "$(tput setaf 4) /___/\_, /_/ \__/\__/ $(tput sgr 0)"
echo "$(tput setaf 4) /___/ $(tput sgr 0)"
}
function run-bench {
if [ ! -d output ] ; then
mkdir output
fi
if [ ! -d output/$bench ] ; then
mkdir output/$bench
else
echo "$(tput setaf 4)[SyPet]$(tput sgr 0) Cleaning output files $(tput bold)output/$bench$(tput sgr 0)..."
rm -f output/$bench/*
fi
echo "$(tput setaf 4)[SyPet]$(tput sgr 0) Running $(tput bold)$bench$(tput sgr 0) benchmarks..."
for f in benchmarks/$bench/* ; do
id=$(basename $f)
./run-sypet.sh "$f/benchmark$id.json" &> output/$bench/benchmark$id.log
if grep TIMEOUT -q output/$bench/benchmark$id.log ; then
echo "$(tput setaf 4)[SyPet]$(tput sgr 0) Benchmark $(tput bold)$id$(tput sgr 0) $(tput setaf 1)[TIMEOUT]$(tput sgr 0)"
elif grep Solution -q output/$bench/benchmark$id.log ; then
echo "$(tput setaf 4)[SyPet]$(tput sgr 0) Benchmark $(tput bold)$id$(tput sgr 0) $(tput setaf 2)[OK]$(tput sgr 0)"
else
echo "$(tput setaf 4)[SyPet]$(tput sgr 0) Benchmark $(tput bold)$id$(tput sgr 0) $(tput setaf 1)[FAILED]$(tput sgr 0)"
fi
done
}
sypet-logo
bench="math"
run-bench
bench="geometry"
run-bench
bench="joda"
run-bench
bench="xml"
run-bench