Author: Raphael Isemann Date: 2020-11-10T15:26:19+01:00 New Revision: c50faf5c9d7ca7a62cd59516c7de305b73f2455c
URL: https://github.com/llvm/llvm-project/commit/c50faf5c9d7ca7a62cd59516c7de305b73f2455c DIFF: https://github.com/llvm/llvm-project/commit/c50faf5c9d7ca7a62cd59516c7de305b73f2455c.diff LOG: [lldb] Fix TestErrorMessages test on standalone builds by adding lldb-server substitution It seems that TestErrorMessages.test is failing on the standalone + Xcode builds as lldb-server executable can't be found by lit's default PATH search. I assume invoking lldb-server via a lit substitution gets this working again as everything else is working, so that's what this patch is doing. I had to add the lldb-server substitution as the test seems lldb-server specific and we don't want it to default to debugserver on Darwin. Using a substitution also seems in general like a good idea so that the commands lit is printing on failure are using the full path to lldb-server and can be re-run in a terminal. Reviewed By: labath Differential Revision: https://reviews.llvm.org/D91155 Added: Modified: lldb/test/Shell/helper/toolchain.py lldb/test/Shell/lldb-server/TestErrorMessages.test Removed: ################################################################################ diff --git a/lldb/test/Shell/helper/toolchain.py b/lldb/test/Shell/helper/toolchain.py index 9b85da01f822..c7374e06c272 100644 --- a/lldb/test/Shell/helper/toolchain.py +++ b/lldb/test/Shell/helper/toolchain.py @@ -54,6 +54,10 @@ def use_lldb_substitutions(config): command=FindTool('lldb'), extra_args=['-S', lldb_init], unresolved='fatal'), + ToolSubst('%lldb-server', + command=FindTool("lldb-server"), + extra_args=[], + unresolved='ignore'), ToolSubst('%debugserver', command=FindTool(dsname), extra_args=dsargs, diff --git a/lldb/test/Shell/lldb-server/TestErrorMessages.test b/lldb/test/Shell/lldb-server/TestErrorMessages.test index ef64ec6e5aba..b9689fb1e467 100644 --- a/lldb/test/Shell/lldb-server/TestErrorMessages.test +++ b/lldb/test/Shell/lldb-server/TestErrorMessages.test @@ -1,13 +1,13 @@ -RUN: lldb-server gdbserver --fd 2>&1 | FileCheck --check-prefixes=FD1,ALL %s +RUN: %lldb-server gdbserver --fd 2>&1 | FileCheck --check-prefixes=FD1,ALL %s FD1: error: --fd: missing argument -RUN: lldb-server gdbserver --fd three 2>&1 | FileCheck --check-prefixes=FD2,ALL %s +RUN: %lldb-server gdbserver --fd three 2>&1 | FileCheck --check-prefixes=FD2,ALL %s FD2: error: invalid '--fd' argument -RUN: lldb-server gdbserver --bogus 2>&1 | FileCheck --check-prefixes=BOGUS,ALL %s +RUN: %lldb-server gdbserver --bogus 2>&1 | FileCheck --check-prefixes=BOGUS,ALL %s BOGUS: error: unknown argument '--bogus' -RUN: lldb-server gdbserver 2>&1 | FileCheck --check-prefixes=CONN,ALL %s +RUN: %lldb-server gdbserver 2>&1 | FileCheck --check-prefixes=CONN,ALL %s CONN: error: no connection arguments ALL: Use '{{.*}} g[dbserver] --help' for a complete list of options. _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits