diff --git a/.gitignore b/.gitignore index 3b04262c..cbc97a7b 100644 --- a/.gitignore +++ b/.gitignore @@ -9,9 +9,13 @@ *.swp *.tmp +# configuration file directory for VS Code +.vscode/ + # Python things __pycache__/ .pylintrc +.venv/ # Default build and log directories bd/ diff --git a/build_all.py b/build_all.py index c154a289..471afdb2 100755 --- a/build_all.py +++ b/build_all.py @@ -386,8 +386,8 @@ def set_parameters(args): with open(conf_file) as fileh: try: exec(fileh.read(), globals(), config[conf]) - except PermissionError: - log.error('ERROR: Corrupt config file {conf_file}: exiting') + except Exception: + log.error(f'ERROR: Corrupt config file "{conf_file}": exiting') sys.exit(1) # Populate user values from the command line @@ -681,8 +681,10 @@ def link_benchmark(bench): log.warning('Warning: Link of benchmark "{bench}" failed'.format(bench=bench)) succeeded = False - log.debug(res.stdout.decode('utf-8')) - log.debug(res.stderr.decode('utf-8')) + if (len(res.stdout) != 0): + log.debug(res.stdout.decode('utf-8')) + if (len(res.stderr) != 0): + log.debug(res.stderr.decode('utf-8')) except subprocess.TimeoutExpired: log.warning('Warning: link of benchmark "{bench}" timed out'.format(bench=bench)) @@ -735,6 +737,7 @@ def main(): successful = compile_support() if successful: log.debug('Compilation of support files successful') + log.debug('') for bench in benchmarks: res = compile_benchmark(bench) @@ -745,7 +748,7 @@ def main(): successful &= res if res: log.debug('Linking of benchmark "{bench}" successful'.format(bench=bench)) - log.info(bench) + log.debug('') if successful: log.info('All benchmarks built successfully') diff --git a/pylib/run_gdbserver_sim.py b/pylib/run_gdbserver_sim.py index e2269675..624b86f1 100644 --- a/pylib/run_gdbserver_sim.py +++ b/pylib/run_gdbserver_sim.py @@ -99,6 +99,10 @@ def decode_results(stdout_str, stderr_str): if not rcstr: log.debug('Warning: Failed to find return code') return 0.0 + exit_status = int(rcstr.group(1)) + if exit_status: + log.debug('Warning: verify_benchmark() failed') + return 0.0 # The start and end cycle counts are in the stderr string times = re.search('(\d+)\D+(\d+)', stderr_str, re.S) diff --git a/pylib/run_mac.py b/pylib/run_mac.py index 6b789093..a01b1ca5 100644 --- a/pylib/run_mac.py +++ b/pylib/run_mac.py @@ -58,6 +58,10 @@ def decode_results(stdout_str, stderr_str): if not rcstr: log.debug('Warning: Failed to find return code') return 0.0 + exit_status = int(rcstr.group(1)) + if exit_status: + log.debug('Warning: verify_benchmark() failed') + return 0.0 # Match "Real time: dd.ddd" time = re.search('^Real time: (\d+)[.](\d+)', stdout_str, re.S) diff --git a/pylib/run_native.py b/pylib/run_native.py index df5a73cf..0ed98033 100644 --- a/pylib/run_native.py +++ b/pylib/run_native.py @@ -58,6 +58,10 @@ def decode_results(stdout_str, stderr_str): if not rcstr: log.debug('Warning: Failed to find return code') return 0.0 + exit_status = int(rcstr.group(1)) + if exit_status: + log.debug('Warning: verify_benchmark() failed') + return 0.0 # Match "real s.mm?m?" time = re.search('^real (\d+)[.](\d+)', stderr_str, re.S) diff --git a/pylib/run_stm32f4-discovery.py b/pylib/run_stm32f4-discovery.py index d83283ac..e1c7de4b 100644 --- a/pylib/run_stm32f4-discovery.py +++ b/pylib/run_stm32f4-discovery.py @@ -97,6 +97,10 @@ def decode_results(stdout_str, stderr_str): if not rcstr: log.debug('Warning: Failed to find return code') return 0.0 + exit_status = int(rcstr.group(1)) + if exit_status: + log.debug('Warning: verify_benchmark() failed') + return 0.0 # The start and end cycle counts are in the stderr string starttime = re.search('\$1 = (\d+)', stdout_str, re.S)