diff options
author | Vedant Kumar <vsk@apple.com> | 2018-10-12 19:29:59 +0000 |
---|---|---|
committer | Vedant Kumar <vsk@apple.com> | 2018-10-12 19:29:59 +0000 |
commit | 8e2f09d61582f8e0ce8481972f47b2e1acd0175c (patch) | |
tree | 01f2e0b07a482fd394055d4c9269590965180729 /lldb/packages/Python/lldbsuite | |
parent | c39a217412b17b53d7f9e249fe8cd1ec98c3a3c6 (diff) | |
download | bcm5719-llvm-8e2f09d61582f8e0ce8481972f47b2e1acd0175c.tar.gz bcm5719-llvm-8e2f09d61582f8e0ce8481972f47b2e1acd0175c.zip |
[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
llvm-svn: 344401
Diffstat (limited to 'lldb/packages/Python/lldbsuite')
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/configuration.py | 4 | ||||
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/dotest.py | 12 | ||||
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/lldbtest.py | 2 |
3 files changed, 12 insertions, 6 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/configuration.py b/lldb/packages/Python/lldbsuite/test/configuration.py index f92b898ecc9..d4a65cda06a 100644 --- a/lldb/packages/Python/lldbsuite/test/configuration.py +++ b/lldb/packages/Python/lldbsuite/test/configuration.py @@ -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 diff --git a/lldb/packages/Python/lldbsuite/test/dotest.py b/lldb/packages/Python/lldbsuite/test/dotest.py index ab466288669..e3a30ed5b10 100644 --- a/lldb/packages/Python/lldbsuite/test/dotest.py +++ b/lldb/packages/Python/lldbsuite/test/dotest.py @@ -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 diff --git a/lldb/packages/Python/lldbsuite/test/lldbtest.py b/lldb/packages/Python/lldbsuite/test/lldbtest.py index 982af9a9859..0bd72150bc7 100644 --- a/lldb/packages/Python/lldbsuite/test/lldbtest.py +++ b/lldb/packages/Python/lldbsuite/test/lldbtest.py @@ -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) |