Remove protocol from new test submission, rely on base configuration
This commit is contained in:
1 parent
81e791abec
commit
2f789b5a2e
2 files changed
+5
-12
No files matched your search
+5
-4
@@ -53,19 +53,20 @@ def getSourceLocation(branch, repo):
|
|||||||
|
|
||||||
def newTest(request):
|
def newTest(request):
|
||||||
|
|
||||||
test = Test() # New Test, saved only after parsing
|
# New Test saved after parsing
|
||||||
|
test = Test()
|
||||||
test.author = request.user.username
|
test.author = request.user.username
|
||||||
test.engine = request.POST['enginename']
|
test.engine = request.POST['enginename']
|
||||||
|
|
||||||
# Extract Development Fields
|
# Extract Development Fields
|
||||||
devname = request.POST['devbranch']
|
devname = request.POST['devbranch']
|
||||||
devbench = int(request.POST['devbench'])
|
devbench = int(request.POST['devbench'])
|
||||||
devprotocol = request.POST['devprotocol']
|
devprotocol = FRAMEWORK_DEFAULTS['config']['engines'][test.engine]['proto']
|
||||||
|
|
||||||
# Extract Base Fields
|
# Extract Base Fields
|
||||||
basename = request.POST['basebranch']
|
basename = request.POST['basebranch']
|
||||||
basebench = int(request.POST['basebench'])
|
basebench = int(request.POST['basebench'])
|
||||||
baseprotocol = request.POST['baseprotocol']
|
baseprotocol = FRAMEWORK_DEFAULTS['config']['engines'][test.engine]['proto']
|
||||||
|
|
||||||
# Extract test configuration
|
# Extract test configuration
|
||||||
test.source = request.POST['source']
|
test.source = request.POST['source']
|
||||||
@@ -92,7 +93,7 @@ def newTest(request):
|
|||||||
basesha, basesource = getSourceLocation(basename, test.source)
|
basesha, basesource = getSourceLocation(basename, test.source)
|
||||||
test.base = getEngine(basename, basesource, baseprotocol, basesha, basebench)
|
test.base = getEngine(basename, basesource, baseprotocol, basesha, basebench)
|
||||||
|
|
||||||
# Track # of tests by this user
|
# Track number of tests by this user
|
||||||
profile = Profile.objects.get(user=request.user)
|
profile = Profile.objects.get(user=request.user)
|
||||||
profile.tests += 1
|
profile.tests += 1
|
||||||
profile.save()
|
profile.save()
|
||||||
|
|||||||
@@ -6,7 +6,6 @@
|
|||||||
var configurations = {
|
var configurations = {
|
||||||
{% for name, data in config.engines.items %}
|
{% for name, data in config.engines.items %}
|
||||||
'{{name}}' : {
|
'{{name}}' : {
|
||||||
'proto' : "{{data.proto}}",
|
|
||||||
'stc' : {
|
'stc' : {
|
||||||
"threads" : "{{data.stc.threads}}",
|
"threads" : "{{data.stc.threads}}",
|
||||||
"hash" : "{{data.stc.hash}}",
|
"hash" : "{{data.stc.hash}}",
|
||||||
@@ -44,14 +43,11 @@
|
|||||||
var threads = configurations[engine][mode]["threads"];
|
var threads = configurations[engine][mode]["threads"];
|
||||||
var hash = configurations[engine][mode]["hash"];
|
var hash = configurations[engine][mode]["hash"];
|
||||||
var timecontrol = configurations[engine][mode]["timecontrol"];
|
var timecontrol = configurations[engine][mode]["timecontrol"];
|
||||||
var protocol = configurations[engine]["proto"];
|
|
||||||
|
|
||||||
// Adjust all the fields to auto-fill the settings
|
// Adjust all the fields to auto-fill the settings
|
||||||
document.getElementById("devoptions").value = "Threads=" + threads + " Hash=" + hash;
|
document.getElementById("devoptions").value = "Threads=" + threads + " Hash=" + hash;
|
||||||
document.getElementById("baseoptions").value = "Threads=" + threads + " Hash=" + hash;
|
document.getElementById("baseoptions").value = "Threads=" + threads + " Hash=" + hash;
|
||||||
document.getElementById("timecontrol").value = timecontrol;
|
document.getElementById("timecontrol").value = timecontrol;
|
||||||
document.getElementById("devprotocol").value = protocol;
|
|
||||||
document.getElementById("baseprotocol").value = protocol;
|
|
||||||
}
|
}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
@@ -73,16 +69,12 @@
|
|||||||
<input name="devbench"></br>
|
<input name="devbench"></br>
|
||||||
<label> Dev Options </label>
|
<label> Dev Options </label>
|
||||||
<input id="devoptions" name="devoptions"></br>
|
<input id="devoptions" name="devoptions"></br>
|
||||||
<label> Dev Protocol </label>
|
|
||||||
<input id="devprotocol" name="devprotocol"></br>
|
|
||||||
<label> Base Branch </label>
|
<label> Base Branch </label>
|
||||||
<input value="master" name="basebranch"></br>
|
<input value="master" name="basebranch"></br>
|
||||||
<label> Base Bench </label>
|
<label> Base Bench </label>
|
||||||
<input name="basebench"></br>
|
<input name="basebench"></br>
|
||||||
<label> Base Options </label>
|
<label> Base Options </label>
|
||||||
<input id="baseoptions" name="baseoptions"></br>
|
<input id="baseoptions" name="baseoptions"></br>
|
||||||
<label> Base Protocol </label>
|
|
||||||
<input id="baseprotocol" name="baseprotocol"></br>
|
|
||||||
<label> Source </label>
|
<label> Source </label>
|
||||||
<input value="{{profile.repo}}" name="source"></br>
|
<input value="{{profile.repo}}" name="source"></br>
|
||||||
<label> Opening Book </label>
|
<label> Opening Book </label>
|
||||||
|
|||||||
Reference in new issue
Block a user