diff --git a/OpenBench/utils.py b/OpenBench/utils.py
index 050da7a..55abc3f 100644
--- a/OpenBench/utils.py
+++ b/OpenBench/utils.py
@@ -53,19 +53,20 @@ def getSourceLocation(branch, repo):
def newTest(request):
- test = Test() # New Test, saved only after parsing
+ # New Test saved after parsing
+ test = Test()
test.author = request.user.username
test.engine = request.POST['enginename']
# Extract Development Fields
devname = request.POST['devbranch']
devbench = int(request.POST['devbench'])
- devprotocol = request.POST['devprotocol']
+ devprotocol = FRAMEWORK_DEFAULTS['config']['engines'][test.engine]['proto']
# Extract Base Fields
basename = request.POST['basebranch']
basebench = int(request.POST['basebench'])
- baseprotocol = request.POST['baseprotocol']
+ baseprotocol = FRAMEWORK_DEFAULTS['config']['engines'][test.engine]['proto']
# Extract test configuration
test.source = request.POST['source']
@@ -92,7 +93,7 @@ def newTest(request):
basesha, basesource = getSourceLocation(basename, test.source)
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.tests += 1
profile.save()
diff --git a/Templates/OpenBench/newTest.html b/Templates/OpenBench/newTest.html
index c0f0ba2..48f1301 100644
--- a/Templates/OpenBench/newTest.html
+++ b/Templates/OpenBench/newTest.html
@@ -6,7 +6,6 @@
var configurations = {
{% for name, data in config.engines.items %}
'{{name}}' : {
- 'proto' : "{{data.proto}}",
'stc' : {
"threads" : "{{data.stc.threads}}",
"hash" : "{{data.stc.hash}}",
@@ -44,14 +43,11 @@
var threads = configurations[engine][mode]["threads"];
var hash = configurations[engine][mode]["hash"];
var timecontrol = configurations[engine][mode]["timecontrol"];
- var protocol = configurations[engine]["proto"];
// Adjust all the fields to auto-fill the settings
document.getElementById("devoptions").value = "Threads=" + threads + " Hash=" + hash;
document.getElementById("baseoptions").value = "Threads=" + threads + " Hash=" + hash;
document.getElementById("timecontrol").value = timecontrol;
- document.getElementById("devprotocol").value = protocol;
- document.getElementById("baseprotocol").value = protocol;
}
{% endblock %}
{% block content %}
@@ -73,16 +69,12 @@
-
-
-
-