From 2ddd1564a9c2c648ac63fcaca474d5386cebd3fe Mon Sep 17 00:00:00 2001 From: Julian Lettner Date: Fri, 25 Oct 2019 18:51:29 -0700 Subject: [PATCH] [lit] Make main.py a pure Python module Running it directly as a tool, that is what lit.py is for. --- llvm/utils/lit/lit.py | 7 +++---- llvm/utils/lit/lit/main.py | 5 ----- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/llvm/utils/lit/lit.py b/llvm/utils/lit/lit.py index af070c6..2f1fb43 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 e56cd44..7e8db08 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("\n") xunit_output_file.write("") xunit_output_file.close() - -if __name__=='__main__': - main() -- 2.7.4