I have attached the patch for the packaging system.
The documentation is available at : http://test.kernel.org/autotest/PackagingSystem
Signed-off-by: Ashwin Ganti <aganti@google.com>
git-svn-id: http://test.kernel.org/svn/autotest/trunk@1953 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/client/common_lib/utils.py b/client/common_lib/utils.py
index c29d7e4..e54e134 100644
--- a/client/common_lib/utils.py
+++ b/client/common_lib/utils.py
@@ -463,6 +463,20 @@
return "\n".join(control_new)
+def get_arch(run_function=run):
+ """
+ Get the hardware architecture of the machine.
+ run_function is used to execute the commands. It defaults to
+ utils.run() but a custom method (if provided) should be of the
+ same schema as utils.run. It should return a CmdResult object and
+ throw a CmdError exception.
+ """
+ arch = run_function('/bin/uname -m').stdout.rstrip()
+ if re.match(r'i\d86$', arch):
+ arch = 'i386'
+ return arch
+
+
class CmdResult(object):
"""
Command execution result.