forked from OSchip/llvm-project
Fix test execution on FreeBSD versions other than 9.x
The tests use a plugin based on the name from sys.platform. Unfortunately that string includes the major version number in Python 2.7, so the tests would look for builder_freebsd9.py, builder_freebsd10.py, etc. The issue doesn't affect Linux as Python returns 'linux2' also on Linux 3.x -- see http://bugs.python.org/issue12326 for details. It seems later versions of Python will drop the major version number, so adopt this convention now for FreeBSD. llvm-svn: 187121
This commit is contained in:
parent
ca8a007995
commit
4d90f0f2c3
|
@ -296,6 +296,8 @@ def getsource_if_available(obj):
|
|||
return repr(obj)
|
||||
|
||||
def builder_module():
|
||||
if sys.platform.startswith("freebsd"):
|
||||
return __import__("builder_freebsd")
|
||||
return __import__("builder_" + sys.platform)
|
||||
|
||||
#
|
||||
|
|
Loading…
Reference in New Issue