forked from project-everest/everest
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild_helper.sh
27 lines (19 loc) · 847 Bytes
/
build_helper.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
#!/usr/bin/env bash
target=$1
out_file=$2
threads=$3
branchname=$4
eval $(opam config env)
echo $(date -u "+%Y-%m-%d %H:%M:%S") >> $out_file
tail -f $out_file &
tail_pd=$!
{ { { { { { stdbuf -e0 -o0 ./build.sh "$@" ; } 3>&1 1>&2 2>&3 ; } | sed -u 's!^![STDERR]!' ; } 3>&1 1>&2 2>&3 ; } | sed -u 's!^![STDOUT]!' ; } 2>&1 ; } >> $out_file
kill $tail_pd
echo $(date -u "+%Y-%m-%d %H:%M:%S") >> $out_file
# Generate query-stats.
# List the hints that fail to replay.
everest/FStar/.scripts/query-stats.py -f $out_file -F html -o log_no_replay.html -n all '--filter=fstar_usedhints=+' '--filter=fstar_tag=-' -g
# Worst offenders (longest times)
everest/FStar/.scripts/query-stats.py -f $out_file -F html -o log_worst.html -c -g -n 10
# Generate the container timestamp for debug purposes
echo $(date -u "+%Y-%m-%d %H:%M:%S") >> "timestamp.txt"