[llvm] 195eb90 - [UpdateTestChecks] Change shebang from python to python3
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 3 13:50:33 PST 2019
Author: Fangrui Song
Date: 2019-12-03T13:50:07-08:00
New Revision: 195eb9034af3d5352f8f5aa4b2156eb8579e8514
URL: https://github.com/llvm/llvm-project/commit/195eb9034af3d5352f8f5aa4b2156eb8579e8514
DIFF: https://github.com/llvm/llvm-project/commit/195eb9034af3d5352f8f5aa4b2156eb8579e8514.diff
LOG: [UpdateTestChecks] Change shebang from python to python3
'python' means Python 2 on some platforms while Python 3 on others.
'python3' is Python 3 only. Python 2.7 End of Life is set to January 1,
2020. Getting rid of Python 2 support reduces maintenance burden.
Reviewed By: lebedev.ri
Differential Revision: https://reviews.llvm.org/D70730
Added:
Modified:
llvm/utils/update_analyze_test_checks.py
llvm/utils/update_llc_test_checks.py
llvm/utils/update_mca_test_checks.py
llvm/utils/update_mir_test_checks.py
llvm/utils/update_test_checks.py
Removed:
################################################################################
diff --git a/llvm/utils/update_analyze_test_checks.py b/llvm/utils/update_analyze_test_checks.py
index f3572e762549..e3b6dfdf620c 100755
--- a/llvm/utils/update_analyze_test_checks.py
+++ b/llvm/utils/update_analyze_test_checks.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
"""A script to generate FileCheck statements for 'opt' analysis tests.
diff --git a/llvm/utils/update_llc_test_checks.py b/llvm/utils/update_llc_test_checks.py
index 750650f8640c..3e7da8aa06f8 100755
--- a/llvm/utils/update_llc_test_checks.py
+++ b/llvm/utils/update_llc_test_checks.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
"""A test case update script.
@@ -45,7 +45,7 @@ def main():
for test in test_paths:
with open(test) as f:
input_lines = [l.rstrip() for l in f]
-
+
first_line = input_lines[0] if input_lines else ""
if 'autogenerated' in first_line and script_name not in first_line:
common.warn("Skipping test which wasn't autogenerated by " + script_name, test)
diff --git a/llvm/utils/update_mca_test_checks.py b/llvm/utils/update_mca_test_checks.py
index 0522c80be4d5..c5798a3a8848 100755
--- a/llvm/utils/update_mca_test_checks.py
+++ b/llvm/utils/update_mca_test_checks.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
"""A test case update script.
diff --git a/llvm/utils/update_mir_test_checks.py b/llvm/utils/update_mir_test_checks.py
index 46f497007fc9..c1590c55637e 100755
--- a/llvm/utils/update_mir_test_checks.py
+++ b/llvm/utils/update_mir_test_checks.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
"""Updates FileCheck checks in MIR tests.
diff --git a/llvm/utils/update_test_checks.py b/llvm/utils/update_test_checks.py
index 3fd8dd7dd7e9..8ee226549802 100755
--- a/llvm/utils/update_test_checks.py
+++ b/llvm/utils/update_test_checks.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
"""A script to generate FileCheck statements for 'opt' regression tests.
More information about the llvm-commits
mailing list