diff --git a/Client/utils.py b/Client/utils.py index 79e3583..914f389 100644 --- a/Client/utils.py +++ b/Client/utils.py @@ -296,12 +296,17 @@ def download_public_engine(engine, net_path, branch, source, make_path, out_path # Prepare the MAKEFILE command make_path = os.path.join(src_path, make_path) bin_path = os.path.join(make_path, os.path.basename(out_path)) - make_cmd = makefile_command(net_path, make_path, bin_path, compiler) + make_cmd = makefile_command(net_path, make_path, os.path.basename(out_path), compiler) # Build the engine, which will produce a binary to bin_path, to be moved after process = subprocess.Popen(make_cmd, cwd=make_path, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) comp_output = process.communicate()[0].decode('utf-8') + # Verify that the compilation subprocess did not exit with errors + if process.returncode: + message = 'Error during compilation. The logs have been sent to the server' + raise OpenBenchBuildFailedException(message, comp_output) + # Move the binary to the proper out_path, account for Windows and cross-drive moves if check_for_engine_binary(bin_path): shutil.move(check_for_engine_binary(bin_path), os.path.dirname(out_path)) diff --git a/Client/worker.py b/Client/worker.py index 8b91b17..e2f3c4a 100644 --- a/Client/worker.py +++ b/Client/worker.py @@ -1061,6 +1061,12 @@ def download_engine(config, branch, net_path): engine, net_path, branch_name, source, make_path, out_path, compiler) except OpenBenchBuildFailedException as error: + + print ('Failed to build %s-%s...\n\nCompiler Output:' % (engine, branch_name)) + for line in error.logs.split('\n'): + print ('> %s' % (line)) + print () + ServerReporter.report_build_fail(config, branch, error.logs) raise