[llvm] 2ddd156 - [lit] Make main.py a pure Python module
Julian Lettner via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 28 09:59:11 PDT 2019
Author: Julian Lettner
Date: 2019-10-28T09:56:37-07:00
New Revision: 2ddd1564a9c2c648ac63fcaca474d5386cebd3fe
URL: https://github.com/llvm/llvm-project/commit/2ddd1564a9c2c648ac63fcaca474d5386cebd3fe
DIFF: https://github.com/llvm/llvm-project/commit/2ddd1564a9c2c648ac63fcaca474d5386cebd3fe.diff
LOG: [lit] Make main.py a pure Python module
Running it directly as a tool, that is what lit.py is for.
Added:
Modified:
llvm/utils/lit/lit.py
llvm/utils/lit/lit/main.py
Removed:
################################################################################
diff --git a/llvm/utils/lit/lit.py b/llvm/utils/lit/lit.py
index af070c69b5bd..2f1fb43b11b7 100755
--- a/llvm/utils/lit/lit.py
+++ b/llvm/utils/lit/lit.py
@@ -1,7 +1,6 @@
#!/usr/bin/env python
-import sys
-from lit.main import main
+import lit.main
-if __name__=='__main__':
- main()
+if __name__ == '__main__':
+ lit.main()
diff --git a/llvm/utils/lit/lit/main.py b/llvm/utils/lit/lit/main.py
index e56cd44dd40a..7e8db0879328 100755
--- a/llvm/utils/lit/lit/main.py
+++ b/llvm/utils/lit/lit/main.py
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-
"""
lit - LLVM Integrated Tester.
@@ -381,6 +379,3 @@ def write_test_results_xunit(tests, opts):
xunit_output_file.write("</testsuite>\n")
xunit_output_file.write("</testsuites>")
xunit_output_file.close()
-
-if __name__=='__main__':
- main()
More information about the llvm-commits
mailing list