2013-01-31 09:23:39 +08:00
|
|
|
# Check the lit adaption to run under unittest.
|
|
|
|
#
|
2013-08-14 13:07:09 +08:00
|
|
|
# RUN: %{python} %s %{inputs}/unittest-adaptor 2> %t.err
|
2013-01-31 09:23:39 +08:00
|
|
|
# RUN: FileCheck < %t.err %s
|
|
|
|
#
|
2015-06-13 14:55:44 +08:00
|
|
|
# CHECK-DAG: unittest-adaptor :: test-two.txt ... FAIL
|
|
|
|
# CHECK-DAG: unittest-adaptor :: test-one.txt ... ok
|
2013-01-31 09:23:39 +08:00
|
|
|
|
|
|
|
import unittest
|
|
|
|
import sys
|
|
|
|
|
|
|
|
import lit
|
|
|
|
import lit.discovery
|
|
|
|
|
|
|
|
input_path = sys.argv[1]
|
|
|
|
unittest_suite = lit.discovery.load_test_suite([input_path])
|
|
|
|
runner = unittest.TextTestRunner(verbosity=2)
|
|
|
|
runner.run(unittest_suite)
|