# only exported things work in test scripts export abs_top_srcdir abs_top_builddir abs_srcdir abs_builddir export AWK="@AWK@" export HOST="@host@" if ! ${at_clean} ; then export SB_UID=$(./get-user) export SB_GID=$(./get-group) fi export at_xfail # portage likes to do `addpredict /` ... we dont need/want # that garbage messing up our env export SANDBOX_PREDICT=${SANDBOX_PREDICT%:/} if [ "${AUTOTEST_PATH}" = "tests" ] ; then AUTOTEST_PATH="src:tests" fi export SANDBOX_VERBOSE=0 # If the terminal has this flag set, the tests get all messed up. stty -tostop 2>/dev/null || : # Some tests want this internal path. for devfd in /proc/self/fd /dev/fd ; do [ -e "${devfd}" ] && break done # GNU make likes to leak fds when using jobservers (i.e. using -j). case "${MAKEFLAGS}" in *--jobserver-auth=*) flags=${MAKEFLAGS#*--jobserver-auth=} flags=${flags%% *} for fd in $(echo "${flags}" | tr ',' ' ') ; do if [ -e "${devfd}/${fd}" ] ; then eval "exec ${fd}>&-" fi done ;; esac # Figure out currently YAMA ptrace_scope restriction level. at_yama_ptrace_scope=$(cat /proc/sys/kernel/yama/ptrace_scope 2>/dev/null || echo 0) if [ ${at_yama_ptrace_scope} -gt 0 ] ; then if [ "$(id -u)" -eq 0 ] ; then at_yama_ptrace_scope=0 fi fi export at_yama_ptrace_scope # This script must finish with ($? == 0) else the autotest runner gets upset. :