#!/usr/bin/env python # -*- coding: utf-8 -*- # import optparse import os import sys BASEPATH = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..')) sys.path.insert(0, os.path.join(BASEPATH, 'src')) import report import tests import unittest parser = optparse.OptionParser("usage: %prog [clean|run|coverage|pdf|copy|release]") parser.add_option("-e", "--execution-level", dest="execution_level", default="full", help="sets the execution level [full | short | smoke | single]") (options, args) = parser.parse_args() if report.TCEL_REVERSE_NAMED.get(tests.execution_level, report.TCEL_FULL) < report.TCEL_REVERSE_NAMED.get(options.execution_level, report.TCEL_FULL): options.execution_level = tests.execution_level unittest.run.unittest(options, args, os.path.dirname(BASEPATH))