#!/bin/env python2.4
##############################################################################
#
# Copyright (c) 2004 Zope Corporation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
"""Test script to run the unit and functional tests in a Zope installation.

$Id$
"""
import sys, os

here = os.path.dirname(os.path.realpath(__file__))
here = os.path.dirname(here)

if sys.platform in ("win32",):
    lib = os.path.join(here, "Lib", "site-packages")
else:
    lib = os.path.join(here, "lib", "python")
sys.path.append(lib)

ftesting = os.path.join(here, "zopeskel", "etc", "ftesting.zcml")

import zope.app.tests.test

zope.app.tests.test.FTESTING = ftesting

if __name__ == '__main__':
    args = sys.argv[:1] + ["-l", lib] + sys.argv[1:]
    zope.app.tests.test.process_args(args)
