diff --git a/avocado/utils/external/gdbmi_parser.py b/avocado/utils/external/gdbmi_parser.py index 8f43643614524a9202abc4e374b808255d8955ef..70119c65368c251a71b1e66da2c930d6803d4445 100644 --- a/avocado/utils/external/gdbmi_parser.py +++ b/avocado/utils/external/gdbmi_parser.py @@ -171,7 +171,7 @@ def __private(): exclude = [ 'record_list' ] - if len(args) == 1 and type not in exclude: + if len(args) == 1 and token_type not in exclude: return args[0] return spark.GenericASTBuilder.nonterminal(self, token_type, args) diff --git a/examples/tests/gdbtest.py b/examples/tests/gdbtest.py index 89523f7b4c55edd6bd67a5dcd968dc16ccb98c0b..340c62accff80380a54c7603ddc588ba0e87be6c 100755 --- a/examples/tests/gdbtest.py +++ b/examples/tests/gdbtest.py @@ -360,7 +360,7 @@ class GdbTest(Test): self.assertTrue(os.path.exists(s.stderr_path)) stderr_lines = genio.read_all_lines(s.stderr_path) - listening_line = "Listening on port %s\n" % s.port + listening_line = "Listening on port %s" % s.port self.assertIn(listening_line, stderr_lines) def test_server_stdout(self): @@ -376,7 +376,7 @@ class GdbTest(Test): self.assertTrue(os.path.exists(s.stderr_path)) stdout_lines = genio.read_all_lines(s.stdout_path) - self.assertIn("return 99\n", stdout_lines) + self.assertIn("return 99", stdout_lines) def test_interactive_stdout(self): """