Python Library Unittest
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

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