-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtests.sh
executable file
·37 lines (30 loc) · 1012 Bytes
/
tests.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
#!/bin/bash
clrClear='\033[0m'
clrBlue='\033[1;34m'
clrPurple='\033[1;35m'
clrGreen='\033[1;32m'
clrRed='\033[31;01m'
clrYellow='\033[33;01m'
result=true
INPUT_FILES="tests_pass/*.pm"
printf "\n${clrGreen}--==[ ${clrBlue}Running all tests... ${clrGreen}]==--${clrClear}\n"
for input_file in $INPUT_FILES; do
./pixmix.native $input_file | lli $1
if [ "$?" -eq 0 ]; then
printf "%-65s ${clrYellow}YES\n${clrClear}" " - checking $input_file..."
else
printf "%-65s ${clrPurple}NO\n${clrClear}" " - checking $input_file..." 1>&2
result=false
fi
done
INPUT_FILES="tests_fail/*.pm"
for input_file in $INPUT_FILES; do
./pixmix.native $input_file | lli $1
if [ "$?" -eq 0]; then
printf "%-65s ${clrYellow}NO\n${clrClear}" " - checking $input_file..."
else
printf "%-65s ${clrPurple}YES\n${clrClear}" " - checking $input_file..." 1>&2
result=false
fi
done
exit 0