aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Desaulniers <ndesaulniers@google.com>2023-01-09 15:34:21 -0800
committerNick Desaulniers <ndesaulniers@google.com>2023-01-09 15:36:15 -0800
commitc20954dbab8ba32831d691293160d0ed6d19f671 (patch)
treeeec94a9616a19e02bf8cfdf48fd6a3a6d560886d
parentc8ed36281a929c34477ffc391a8a3e84d1a07a92 (diff)
downloadllvm-c20954dbab8ba32831d691293160d0ed6d19f671.zip
llvm-c20954dbab8ba32831d691293160d0ed6d19f671.tar.gz
llvm-c20954dbab8ba32831d691293160d0ed6d19f671.tar.bz2
update_any_test_checks.py: run from any dir
Allow running llvm/utils/update_any_test_checks.py from working directories other llvm/utils/. Fixes: $ ./llvm/utils/update_any_test_checks.py path/to/foo.ll utils/update_llc_test_checks.py: not found (used in path/to/foo.ll) Reviewed By: arichardson Differential Revision: https://reviews.llvm.org/D140586
-rwxr-xr-xllvm/utils/update_any_test_checks.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/utils/update_any_test_checks.py b/llvm/utils/update_any_test_checks.py
index e1c7a8f..33b6689b 100755
--- a/llvm/utils/update_any_test_checks.py
+++ b/llvm/utils/update_any_test_checks.py
@@ -48,11 +48,11 @@ def main():
parser.add_argument('tests', nargs='+')
config = parser.parse_args()
- script_name = os.path.basename(__file__)
if config.utc_dir:
utc_search_path = config.utc_dir[:]
else:
utc_search_path = []
+ script_name = os.path.abspath(__file__)
utc_search_path.append(os.path.join(os.path.dirname(script_name),
os.path.pardir))