diff options
| author | Josh Ferrell <josh@vector35.com> | 2020-07-10 14:28:47 -0400 |
|---|---|---|
| committer | Josh Ferrell <josh@vector35.com> | 2020-07-10 14:28:47 -0400 |
| commit | 8abb6547d7fdb8b4148b60c5427201a664febb89 (patch) | |
| tree | d0e14985643ee2a0c56318e23aad70a394d17225 | |
| parent | de77d8ad64a3ed39e362f4fa979132d47d5a056c (diff) | |
Remove legacy clean save test
| -rw-r--r-- | suite/testcommon.py | 39 |
1 files changed, 2 insertions, 37 deletions
diff --git a/suite/testcommon.py b/suite/testcommon.py index 6bb841fa..6668471f 100644 --- a/suite/testcommon.py +++ b/suite/testcommon.py @@ -6,10 +6,10 @@ import zipfile import inspect import binaryninja as binja from binaryninja.binaryview import BinaryViewType, BinaryView -from binaryninja.filemetadata import FileMetadata +from binaryninja.filemetadata import FileMetadata, SaveSettings from binaryninja.datarender import DataRenderer from binaryninja.function import InstructionTextToken, DisassemblyTextLine -from binaryninja.enums import InstructionTextTokenType +from binaryninja.enums import InstructionTextTokenType, SaveOption import subprocess import re @@ -984,41 +984,6 @@ class VerifyBuilder(Builder): finally: self.delete_package("helloworld") - def test_verify_clean_save(self): - file_name = self.unpackage_file("helloworld") - try: - temp_name = next(tempfile._get_candidate_names()) + ".bndb" - - bv = binja.BinaryViewType['ELF'].open(file_name) - bv.update_analysis_and_wait() - - bv.begin_undo_actions() - bv.functions[0].set_comment(bv.functions[0].start, "This is a secret comment") - bv.commit_undo_actions() - - bv.begin_undo_actions() - bv.functions[0].set_comment(bv.functions[0].start, "Function start!") - bv.commit_undo_actions() - - bv.create_database(temp_name, clean=True) - bv.file.close() - del bv - - bv = binja.FileMetadata(temp_name).open_existing_database(temp_name).get_view_of_type('ELF') - bv.update_analysis_and_wait() - - bv.undo() - - comment = bv.functions[0].get_comment_at(bv.functions[0].start) - - bv.file.close() - del bv - os.unlink(temp_name) - - return comment == "Function start!" - finally: - self.delete_package("helloworld") - def test_memory_leaks(self): """Detected memory leaks during analysis""" # This test will attempt to detect object leaks during headless analysis |
