From: Brian Warner Date: Thu, 15 Sep 2011 20:26:20 +0000 (-0700) Subject: Make platform-detection code tolerate linux-3.0, patch by zooko. X-Git-Tag: allmydata-tahoe-1.9.0a2~25 X-Git-Url: https://git.rkrishnan.org/(%5B%5E?a=commitdiff_plain;h=8e69b94588c1c0e721184846ebf5dc2ec4a7aa4f;p=tahoe-lafs%2Ftahoe-lafs.git Make platform-detection code tolerate linux-3.0, patch by zooko. Otherwise address-autodetection can't find ifconfig. refs #1536 --- diff --git a/src/allmydata/test/test_encodingutil.py b/src/allmydata/test/test_encodingutil.py index 96db3410..6c4b9965 100644 --- a/src/allmydata/test/test_encodingutil.py +++ b/src/allmydata/test/test_encodingutil.py @@ -211,6 +211,7 @@ class EncodingUtil(ReallyEqualMixin): def test_unicode_platform(self): matrix = { 'linux2': False, + 'linux3': False, 'openbsd4': False, 'win32': True, 'darwin': True, diff --git a/src/allmydata/test/test_system.py b/src/allmydata/test/test_system.py index 89169ef6..639968dd 100644 --- a/src/allmydata/test/test_system.py +++ b/src/allmydata/test/test_system.py @@ -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 diff --git a/src/allmydata/util/iputil.py b/src/allmydata/util/iputil.py index f3729858..260bfcdb 100644 --- a/src/allmydata/util/iputil.py +++ b/src/allmydata/util/iputil.py @@ -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",