Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2046)

Unified Diff: third_party/lit/tests/unittest-adaptor.py

Issue 1663053003: [fusl] Add llvm's lit tool to third_party (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: move down a dir Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/lit/tests/test-output.py ('k') | third_party/lit/tests/usage.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/lit/tests/unittest-adaptor.py
diff --git a/third_party/lit/tests/unittest-adaptor.py b/third_party/lit/tests/unittest-adaptor.py
new file mode 100644
index 0000000000000000000000000000000000000000..0848cd22baae858309cccc782b8ebe31f735b065
--- /dev/null
+++ b/third_party/lit/tests/unittest-adaptor.py
@@ -0,0 +1,18 @@
+# Check the lit adaption to run under unittest.
+#
+# RUN: %{python} %s %{inputs}/unittest-adaptor 2> %t.err
+# RUN: FileCheck < %t.err %s
+#
+# CHECK-DAG: unittest-adaptor :: test-two.txt ... FAIL
+# CHECK-DAG: unittest-adaptor :: test-one.txt ... ok
+
+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)
« no previous file with comments | « third_party/lit/tests/test-output.py ('k') | third_party/lit/tests/usage.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698