================ @@ -355,6 +360,25 @@ def test_modules(self): self.assertNotEqual(exe_module, None) self.verify_keys(exe_module, 'module dict for "%s"' % (exe), module_keys) + def test_commands(self): + """ + Test "statistics dump" and the command information. + """ + self.build() + exe = self.getBuildArtifact("a.out") + target = self.createTestTarget(file_path=exe) + + interp = self.dbg.GetCommandInterpreter() + result = lldb.SBCommandReturnObject() + interp.HandleCommand("target list", result) + interp.HandleCommand("target list", result) + + debug_stats = self.get_stats() + + command_stats = self.get_command_stats(debug_stats) + self.assertNotEqual(command_stats, None) + self.assertEqual(command_stats["target list"], 2) ---------------- jeffreytan81 wrote:
I am pretty sure lldb test base class destroys debugger object during tearDown() between each test method which means the associated command interpreter will be destroyed as well. I have run "ninja check-lldb" to see no failure from this test (these tests has been running internally for half year now). https://github.com/llvm/llvm-project/pull/80375 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits