1export RESOURCEDIR=@abs_top_srcdir@/tests/frontend 2export OS=`uname -s` 3export PATH=$(atf_get_srcdir)/../../src/:${PATH} 4#export LD_LIBRARY_PATH=$(atf_get_srcdir)/../../libpkg/.libs/ 5#export DYLD_LIBRARY_PATH=$(atf_get_srcdir)/../../libpkg/.libs/ 6export INSTALL_AS_USER=yes 7export PKG_DBDIR=. 8export NO_TICK=yes 9export PKG_ENABLE_PLUGINS=false 10@if coverage 11export LLVM_PROFILE_FILE=/tmp/pkg.%p.profraw 12@endif 13jailed=$(sysctl -n security.jail.jailed 2>/dev/null || :) 14if [ "$jailed" = "1" ]; then 15 export JAILED="[`hostname`] " 16fi 17export PROGNAME="pkg" 18 19tests_init() 20{ 21 TESTS="$@" 22 export TESTS 23 for t; do 24 case " ${CLEANUP:-ENOCLEANUP} " in 25 *\ $t\ *) atf_test_case $t cleanup ;; 26 *) atf_test_case $t ;; 27 esac 28 done 29} 30 31atf_init_test_cases() { 32 for t in ${TESTS}; do 33 atf_add_test_case $t 34 done 35} 36 37atf_skip_on() { 38 if [ "${OS}" = "$1" ]; then 39 shift 40 atf_skip "$@" 41 fi 42} 43 44atf_require() { 45 if ! command -v "$1" 2>/dev/null >/dev/null; then 46 shift 47 atf_skip "$@" 48 fi 49} 50