Skip to content

[swift_build_support] Fix crash in FreeBSD toolchain. #2960

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 9, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion utils/swift_build_support/swift_build_support/toolchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ def __init__(self):
super(FreeBSD, self).__init__(suffixes)

@cache_util.reify
def _release_date():
def _release_date(self):
"""Return the release date for FreeBSD operating system on this host.
If the release date cannot be ascertained, return None.
"""
Expand Down
9 changes: 9 additions & 0 deletions utils/swift_build_support/tests/test_toolchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import os
import unittest

from swift_build_support import toolchain
from swift_build_support.toolchain import host_toolchain


Expand Down Expand Up @@ -110,6 +111,14 @@ def test_tools_llvm_suffix(self):
if profdata_suffix is not None:
self.assertEqual(cc_suffix, profdata_suffix)

def test_toolchain_instances(self):
# Check that we can instantiate every toolchain, even if it isn't the
# current patform.
toolchain.MacOSX()
toolchain.Linux()
toolchain.FreeBSD()
toolchain.Cygwin()


if __name__ == '__main__':
unittest.main()