diff options
| author | Brian Potchik <brian@vector35.com> | 2020-09-13 23:11:32 -0400 |
|---|---|---|
| committer | Brian Potchik <brian@vector35.com> | 2020-09-13 23:11:32 -0400 |
| commit | 1acc58d472470f96f12ac4dfc78dc221775d18d3 (patch) | |
| tree | 4978099506a83fbbbd347a5d0d69b42a821c34e2 /suite/generator.py | |
| parent | 4b15ec8bebac3e04e954d4eb216df66cb101c02a (diff) | |
Disable logging during headless unit tests.
Diffstat (limited to 'suite/generator.py')
| -rwxr-xr-x | suite/generator.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/suite/generator.py b/suite/generator.py index a349789e..7f91a97f 100755 --- a/suite/generator.py +++ b/suite/generator.py @@ -125,12 +125,17 @@ 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) @@ -322,6 +327,7 @@ def generate(test_store, outdir, exclude_binaries): def main(): + testcommon.disable_logging() usage = "usage: %prog [-q] [-x] [-o <dir>] [-i <dir>]" parser = OptionParser(usage=usage) default_output = os.path.relpath(os.path.join(os.path.dirname(__file__), os.pardir, os.pardir, "suite")) |
