diff options
| author | David Wood <david.wood@huawei.com> | 2023-08-24 09:54:18 +0100 |
|---|---|---|
| committer | David Wood <david.wood@huawei.com> | 2023-08-30 13:10:37 +0100 |
| commit | 3640f7903424bf1a457f2332261208cdcf37f055 (patch) | |
| tree | d010a3390e8f3d33704c45fc67e885c721547b58 | |
| parent | 41cb42a370b35707a75c79ff9ab6af1191b638fb (diff) | |
| download | rust-3640f7903424bf1a457f2332261208cdcf37f055.tar.gz rust-3640f7903424bf1a457f2332261208cdcf37f055.zip | |
compiletest: support for newer lldb versions
Newer lldb versions disable printing of persistent results by default, but lots of rustc debuginfo tests rely on these being printed, so re-enable this by defining an alias as suggested by the patch which disabled persistent result printing in lldb. Signed-off-by: David Wood <david@davidtw.co>
| -rw-r--r-- | src/tools/compiletest/src/runtest.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs index dd4c59fdff5..a8b1cd6c237 100644 --- a/src/tools/compiletest/src/runtest.rs +++ b/src/tools/compiletest/src/runtest.rs @@ -1430,6 +1430,15 @@ impl<'test> TestCx<'test> { "^core::num::([a-z_]+::)*NonZero.+$", ]; + // In newer versions of lldb, persistent results (the `$N =` part at the start of + // expressions you have evaluated that let you re-use the result) aren't printed, but lots + // of rustc's debuginfo tests rely on these, so re-enable this. + // See <https://reviews.llvm.org/rG385496385476fc9735da5fa4acabc34654e8b30d>. + script_str.push_str("command unalias print\n"); + script_str.push_str("command alias print expr --\n"); + script_str.push_str("command unalias p\n"); + script_str.push_str("command alias p expr --\n"); + script_str .push_str(&format!("command script import {}\n", &rust_pp_module_abs_path[..])[..]); script_str.push_str("type synthetic add -l lldb_lookup.synthetic_lookup -x '.*' "); |
