1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
#!/bin/sh
TEST_NAME=$1
if [ -z "$BINARY_DIR" ]; then
echo "\$BINARY_DIR environment variable is not set; cannot run test"
exit 1
fi
if [ ! -d "$BINARY_DIR" ]; then
echo "$BINARY_DIR is not a directory; cannot run test"
exit 1
fi
echo "Tearing down $TEST_NAME"
if [ ! -f "$BINARY_DIR/tests/$TEST_NAME/setup.sh" ]; then
echo "Test environment file $BINARY_DIR/tests/$TEST_NAME/setup.sh does not exist - cannot run test"
exit 1
fi
. "$BINARY_DIR/tests/$TEST_NAME/setup.sh"
if [ -z "$XROOTD_PID" ]; then
echo "\$XROOTD_PID environment variable is not set; cannot tear down process"
exit 1
fi
kill "$XROOTD_PID"
|