496189feed
See item 4 at https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!msg/lean-discuss/oJXwW5wT2Ds/d1Dgr8B-pE0J See also https://github.com/leanprover/lean/pull/659
16 lines
328 B
Bash
Executable file
16 lines
328 B
Bash
Executable file
#!/bin/sh
|
|
# Execute lean with timeout
|
|
set -e
|
|
if [ $# -ne 3 ]; then
|
|
echo "Usage: timeout.sh [lean-executable-path] [timeout] [benchmark]"
|
|
exit 1
|
|
fi
|
|
LEAN=$1
|
|
TIMEOUT=$2
|
|
BENCH=$3
|
|
export LEAN_PATH=../../../library:.
|
|
ulimit -t $2
|
|
if ! $LEAN $BENCH; then
|
|
echo "Failed to execute $BENCH in $TIMEOUT second(s)"
|
|
exit 1
|
|
fi
|