[llvm] 837caa9 - Revert "[Utils] Refactor update_cc_test_checks.py to use shutil"
Ben Dunbobbin via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 20 08:52:15 PDT 2022
Author: Ben Dunbobbin
Date: 2022-09-20T16:50:18+01:00
New Revision: 837caa99a273c76541a376768e1ba0f7a094fde0
URL: https://github.com/llvm/llvm-project/commit/837caa99a273c76541a376768e1ba0f7a094fde0
DIFF: https://github.com/llvm/llvm-project/commit/837caa99a273c76541a376768e1ba0f7a094fde0.diff
LOG: Revert "[Utils] Refactor update_cc_test_checks.py to use shutil"
This reverts commit 2e6c50855b7d879ded3776ba87b3d960e2035b89.
This caused failures on windows bots:
- https://lab.llvm.org/buildbot/#/builders/216/builds/10030
- https://ci.chromium.org/ui/p/fuchsia/builders/toolchain.ci/clang-windows-x64/b8802513693562827489/overview
Added:
Modified:
llvm/utils/update_cc_test_checks.py
Removed:
################################################################################
diff --git a/llvm/utils/update_cc_test_checks.py b/llvm/utils/update_cc_test_checks.py
index 967651d622df9..b9e91f19461b0 100755
--- a/llvm/utils/update_cc_test_checks.py
+++ b/llvm/utils/update_cc_test_checks.py
@@ -16,11 +16,11 @@
import argparse
import collections
+import distutils.spawn
import json
import os
import re
import shlex
-import shutil
import subprocess
import sys
import tempfile
@@ -167,7 +167,7 @@ def config():
args = common.parse_commandline_args(parser)
infer_dependent_args(args)
- if not shutil.which(args.clang):
+ if not distutils.spawn.find_executable(args.clang):
print('Please specify --llvm-bin or --clang', file=sys.stderr)
sys.exit(1)
@@ -183,7 +183,7 @@ def config():
common.warn('Could not determine clang builtins directory, some tests '
'might not update correctly.')
- if not shutil.which(args.opt):
+ if not distutils.spawn.find_executable(args.opt):
# Many uses of this tool will not need an opt binary, because it's only
# needed for updating a test that runs clang | opt | FileCheck. So we
# defer this error message until we find that opt is actually needed.
More information about the llvm-commits
mailing list