Kill tests upon completion
This commit is contained in:
1 parent
4de8465c85
commit
bd6389fbc9
3 files changed
+8
-8
No files matched your search
+7
-5
@@ -270,7 +270,7 @@ def reportWrongBench(data, engine):
|
|||||||
'password' : PASSWORD,
|
'password' : PASSWORD,
|
||||||
'engineid' : engine['id'],
|
'engineid' : engine['id'],
|
||||||
'testid' : data['test']['id']}
|
'testid' : data['test']['id']}
|
||||||
requests.post('{0}/wrongBench/'.format(SERVER), data=postdata)
|
return requests.post('{0}/wrongBench/'.format(SERVER), data=postdata).text
|
||||||
|
|
||||||
def reportNPS(data, nps):
|
def reportNPS(data, nps):
|
||||||
|
|
||||||
@@ -280,13 +280,13 @@ def reportNPS(data, nps):
|
|||||||
'username' : USERNAME,
|
'username' : USERNAME,
|
||||||
'password' : PASSWORD,
|
'password' : PASSWORD,
|
||||||
'machineid' : data['machine']['id']}
|
'machineid' : data['machine']['id']}
|
||||||
requests.post('{0}/submitNPS/'.format(SERVER), data=postdata)
|
return requests.post('{0}/submitNPS/'.format(SERVER), data=postdata).text
|
||||||
|
|
||||||
def reportResults(data, wins, losses, draws, crashes, timeloss):
|
def reportResults(data, wins, losses, draws, crashes, timeloss):
|
||||||
|
|
||||||
# Server wants verification for reporting nps counts
|
# Server wants verification for reporting nps counts
|
||||||
postdata = {
|
postdata = {
|
||||||
'wins' : wins,
|
'wins' : 200,#wins,
|
||||||
'losses' : losses,
|
'losses' : losses,
|
||||||
'draws' : draws,
|
'draws' : draws,
|
||||||
'crashes' : crashes,
|
'crashes' : crashes,
|
||||||
@@ -296,7 +296,7 @@ def reportResults(data, wins, losses, draws, crashes, timeloss):
|
|||||||
'machineid' : data['machine']['id'],
|
'machineid' : data['machine']['id'],
|
||||||
'resultid' : data['result']['id'],
|
'resultid' : data['result']['id'],
|
||||||
'testid' : data['test']['id']}
|
'testid' : data['test']['id']}
|
||||||
requests.post('{0}/submitResults/'.format(SERVER), data=postdata)
|
return requests.post('{0}/submitResults/'.format(SERVER), data=postdata).text
|
||||||
|
|
||||||
def completeWorkload(data):
|
def completeWorkload(data):
|
||||||
|
|
||||||
@@ -364,7 +364,9 @@ def completeWorkload(data):
|
|||||||
wins = score[0] - sent[0]
|
wins = score[0] - sent[0]
|
||||||
losses = score[1] - sent[1]
|
losses = score[1] - sent[1]
|
||||||
draws = score[2] - sent[2]
|
draws = score[2] - sent[2]
|
||||||
reportResults(data, wins, losses, draws, crashes, timeloss)
|
if reportResults(data, wins, losses, draws, crashes, timeloss) == 'Stop':
|
||||||
|
killProcess(process)
|
||||||
|
break
|
||||||
crashes = timeloss = 0
|
crashes = timeloss = 0
|
||||||
sent = score[::]
|
sent = score[::]
|
||||||
|
|
||||||
|
|||||||
+1
-3
@@ -426,8 +426,6 @@ def submitResults(request):
|
|||||||
|
|
||||||
# Try to update each location
|
# Try to update each location
|
||||||
try: OpenBench.utils.update(request)
|
try: OpenBench.utils.update(request)
|
||||||
except Exception as error:
|
except: return HttpResponse('Stop')
|
||||||
print (error)
|
|
||||||
return HttpResponse('Stop')
|
|
||||||
|
|
||||||
return HttpResponse('None')
|
return HttpResponse('None')
|
||||||
BIN
Binary file not shown.
Reference in new issue
Block a user