Make platform-detection code tolerate linux-3.0, patch by zooko.
authorBrian Warner <warner@lothar.com>
Thu, 15 Sep 2011 20:26:20 +0000 (13:26 -0700)
committerBrian Warner <warner@lothar.com>
Thu, 15 Sep 2011 20:26:20 +0000 (13:26 -0700)
Otherwise address-autodetection can't find ifconfig. refs #1536

src/allmydata/test/test_encodingutil.py
src/allmydata/test/test_system.py
src/allmydata/util/iputil.py

index 96db341026071e559dcdb65a265e004687624f86..6c4b99650b865ec7873b92ce8558c73687368096 100644 (file)
@@ -211,6 +211,7 @@ class EncodingUtil(ReallyEqualMixin):
     def test_unicode_platform(self):
         matrix = {
           'linux2': False,
+          'linux3': False,
           'openbsd4': False,
           'win32':  True,
           'darwin': True,
index 89169ef6dfc57464ed430b644f7cb32c0dbcd858..639968ddeeceee0fb4d9b587634dad3cd8316b9c 100644 (file)
@@ -1398,7 +1398,7 @@ class SystemTest(SystemTestMixin, RunBinTahoeMixin, unittest.TestCase):
             self.failUnlessEqual(data, expected_data)
         d.addCallback(_check)
         d.addCallback(lambda res: rref.callRemote("speed_test", 1, 200, False))
-        if sys.platform == "linux2":
+        if sys.platform in ("linux2", "linux3"):
             d.addCallback(lambda res: rref.callRemote("get_memory_usage"))
         d.addCallback(lambda res: rref.callRemote("measure_peer_response_time"))
         return d
index f372985828466564f2cd68f63dcb57417a358171..260bfcdbcf710c9780cc947ec15764743282fd84 100644 (file)
@@ -139,6 +139,7 @@ _platform_map = {
     "linux-i386": "linux", # redhat
     "linux-ppc": "linux",  # redhat
     "linux2": "linux",     # debian
+    "linux3": "linux",     # debian
     "win32": "win32",
     "irix6-n32": "irix",
     "irix6-n64": "irix",