#!/bin/sh
#
# Copyright (C) 2004-2011  Internet Systems Consortium, Inc. ("ISC")
# Copyright (C) 2000-2003  Internet Software Consortium.
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
# AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.

#
# Common configuration data for system tests, to be sourced into
# other shell scripts.
#

# Prerequisite check
if [ @srcdir@ != @builddir@ ]; then
	echo "Currently systest doesn't work for a separate build tree."
	echo "Rebuild BIND 10 on the source tree and run the tests."
	exit 1
fi

if [ -z $BIND9_TOP ]; then
	echo "systest assumes there's a compiled tree of BIND 9 which can be"
	echo "accessed via the BIND9_TOP environment variable."
	echo "Please make sure this assumption is met."
	exit 1
fi

# Find the top of the source and test trees.
TOP=@abs_top_srcdir@
TEST_TOP=@abs_builddir@

RUN_BIND10=$TOP/src/bin/bind10/run_bind10.sh
RUN_BINDCTL=$TOP/src/bin/bindctl/run_bindctl.sh
BINDCTL_CSV_DIR=@abs_srcdir@/common/
B10_LOADZONE=$TOP/src/bin/loadzone/run_loadzone.sh
BIND9_NAMED=$BIND9_TOP/bin/named/named
DIG=$BIND9_TOP/bin/dig/dig
# Test tools borrowed from BIND 9's system test (without change).
TESTSOCK=$BIND9_TOP/bin/tests/system/testsock.pl
DIGCOMP=$BIND9_TOP/bin/tests/system/digcomp.pl

SUBDIRS="bindctl glue"
#SUBDIRS="dnssec masterfile xfer"

# PERL will be an empty string if no perl interpreter was found.
PERL=@PERL@

export RUN_BIND10 BIND9_NAMED DIG SUBDIRS PERL TESTSOCK
