summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjasplin <qt-info@nokia.com>2011-02-24 12:21:34 +0100
committerjasplin <qt-info@nokia.com>2011-02-24 12:21:34 +0100
commit7fe851cf98d118579c34d1a0558d8ab772f59e81 (patch)
tree99e4308e6a54cb77386b67125e3e3bcbc4c1a2ba
parent8797dee5b8624b69bbf914e5682acb8e9285ea60 (diff)
Minor cleanup.
-rwxr-xr-xscripts/finalizeresults.py8
-rwxr-xr-xscripts/getstats.py8
-rwxr-xr-xscripts/runtests.py9
-rwxr-xr-xscripts/uploadresults.py8
4 files changed, 25 insertions, 8 deletions
diff --git a/scripts/finalizeresults.py b/scripts/finalizeresults.py
index c335de2..2ff9a45 100755
--- a/scripts/finalizeresults.py
+++ b/scripts/finalizeresults.py
@@ -7,7 +7,7 @@ from misc import (
isValidSHA1, getBMTimeSeriesStatsList)
-# === Global functions ===============================================
+# --- BEGIN Global functions ----------------------------------------------
def printUsage():
print (
@@ -294,8 +294,10 @@ def updateRankings(host_id, platform_id, branch_id, sha12_id, context2_id):
sys.stdout.write("\n")
+# --- END Global functions ----------------------------------------------
-# === Main program ===================================================
+
+# --- BEGIN Main program ----------------------------------------------
options, http_get = getOptions()
@@ -346,3 +348,5 @@ updateRankings(host_id, platform_id, branch_id, sha12_id, context2_id)
commit()
print "finalization done"
+
+# --- END Main program ----------------------------------------------
diff --git a/scripts/getstats.py b/scripts/getstats.py
index feb665a..d0b7d59 100755
--- a/scripts/getstats.py
+++ b/scripts/getstats.py
@@ -16,7 +16,7 @@ from dbaccess import setDatabase
from misc import getOptions, printErrorAsJSON
import sys
-# === Global functions ===============================================
+# --- BEGIN Global functions ----------------------------------------------
# Returns a command instance.
def createCommand(options, http_get):
@@ -294,9 +294,13 @@ def createCommand(options, http_get):
printUsageError()
sys.exit(1)
+# --- END Global functions ----------------------------------------------
-# === Main program ===================================================
+
+# --- BEGIN Main program ----------------------------------------------
options, http_get = getOptions()
command = createCommand(options, http_get)
command.execute()
+
+# --- END Main program ----------------------------------------------
diff --git a/scripts/runtests.py b/scripts/runtests.py
index 2de9cc9..17349b0 100755
--- a/scripts/runtests.py
+++ b/scripts/runtests.py
@@ -20,7 +20,7 @@ import os
from subprocess import Popen, PIPE
from datetime import datetime
-# === Global functions ===================================================
+# --- BEGIN Global functions ----------------------------------------------
def printUsage():
print(
@@ -123,7 +123,10 @@ def uploadResults(prog, host, platform, branch, sha1, timestamp, results_file):
if (err_msg != ""):
raise Exception(err_msg)
-# === Main program ===================================================
+# --- END Global functions ----------------------------------------------
+
+
+# --- BEGIN Main program ----------------------------------------------
args = getArgs()
@@ -168,3 +171,5 @@ for run in range(nruns):
print "failed:\n ", sys.exc_info()
print "done"
+
+# --- END Main program ----------------------------------------------
diff --git a/scripts/uploadresults.py b/scripts/uploadresults.py
index 9d22315..7f9c7f9 100755
--- a/scripts/uploadresults.py
+++ b/scripts/uploadresults.py
@@ -6,7 +6,7 @@ from dbaccess import setDatabase, execQuery, commit
from misc import getOptions, isValidSHA1, getContext
-# === Global functions ===============================================
+# --- BEGIN Global functions ----------------------------------------------
def printUsage():
print (
@@ -240,8 +240,10 @@ def uploadToDatabase(dbhost, dbport, db, host, platform, branch, sha1, results):
# Write to database:
commit()
+# --- END Global functions ----------------------------------------------
-# === Main program ===================================================
+
+# --- BEGIN Main program ----------------------------------------------
options, http_get = getOptions()
@@ -271,3 +273,5 @@ uploadToDatabase(
options["sha1"], results)
print "uploading done"
+
+# --- END Main program ----------------------------------------------