[llvm] c20954d - update_any_test_checks.py: run from any dir
Nick Desaulniers via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 9 15:36:34 PST 2023
Author: Nick Desaulniers
Date: 2023-01-09T15:36:15-08:00
New Revision: c20954dbab8ba32831d691293160d0ed6d19f671
URL: https://github.com/llvm/llvm-project/commit/c20954dbab8ba32831d691293160d0ed6d19f671
DIFF: https://github.com/llvm/llvm-project/commit/c20954dbab8ba32831d691293160d0ed6d19f671.diff
LOG: 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
Added:
Modified:
llvm/utils/update_any_test_checks.py
Removed:
################################################################################
diff --git a/llvm/utils/update_any_test_checks.py b/llvm/utils/update_any_test_checks.py
index e1c7a8fc7bd9f..33b6689b36fd6 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))
More information about the llvm-commits
mailing list