-
Notifications
You must be signed in to change notification settings - Fork 1
/
exec-pruebas.sh
executable file
·49 lines (44 loc) · 1.33 KB
/
exec-pruebas.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
# Ejecuta los juegos de prueba, tienes que dar el nivel de extensiones a probar
if [ $# -ne 1 ]; then
echo "Hay que dar un argumento:"
echo "basico - sin extensiones"
echo "ext1 - extension 1"
echo "ext2 - extension 2"
echo "ext3 - extension 3"
exit
fi
# Check de los argumentos
if [ "$1" = "basico" ]; then
:
elif [ "$1" = "ext1" ]; then
:
elif [ "$1" = "ext2" ]; then
:
elif [ "$1" = "ext3" ]; then
:
else
echo "El argumento dado, \"$1\", no esta en las opciones"
exit
fi
counter=5
step=5
limite=60
secs=15
while [ $counter -le $limite ]
do
echo "---------------------------------------------------------"
echo "ejecutando prueba $counter"
echo "---------------------------------------------------------"
timeout $secs ff -O -o domain-$1.pddl -f ./juegos-$1/prueba$counter.pddl
if [ $? -eq 0 ]; then
# Ha acabado a tiempo
echo "---------------------------------------------------------"
echo "prueba completada a tiempo"
echo "---------------------------------------------------------"
else
echo "---------------------------------------------------------"
echo "la prueba no ha acabado en $secs segundos"
echo "---------------------------------------------------------"
fi
((counter+=step))
done