From 8e69b94588c1c0e721184846ebf5dc2ec4a7aa4f Mon Sep 17 00:00:00 2001 From: Brian Warner Date: Thu, 15 Sep 2011 13:26:20 -0700 Subject: [PATCH] Make platform-detection code tolerate linux-3.0, patch by zooko. Otherwise address-autodetection can't find ifconfig. refs #1536 --- src/allmydata/test/test_encodingutil.py | 1 + src/allmydata/test/test_system.py | 2 +- src/allmydata/util/iputil.py | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) 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", -- 2.45.2