-
Notifications
You must be signed in to change notification settings - Fork 0
/
check.sh
executable file
·38 lines (33 loc) · 900 Bytes
/
check.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
#!/bin/bash
#==============================================================================
# Configurations
#==============================================================================
BEDROCK=bedrock
OPTS="-R $BEDROCK/src Bedrock -I $BEDROCK/platform"
SRCS="myfactorial myfactorial-safe search-max Schorr-Waite"
#==============================================================================
# Implementation
#==============================================================================
function run_coq {
coqtop $OPTS -batch -l $1 | head 2>&1
return $PIPESTATUS
}
function check {
echo -n "Checking $1 ..."
OUTPUT=`run_coq $1`
RVAL=$?
if [ $RVAL == 0 ]; then
echo " OK"
return 0
fi
echo " Error[$RVAL]:"
echo $OUTPUT
}
TIMEFORMAT=' %2R real %2U user %2S system'
if [ X$1 != 'X' ]; then
time check $1
else
for FILE in $SRCS; do
time check $FILE
done
fi