Remove all places where we are hardcoding python2.4 on the
scripts
Risk: Medium/High
Summary: After going trough the autotest tree, removing all places where
we have statements like
#!/usr/bin/python2.4
As they're unnecessary for those who have python > 2.4. Still, we want
to make sure we're running on something > 2.4 for those scripts, so I
hooked the scripts to the common lib infrastructure when needed. I tried
to be as careful as possible to make sure all scripts worked after my
modifications, I could even spot an import problem on
server/standalone_profiler.py and fix it.
Also, while I was there, I fixed several inconsistencies on the
mirror/mirror script.
Signed-off-by: Lucas Meneghel Rodrigues <lucasmr@br.ibm.com>
git-svn-id: http://test.kernel.org/svn/autotest/trunk@1527 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/common.py b/common.py
new file mode 100644
index 0000000..7654dab
--- /dev/null
+++ b/common.py
@@ -0,0 +1,8 @@
+import os, sys
+dirname = os.path.dirname(sys.modules[__name__].__file__)
+autotest_dir = dirname
+client_dir = os.path.join(autotest_dir, "client")
+sys.path.insert(0, client_dir)
+import setup_modules
+sys.path.pop(0)
+setup_modules.setup(base_path=autotest_dir, root_module_name="autotest_lib")