43c770b9987375e9e0efa19617b22e8e6a748a63Mark Andrews#!/bin/sh
43c770b9987375e9e0efa19617b22e8e6a748a63Mark Andrews#
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# Copyright (C) 2010, 2012, 2016 Internet Systems Consortium, Inc. ("ISC")
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews#
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# This Source Code Form is subject to the terms of the Mozilla Public
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# License, v. 2.0. If a copy of the MPL was not distributed with this
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# file, You can obtain one at http://mozilla.org/MPL/2.0/.
43c770b9987375e9e0efa19617b22e8e6a748a63Mark Andrews
43c770b9987375e9e0efa19617b22e8e6a748a63Mark Andrews# $Id: setup.sh,v 1.2 2010/06/17 05:38:05 marka Exp $
43c770b9987375e9e0efa19617b22e8e6a748a63Mark Andrews
43c770b9987375e9e0efa19617b22e8e6a748a63Mark Andrews#
43c770b9987375e9e0efa19617b22e8e6a748a63Mark Andrews# Run a system test.
43c770b9987375e9e0efa19617b22e8e6a748a63Mark Andrews#
43c770b9987375e9e0efa19617b22e8e6a748a63Mark Andrews
43c770b9987375e9e0efa19617b22e8e6a748a63Mark AndrewsSYSTEMTESTTOP=.
43c770b9987375e9e0efa19617b22e8e6a748a63Mark Andrews. $SYSTEMTESTTOP/conf.sh
43c770b9987375e9e0efa19617b22e8e6a748a63Mark Andrews
43c770b9987375e9e0efa19617b22e8e6a748a63Mark Andrewstest $# -gt 0 || { echo "usage: $0 test-directory" >&2; exit 1; }
43c770b9987375e9e0efa19617b22e8e6a748a63Mark Andrews
43c770b9987375e9e0efa19617b22e8e6a748a63Mark Andrewstest=$1
43c770b9987375e9e0efa19617b22e8e6a748a63Mark Andrewsshift
43c770b9987375e9e0efa19617b22e8e6a748a63Mark Andrews
43c770b9987375e9e0efa19617b22e8e6a748a63Mark Andrewstest -d $test || { echo "$0: $test: no such test" >&2; exit 1; }
43c770b9987375e9e0efa19617b22e8e6a748a63Mark Andrews
43c770b9987375e9e0efa19617b22e8e6a748a63Mark Andrews# Set up any dynamically generated test data
43c770b9987375e9e0efa19617b22e8e6a748a63Mark Andrewsif test -f $test/setup.sh
43c770b9987375e9e0efa19617b22e8e6a748a63Mark Andrewsthen
43c770b9987375e9e0efa19617b22e8e6a748a63Mark Andrews ( cd $test && sh setup.sh "$@" )
43c770b9987375e9e0efa19617b22e8e6a748a63Mark Andrewsfi