#!/usr/bin/env python

import sys

usage = \
"""

Usage:

accTest testDocument

-or-

accTest hostType testDocument


Summary:

hostType: choices are "python" or "py", "maya", "mayapy";
# this argument is optional; the default value is "python"

testDocument: the name of the dsl file in the current directory


Example:

assuming there is a dsl file called "romeoPublishTests.py" in your current directory

1. run the tests in vanilla python mode
accTest romeoPublishTests.py

-or-

accTest py romeoPublishTests.py
accTest python romeoPublishTests.py

2. run the tests in mayapy (maya standalone)
accTest mayapy romeoPublishTests.py

3. run the tests in maya gui mode (maya main window will show up)
accTest maya romeoPublishTests.py

"""

if len(sys.argv) == 2:
    hostType = 'python'
    dslFileName = sys.argv[1]
elif len(sys.argv) == 3:
    hostType = sys.argv[1]
    dslFileName = sys.argv[2]
else:
    print usage
    sys.exit(1)
from accTest import LOGGING
from accTest.applications import standalone
LOGGING.initialize()
standalone.AccTestStandalone(hostType, dslFileName).run()
