diff --git a/tools/build_api.py b/tools/build_api.py index 4a3de865d38..0f25ffa7757 100644 --- a/tools/build_api.py +++ b/tools/build_api.py @@ -1357,4 +1357,4 @@ def merge_build_data(filename, toolchain_report, app_type): if 'type' not in build[0]: build[0]['type'] = app_type build_data['builds'].insert(0, build[0]) - dump(build_data, open(filename, "wb"), indent=4, separators=(',', ': ')) + dump(build_data, open(filename, "w"), indent=4, separators=(',', ': ')) diff --git a/tools/run_icetea.py b/tools/run_icetea.py index bf2706f0356..80eb9caef0f 100644 --- a/tools/run_icetea.py +++ b/tools/run_icetea.py @@ -166,15 +166,18 @@ def get_application_list(icetea_json_output, tests_by_name): def icetea_tests(target, tcdir, verbose): + if not os.path.exists(tcdir): + raise Exception("Icetea run error: No TEST_APPS folder in {}".format(os.path.curdir)) + command = ['icetea', '--tcdir', tcdir, '--list', '--json', '--platform_filter', target] \ + (['-v'] if verbose else []) stdout, stderr, returncode = run_cmd(command) if returncode != 0: - raise Exception( - "Error when running icetea. \ncwd:{} \nCommand:'{}' \noutput:{}".format(os.getcwd(), ' '.join(command), - stderr.decode())) + additional_information = "\ncwd:{} \nCommand:'{}' \noutput:{}".format(os.getcwd(), ' '.join(command), + stderr.decode()) + raise Exception("Error when running icetea. {}".format(additional_information)) return json.loads(stdout)