Add teardown hook to clear image-search-paths after the test.
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@124806 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/load_unload/TestLoadUnload.py b/test/load_unload/TestLoadUnload.py
index f4db75c..def3aef 100644
--- a/test/load_unload/TestLoadUnload.py
+++ b/test/load_unload/TestLoadUnload.py
@@ -52,6 +52,8 @@
self.expect("image list",
substrs = [old_dylib])
self.runCmd("target image-search-paths add %s %s" % (os.getcwd(), new_dir))
+ # Add teardown hook to clear image-search-paths after the test.
+ self.addTearDownHook(lambda: self.runCmd("target image-search-paths clear"))
self.expect("image list", "LLDB successfully locates the relocated dynamic library",
substrs = [new_dylib])