-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun.sh
executable file
·48 lines (42 loc) · 1.21 KB
/
run.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
#!/bin/bash
dir=$(pwd)
bold=$(tput bold)
normal=$(tput sgr0)
red='\033[0;31m'
green='\033[0;32m'
nocolor='\033[0m'
#Compilando
cd code
make clean
make
mv "$dir/code/tiger" "$dir/tiger"
cp "$dir/code/runtime.c" "$dir/runtime.c"
make clean
cd ..
clear
#Corriendo Casos
echo -e "${red}===============${nocolor}"
echo -e "${red}${bold}+++BAD CASES+++${normal}"
echo -e "${red}===============${nocolor}"
for i in $(ls "$dir/testcases/Mal" -C1)
do
echo "------------------------------------------"
echo -e "Programa ${red}${bold}$i${normal}${nocolor}:"
./tiger -inter -canon < "$dir/testcases/Mal/$i"
echo "------------------------------------------"
done
clear
echo -e "${green}================${nocolor}"
echo -e "${green}${bold}+++GOOD CASES+++${normal}"
echo -e "${green}================${nocolor}"
for i in $(ls "$dir/testcases/Bien" -C1)
do
file=$(basename $i .tig)
echo "------------------------------------------"
echo -e "Programa ${green}${bold}$file${normal}${nocolor}:"
./tiger "$dir/testcases/Bien/$i"
./$file <<< "0 1 3 5 7 9 10 12 1024 x 2 4 6 8 11 77 x" #Input only use for merge.tig
rm -f "$dir/$file" "$dir/$file.s"
echo "------------------------------------------"
done
rm -f "$dir/runtime.c" "$dir/tiger"