outdir="out"
compdir="nit_compile"
+# User CPU time limit (in seconds)
+# Is used to avoid to CPU intensive test (infinite loops). See ulimit -t
+usertimelimit=600 # 1 CPU minute
+
# Real-time limit (in seconds)
# Is used to avoid waiting or sleeping tests.
# Require timeout or timelimit, or else is not used.
realtimelimit=300 # 5 min
+# User limit for write files (in kilo-bytes)
+# Is used to avoid execution that loop and fill the hard drive. See ulimit -f
+# Note that a test might require a lot of temporary disk space (eg. nitc+gcc)
+filelimit=100000 # ~100MB
+
# Limit (in bytes) for generated .res file.
# Larger ones are truncated and will fail tests
# Is used to avoid processing huge crappy res file (diff, xml, etc)
*) stop=true
esac
done
+ (
+ ulimit -f "$filelimit"
+ ulimit -t "$usertimelimit"
if test -d "$1"; then
find $1 | sort
elif test -n "$TIME"; then
if test -n "$a"; then echo 0 >> "$o"; else echo 0 > "$o"; fi
$TIMEOUT "$@"
fi
+ )
}
# Output a timestamp attribute for XML, or an empty line