[Lldb-commits] [lldb] r249446 - Address failing Go tests on go version from Ubuntu 14.04
Todd Fiala via lldb-commits
lldb-commits at lists.llvm.org
Tue Oct 6 12:15:56 PDT 2015
Author: tfiala
Date: Tue Oct 6 14:15:56 2015
New Revision: 249446
URL: http://llvm.org/viewvc/llvm-project?rev=249446&view=rev
Log:
Address failing Go tests on go version from Ubuntu 14.04
Go tests fail on Ubuntu 14.04's go1.2.1. This change puts a minimum
go version in the skipUnlessGoInstalled() decorator of go1.3.0.
Go maintainers are encouraged to modify as needed. For now this fixes
failing tests on Ubuntu 14.04 x86_64 buildbots with stock distro go installed.
Modified:
lldb/trunk/test/lldbtest.py
Modified: lldb/trunk/test/lldbtest.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lldbtest.py?rev=249446&r1=249445&r2=249446&view=diff
==============================================================================
--- lldb/trunk/test/lldbtest.py (original)
+++ lldb/trunk/test/lldbtest.py Tue Oct 6 14:15:56 2015
@@ -938,7 +938,29 @@ def skipUnlessGoInstalled(func):
if not compiler:
self.skipTest("skipping because go compiler not found")
else:
- func(*args, **kwargs)
+ # Ensure the version is the minimum version supported by
+ # the go tests. Empirically this is *not* version go1.2.1
+ # that comes with Ubuntu 14.04. Go maintainers should
+ # verify, or possibly extend this decorator to provide
+ # min go versions that can vary by test.
+ match_version = re.search(r"(\d+\.\d+(\.\d+)?)", compiler)
+ if not match_version:
+ # Couldn't determine version.
+ self.skipTest(
+ "skipping because go version could not be parsed "
+ "out of {}".format(compiler))
+ else:
+ from distutils.version import StrictVersion
+ min_strict_version = StrictVersion("1.3.0")
+ compiler_strict_version = StrictVersion(match_version.group(1))
+ if compiler_strict_version < min_strict_version:
+ self.skipTest(
+ "skipping because available go version ({}) does "
+ "not meet minimum go version {}".format(
+ compiler_strict_version,
+ min_strict_version))
+ if not skip_test:
+ func(*args, **kwargs)
return wrapper
def getPlatform():
More information about the lldb-commits
mailing list