From 766746a4c82730f266e2ddd0dcb84eb4a09d56ca Mon Sep 17 00:00:00 2001 From: Brian Potchik Date: Wed, 16 Sep 2020 15:26:47 -0400 Subject: Add setting to control logging in headless. --- suite/generator.py | 6 ------ suite/testcommon.py | 4 ---- 2 files changed, 10 deletions(-) (limited to 'suite') diff --git a/suite/generator.py b/suite/generator.py index 7f91a97f..a349789e 100755 --- a/suite/generator.py +++ b/suite/generator.py @@ -125,17 +125,12 @@ class TestBinaryNinjaAPI(unittest.TestCase): if __name__ == "__main__": api_only = False - disable_logging = True if len(sys.argv) > 1: for i in range(1, len(sys.argv)): if sys.argv[i] == '-v' or sys.argv[i] == '-V' or sys.argv[i] == '--verbose': config.verbose = True elif sys.argv[i] == '--api-only': config.api_only = True - elif sys.argv[i] == '--log': - disable_logging = False - if disable_logging: - testcommon.disable_logging() test_suite = unittest.defaultTestLoader.loadTestsFromModule(api_test) test_suite = unittest.defaultTestLoader.loadTestsFromModule(rebasing_test) @@ -327,7 +322,6 @@ def generate(test_store, outdir, exclude_binaries): def main(): - testcommon.disable_logging() usage = "usage: %prog [-q] [-x] [-o ] [-i ]" parser = OptionParser(usage=usage) default_output = os.path.relpath(os.path.join(os.path.dirname(__file__), os.pardir, os.pardir, "suite")) diff --git a/suite/testcommon.py b/suite/testcommon.py index 4b49213e..78bfb19b 100644 --- a/suite/testcommon.py +++ b/suite/testcommon.py @@ -59,10 +59,6 @@ def fixStrRepr(string): # Python 2 and Python 3 represent Unicode character reprs differently return string.replace(b"\xe2\x80\xa6".decode("utf8"), "\\xe2\\x80\\xa6") - -def disable_logging(): - binja.disable_logging() - def get_file_list(test_store_rel): test_store = os.path.join(os.path.dirname(__file__), test_store_rel) all_files = [] -- cgit v1.3.1