Notify the server when an engine fails to compile (#91)
This commit is contained in:
1 parent
90ea5015da
commit
91ab61ea5d
1 file changed
+21
@@ -66,6 +66,7 @@ ERRORS = {
|
|||||||
'cutechess' : 'Unable to fetch Cutechess location and download it!',
|
'cutechess' : 'Unable to fetch Cutechess location and download it!',
|
||||||
'configure' : 'Unable to fetch and determine acceptable workloads!',
|
'configure' : 'Unable to fetch and determine acceptable workloads!',
|
||||||
'request' : 'Unable to reach server for workload request!',
|
'request' : 'Unable to reach server for workload request!',
|
||||||
|
'build_fail' : 'Unablt to reach server to report failed build!',
|
||||||
'bad_bench' : 'Unable to reach server to report bad benchmark!',
|
'bad_bench' : 'Unable to reach server to report bad benchmark!',
|
||||||
'bench_nps' : 'Unable to reach server to report benchmark NPS!',
|
'bench_nps' : 'Unable to reach server to report benchmark NPS!',
|
||||||
'report_error' : 'Unable to reach server to report engine failure!',
|
'report_error' : 'Unable to reach server to report engine failure!',
|
||||||
@@ -437,6 +438,20 @@ def server_request_workload(arguments):
|
|||||||
target = url_join(arguments.server, 'clientGetWorkload')
|
target = url_join(arguments.server, 'clientGetWorkload')
|
||||||
return requests.post(target, data=payload, timeout=TIMEOUT_HTTP)
|
return requests.post(target, data=payload, timeout=TIMEOUT_HTTP)
|
||||||
|
|
||||||
|
@try_until_success(mesg=ERRORS['build_fail'])
|
||||||
|
def server_report_build_fail(arguments, workload, branch):
|
||||||
|
|
||||||
|
payload = {
|
||||||
|
'username' : arguments.username,
|
||||||
|
'password' : arguments.password,
|
||||||
|
'testid' : workload['test']['id'],
|
||||||
|
'machineid' : workload['machine']['id'],
|
||||||
|
'error' : '%s build failed' % (workload['test'][branch])
|
||||||
|
}
|
||||||
|
|
||||||
|
target = url_join(arguments.server, 'clientSubmitError')
|
||||||
|
requests.post(target, data=payload, timeout=TIMEOUT_HTTP)
|
||||||
|
|
||||||
@try_until_success(mesg=ERRORS['bad_bench'])
|
@try_until_success(mesg=ERRORS['bad_bench'])
|
||||||
def server_report_bad_bench(arguments, workload, branch, bench):
|
def server_report_bad_bench(arguments, workload, branch, bench):
|
||||||
|
|
||||||
@@ -550,6 +565,8 @@ def complete_workload(arguments, workload):
|
|||||||
dev_name = download_engine(arguments, workload, 'dev', dev_network)
|
dev_name = download_engine(arguments, workload, 'dev', dev_network)
|
||||||
base_name = download_engine(arguments, workload, 'base', base_network)
|
base_name = download_engine(arguments, workload, 'base', base_network)
|
||||||
|
|
||||||
|
if dev_name == None or base_name == None: return
|
||||||
|
|
||||||
dev_bench, dev_nps = run_benchmarks(arguments, workload, 'dev', dev_name)
|
dev_bench, dev_nps = run_benchmarks(arguments, workload, 'dev', dev_name)
|
||||||
base_bench, base_nps = run_benchmarks(arguments, workload, 'base', base_name)
|
base_bench, base_nps = run_benchmarks(arguments, workload, 'base', base_name)
|
||||||
|
|
||||||
@@ -675,6 +692,10 @@ def download_engine(arguments, workload, branch, network):
|
|||||||
shutil.rmtree('tmp')
|
shutil.rmtree('tmp')
|
||||||
return final_name + '.exe'
|
return final_name + '.exe'
|
||||||
|
|
||||||
|
# Notify the server if the build failed
|
||||||
|
server_report_build_fail(arguments, workload, branch)
|
||||||
|
return None
|
||||||
|
|
||||||
def run_benchmarks(arguments, workload, branch, engine):
|
def run_benchmarks(arguments, workload, branch, engine):
|
||||||
|
|
||||||
cores = int(arguments.threads)
|
cores = int(arguments.threads)
|
||||||
|
|||||||
Reference in new issue
Block a user