[Lldb-commits] [lldb] r344401 - [dotest] Make a missing FileCheck binary a warning, not an error
Vedant Kumar via lldb-commits
lldb-commits at lists.llvm.org
Fri Oct 12 12:29:59 PDT 2018
Author: vedantk
Date: Fri Oct 12 12:29:59 2018
New Revision: 344401
URL: http://llvm.org/viewvc/llvm-project?rev=344401&view=rev
Log:
[dotest] Make a missing FileCheck binary a warning, not an error
This allows bots which haven't updated to pass in --filecheck to
dotest.py to run more tests. FileCheck-dependent tests will continue to
fail.
Differential Revision: https://reviews.llvm.org/D53175
Modified:
lldb/trunk/packages/Python/lldbsuite/test/configuration.py
lldb/trunk/packages/Python/lldbsuite/test/dotest.py
lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py
Modified: lldb/trunk/packages/Python/lldbsuite/test/configuration.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/configuration.py?rev=344401&r1=344400&r2=344401&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/configuration.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/configuration.py Fri Oct 12 12:29:59 2018
@@ -188,5 +188,5 @@ def get_filecheck_path():
"""
Get the path to the FileCheck testing tool.
"""
- assert os.path.lexists(filecheck)
- return filecheck
+ if os.path.lexists(filecheck):
+ return filecheck
Modified: lldb/trunk/packages/Python/lldbsuite/test/dotest.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/dotest.py?rev=344401&r1=344400&r2=344401&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/dotest.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/dotest.py Fri Oct 12 12:29:59 2018
@@ -308,11 +308,15 @@ def parseOptionsAndInitTestdirs():
'xcrun -find -toolchain default dsymutil')
if args.filecheck:
- # The CMake build passes in a path to a working FileCheck binary.
+ # The lldb-dotest script produced by the CMake build passes in a path
+ # to a working FileCheck binary. So does one specific Xcode project
+ # target. However, when invoking dotest.py directly, a valid --filecheck
+ # option needs to be given.
configuration.filecheck = os.path.abspath(args.filecheck)
- else:
- logging.error('No valid FileCheck executable; aborting...')
- sys.exit(-1)
+
+ if not configuration.get_filecheck_path():
+ logging.warning('No valid FileCheck executable; some tests may fail...')
+ logging.warning('(Double-check the --filecheck argument to dotest.py)')
if args.channels:
lldbtest_config.channels = args.channels
Modified: lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py?rev=344401&r1=344400&r2=344401&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py Fri Oct 12 12:29:59 2018
@@ -2237,6 +2237,8 @@ class TestBase(Base):
# Run FileCheck.
filecheck_bin = configuration.get_filecheck_path()
+ if not filecheck_bin:
+ self.assertTrue(False, "No valid FileCheck executable specified")
filecheck_args = [filecheck_bin, check_file_abs]
if filecheck_options:
filecheck_args.append(filecheck_options)
More information about the lldb-commits
mailing list