Added support for test262. Increased timeout back to 10 minutes since this is a long one.
Added support for test262. Increased timeout back to 10 minutes since this is a long one.
--- a/client/results.py
+++ b/client/results.py
@@ -41,16 +41,23 @@ class SpeedTestReport(object):
if test == 'MazeSolver':
score = int(results_strs[0]['duration'])
score_str = '%d ms' % score
s += ' Duration: %s\n\n' % score_str
self.record_best_score(test, score, score_str, browser,
False)
continue
+ if test == 'test262':
+ score = int(results_strs[0]['score'])
+ score_str = '%d passes' % score
+ s += ' Score: %s\n\n' % score_str
+ self.record_best_score(test, score, score_str, browser)
+ continue
+
score = 0
results = map(lambda x: int(x['fps']), results_strs)
if len(results) == 1:
score = results[0]
score_str = '%d fps' % score
s += ' %s\n' % score_str
else:
if len(results) > 0:
--- a/client/speedtests.py
+++ b/client/speedtests.py
@@ -551,17 +551,17 @@ class TestRunnerRequestHandler(BaseHTTPS
self.wfile.write('<html></html>')
self.server.browser_runner.next_test()
def log_message(self, format, *args):
""" Suppress log output. """
return
-MAX_TEST_TIME = datetime.timedelta(seconds=60*5)
+MAX_TEST_TIME = datetime.timedelta(seconds=60*10)
def main():
from optparse import OptionParser
parser = OptionParser()
parser.add_option('-t', '--test', dest='tests', action='append', default=[])
parser.add_option('--testmode', dest='testmode', action='store_true')
parser.add_option('-n', '--noresults', dest='noresults', action='store_true')
(options, args) = parser.parse_args()
--- a/html/js/speedtest_results.js
+++ b/html/js/speedtest_results.js
@@ -192,25 +192,41 @@ function DurationScoreDisplay(testname,
this.scoreName = 'duration (ms)';
}
DurationScoreDisplay.prototype.getScore = function(testRunRecords) {
return testRunRecords[0].duration;
};
+TestsPassedScoreDisplay.prototype = new ScoreDisplay();
+TestsPassedScoreDisplay.prototype.constructor = TestsPassedScoreDisplay;
+function TestsPassedScoreDisplay(testname, records, browsers) {
+ ScoreDisplay.prototype.constructor.call(this, testname, records, browsers);
+ this.title = testname + ' test runs, number of tests passed (higher is better)';
+ this.scoreName = 'tests passed';
+}
+
+TestsPassedScoreDisplay.prototype.getScore = function(testRunRecords) {
+ return testRunRecords[0].score;
+};
+
+
function scoreDisplayFactory(testname, records, browsers) {
var scoreDisplayClass = null;
switch (testname) {
case 'PsychedelicBrowsing':
scoreDisplayClass = PsychBrowsingScoreDisplay;
break;
case 'MazeSolver':
scoreDisplayClass = DurationScoreDisplay;
break;
+ case 'test262':
+ scoreDisplayClass = TestsPassedScoreDisplay;
+ break;
default:
scoreDisplayClass = FpsScoreDisplay;
}
return new scoreDisplayClass(testname, records, browsers);
}
// FIXME: Make an object or something out of this stuff.
--- a/server/handlers.py
+++ b/server/handlers.py
@@ -43,17 +43,17 @@ def query_params():
params[name] = value
return params
def test_paths():
""" List of relative paths of test index files. """
tests = []
for d in os.listdir(HTML_DIR):
- for f in ('index.html', 'Default.html'):
+ for f in ('index.html', 'Default.html', 'default.html'):
if os.path.exists(os.path.join(HTML_DIR, d, f)):
tests.append(os.path.join(d, f))
break
tests.sort()
return tests
def test_names():