Skip to content
Open
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
12 changes: 11 additions & 1 deletion Lib/test/test_build_details.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,17 @@ def test_base_interpreter(self):
self.key('base_interpreter')

def test_platform(self):
self.assertEqual(self.key('platform'), sysconfig.get_platform())
build_platform = self.key('platform')
run_platform = sysconfig.get_platform()
if (build_platform != run_platform
and sys.platform == 'linux' and sys.maxsize < 2**32):
# The platform entry describes the machine the build was made
# on. A 32-bit process on a 64-bit kernel sees the kernel's
# machine name instead ('x86_64' for an i686 build, 'armv8l' or
# 'aarch64' for an armv7l build), so the two can legitimately
# differ (gh-161870).
self.skipTest('the build machine may differ for 32-bit builds')
self.assertEqual(build_platform, run_platform)

def test_language_version(self):
allowed_characters = string.digits + string.ascii_letters + '.'
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Skip test_build_details.test_platform when a 32-bit build runs on a machine whose kernel reports a different machine name.
Loading