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
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))