diff options
author | jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> | 2008-05-01 22:22:51 +0000 |
---|---|---|
committer | jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> | 2008-05-01 22:22:51 +0000 |
commit | 45a7da3ce181b94927c1e8e0c45069ca92c18b1f (patch) | |
tree | e72f73350bd012e71f88495ac97e29486cf674dc /tko | |
parent | 8c19c0c9329a5efc9c239961cfc9a513b0ee5780 (diff) |
Convert tko/*.cgi to use absolute imports, to resolve some
ambiguity with importing "frontend".
Signed-off-by: John Admanski <jadmanski@google.com>
git-svn-id: svn://test.kernel.org/autotest/trunk@1482 592f7852-d20e-0410-864c-8624ca9c26a4
Diffstat (limited to 'tko')
-rwxr-xr-x | tko/compose_query.cgi | 20 | ||||
-rw-r--r-- | tko/machine_aggr.cgi | 9 | ||||
-rwxr-xr-x | tko/machine_benchmark.cgi | 5 | ||||
-rwxr-xr-x | tko/machine_test_attribute_graph.cgi | 9 | ||||
-rw-r--r-- | tko/test.cgi | 5 |
5 files changed, 18 insertions, 30 deletions
diff --git a/tko/compose_query.cgi b/tko/compose_query.cgi index 4e94d52a..e21edfde 100755 --- a/tko/compose_query.cgi +++ b/tko/compose_query.cgi @@ -7,18 +7,14 @@ in the matrix. """ print "Content-type: text/html\n" -import cgi, cgitb, re, datetime, query_lib, time -import sys, os -import urllib - -total_wall_time_start = time.time(); -tko = os.path.dirname(os.path.realpath(os.path.abspath(sys.argv[0]))) -sys.path.insert(0, tko) - -import display, frontend, db, query_lib -client_bin = os.path.abspath(os.path.join(tko, '../client/bin')) -sys.path.insert(0, client_bin) -import kernel_versions + +import sys, os, urllib, cgi, cgitb, re, datetime, time + +total_wall_time_start = time.time() + +import common +from autotest_lib.tko import display, frontend, db, query_lib +from autotest_lib.client.bin import kernel_versions html_header = """\ <form action="compose_query.cgi" method="get"> diff --git a/tko/machine_aggr.cgi b/tko/machine_aggr.cgi index 5c23644c..ea8009e7 100644 --- a/tko/machine_aggr.cgi +++ b/tko/machine_aggr.cgi @@ -6,12 +6,9 @@ import cgi, cgitb, os, sys, re, subprocess cgitb.enable() Popen = subprocess.Popen -tko = os.path.dirname(os.path.realpath(os.path.abspath(sys.argv[0]))) -sys.path.insert(0, tko) -import db, display, frontend, plotgraph -client_bin = os.path.abspath(os.path.join(tko, '../client/bin')) -sys.path.insert(0, client_bin) -import kernel_versions +import common +from autotest_lib.tko import db, display, frontend, plotgraph +from autotest_lib.client.bin import kernel_versions released_kernel = re.compile('2\.\d\.\d+(-smp-)[0-9]{3}\.[0-9]$') rc_kernel = re.compile('2\.\d\.\d+(-smp-)[0-9]{3}\.[0-9]_rc[0-9]$') diff --git a/tko/machine_benchmark.cgi b/tko/machine_benchmark.cgi index d0b1aef0..0c7bc7d9 100755 --- a/tko/machine_benchmark.cgi +++ b/tko/machine_benchmark.cgi @@ -4,9 +4,8 @@ import cgi, cgitb, os, sys, re sys.stdout.flush() cgitb.enable() -tko = os.path.dirname(os.path.realpath(os.path.abspath(sys.argv[0]))) -sys.path.insert(0, tko) -import db, display, frontend +import common +from autotest_lib.tko import db, display, frontend db = db.db() diff --git a/tko/machine_test_attribute_graph.cgi b/tko/machine_test_attribute_graph.cgi index 8a16a6b6..2d5a4779 100755 --- a/tko/machine_test_attribute_graph.cgi +++ b/tko/machine_test_attribute_graph.cgi @@ -6,12 +6,9 @@ import cgi, cgitb, os, sys, re, subprocess cgitb.enable() Popen = subprocess.Popen -tko = os.path.dirname(os.path.realpath(os.path.abspath(sys.argv[0]))) -sys.path.insert(0, tko) -import db, display, frontend, plotgraph -client_bin = os.path.abspath(os.path.join(tko, '../client/bin')) -sys.path.insert(0, client_bin) -import kernel_versions +import common +from autotest_lib.tko import db, display, frontend, plotgraph +from autotest_lib.client.bin import kernel_versions db = db.db() diff --git a/tko/test.cgi b/tko/test.cgi index d96d82f5..a1597ae4 100644 --- a/tko/test.cgi +++ b/tko/test.cgi @@ -9,9 +9,8 @@ import cgi, cgitb, os, sys, re sys.stdout.flush() cgitb.enable() -tko = os.path.dirname(os.path.realpath(os.path.abspath(sys.argv[0]))) -sys.path.insert(0, tko) -import db, display, frontend +import common +from autotest_lib.tko import db, display, frontend db = db.db() |