diff --git a/.coveragerc b/.coveragerc index a9eb6a64..0df8ae34 100644 --- a/.coveragerc +++ b/.coveragerc @@ -10,6 +10,7 @@ omit = debug.py [paths] source = + ../.. /home/gitlab-runner/builds/2fd64746/0 /home/gitlab-runner/builds/2fd64746/1 /home/gitlab-runner/builds/2fd64746/2 @@ -25,4 +26,4 @@ exclude_lines = raise NotImplementedError if 0: if __name__ == "__main__": - if not OPTS.is_unit_test \ No newline at end of file + if not OPTS.is_unit_test diff --git a/compiler/globals.py b/compiler/globals.py index f6a2820b..90a209f5 100644 --- a/compiler/globals.py +++ b/compiler/globals.py @@ -395,11 +395,15 @@ def import_tech(): def print_time(name, now_time, last_time=None, indentation=2): """ Print a statement about the time delta. """ - if last_time: - time = str(round((now_time-last_time).total_seconds(),1)) + " seconds" - else: - time = now_time.strftime('%m/%d/%Y %H:%M:%S') - print("{0} {1}: {2}".format("*"*indentation,name,time)) + global OPTS + + # Don't print during testing + if not OPTS.is_unit_test or OPTS.debug_level>0: + if last_time: + time = str(round((now_time-last_time).total_seconds(),1)) + " seconds" + else: + time = now_time.strftime('%m/%d/%Y %H:%M:%S') + print("{0} {1}: {2}".format("*"*indentation,name,time)) def report_status(): diff --git a/compiler/openram.py b/compiler/openram.py index 4900e054..fa52f3a2 100755 --- a/compiler/openram.py +++ b/compiler/openram.py @@ -26,15 +26,15 @@ if len(args) != 1: # These depend on arguments, so don't load them until now. import debug -# Keep track of running stats -start_time = datetime.datetime.now() -print_time("Start",start_time) - init_openram(config_file=args[0], is_unit_test=False) # Only print banner here so it's not in unit tests print_banner() +# Keep track of running stats +start_time = datetime.datetime.now() +print_time("Start",start_time) + # Output info about this run report_status()