[Lldb-commits] [lldb] r234166 - test: Move amd64 -> x86_64 translation to getArchitecture()

Ed Maste emaste at freebsd.org
Mon Apr 6 08:50:48 PDT 2015


Author: emaste
Date: Mon Apr  6 10:50:48 2015
New Revision: 234166

URL: http://llvm.org/viewvc/llvm-project?rev=234166&view=rev
Log:
test: Move amd64 -> x86_64 translation to getArchitecture()

Rather than sprinkling this knowledge throughout the test suite, just
translate amd64 to x86_64 globally.

Modified:
    lldb/trunk/test/lldbplatformutil.py
    lldb/trunk/test/lldbtest.py

Modified: lldb/trunk/test/lldbplatformutil.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lldbplatformutil.py?rev=234166&r1=234165&r2=234166&view=diff
==============================================================================
--- lldb/trunk/test/lldbplatformutil.py (original)
+++ lldb/trunk/test/lldbplatformutil.py Mon Apr  6 10:50:48 2015
@@ -2,7 +2,7 @@
 architecture and/or the platform dependent nature of the tests. """
 
 def check_first_register_readable(test_case):
-    if test_case.getArchitecture() in ['amd64', 'x86_64', 'i386']:
+    if test_case.getArchitecture() in ['x86_64', 'i386']:
         test_case.expect("register read eax", substrs = ['eax = 0x'])
     elif test_case.getArchitecture() in ['aarch64']:
         test_case.expect("register read x0", substrs = ['x0 = 0x'])

Modified: lldb/trunk/test/lldbtest.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lldbtest.py?rev=234166&r1=234165&r2=234166&view=diff
==============================================================================
--- lldb/trunk/test/lldbtest.py (original)
+++ lldb/trunk/test/lldbtest.py Mon Apr  6 10:50:48 2015
@@ -1364,7 +1364,10 @@ class Base(unittest2.TestCase):
     def getArchitecture(self):
         """Returns the architecture in effect the test suite is running with."""
         module = builder_module()
-        return module.getArchitecture()
+        arch = module.getArchitecture()
+        if arch == 'amd64':
+            arch = 'x86_64'
+        return arch
 
     def getCompiler(self):
         """Returns the compiler in effect the test suite is running with."""





More information about the lldb-commits mailing list