[lldb/test] Prevent TestFrameRecognizer.py to fail because of internal recognizers...
authorMed Ismail Bennani <medismail.bennani@gmail.com>
Fri, 7 Feb 2020 16:28:34 +0000 (17:28 +0100)
committerMed Ismail Bennani <medismail.bennani@gmail.com>
Fri, 7 Feb 2020 16:35:29 +0000 (17:35 +0100)
By clearing the recognizers before starting the test, we ensure that the
recognizers that get initialized when lldb starts won't alter the
expected results of this test (i.e. recognizer index).

Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
lldb/packages/Python/lldbsuite/test/commands/frame/recognizer/TestFrameRecognizer.py

index 39ca761..683b2e8 100644 (file)
@@ -22,6 +22,9 @@ class FrameRecognizerTestCase(TestBase):
         target = self.dbg.CreateTarget(self.getBuildArtifact("a.out"))
         self.assertTrue(target, VALID_TARGET)
 
+        # Clear internal & plugins recognizers that get initialized at launch
+        self.runCmd("frame recognizer clear")
+
         self.runCmd("command script import " + os.path.join(self.getSourceDir(), "recognizer.py"))
 
         self.expect("frame recognizer list",