From 3640f7903424bf1a457f2332261208cdcf37f055 Mon Sep 17 00:00:00 2001 From: David Wood Date: Thu, 24 Aug 2023 09:54:18 +0100 Subject: [PATCH 1/2] 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 --- src/tools/compiletest/src/runtest.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs index dd4c59fdff513..a8b1cd6c237fd 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 . + 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 '.*' "); From 3bd5dc3c612abf91a0e9c92f63b22ccc695bd6f1 Mon Sep 17 00:00:00 2001 From: David Wood Date: Wed, 30 Aug 2023 13:12:34 +0100 Subject: [PATCH 2/2] tests: re-enable pretty-std-collections on macOS Signed-off-by: David Wood --- tests/debuginfo/pretty-std-collections.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/debuginfo/pretty-std-collections.rs b/tests/debuginfo/pretty-std-collections.rs index 93597aa7e235f..93a0dff68489a 100644 --- a/tests/debuginfo/pretty-std-collections.rs +++ b/tests/debuginfo/pretty-std-collections.rs @@ -1,7 +1,6 @@ // ignore-windows failing on win32 bot // ignore-freebsd: gdb package too new // ignore-android: FIXME(#10381) -// ignore-macos: FIXME(#78665) // compile-flags:-g // The pretty printers being tested here require the patch from