Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
9 changes: 9 additions & 0 deletions Apple/testbed/__main__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import argparse
import json
import os
import re
import shutil
import subprocess
Expand Down Expand Up @@ -78,13 +79,21 @@ def xcode_test(location: Path, platform: str, simulator: str, verbose: bool):
check=True,
)

# Any environment variable prefixed with TEST_RUNNER_ is exposed into the
# test runner environment. There are some variables (like those identifying
# CI platforms) that can be useful to have access to.
test_env = os.environ.copy()
if "GITHUB_ACTIONS" in os.environ:
test_env["TEST_RUNNER_GITHUB_ACTIONS"] = os.environ["GITHUB_ACTIONS"]

print("Running test project...")
# Test execution *can't* be run -quiet; verbose mode
# is how we see the output of the test output.
process = subprocess.Popen(
["xcodebuild", "test-without-building"] + args,
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT,
env=test_env,
)
while line := (process.stdout.readline()).decode(*DECODE_ARGS):
# Strip the timestamp/process prefix from each log line
Expand Down
3 changes: 2 additions & 1 deletion Lib/test/support/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
"BrokenIter",
"in_systemd_nspawn_sync_suppressed",
"run_no_yield_async_fn", "run_yielding_async_fn", "async_yield",
"reset_code",
"reset_code", "on_github_actions"
]


Expand Down Expand Up @@ -1369,6 +1369,7 @@ def reset_code(f: types.FunctionType) -> types.FunctionType:
f.__code__ = f.__code__.replace()
return f

on_github_actions = "GITHUB_ACTIONS" in os.environ

#=======================================================================
# Check for the presence of docstrings.
Expand Down
4 changes: 4 additions & 0 deletions Lib/test/test_socketserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,11 +204,15 @@ def test_ForkingUnixStreamServer(self):
socketserver.StreamRequestHandler,
self.stream_examine)

@unittest.skipIf(test.support.is_apple_mobile and test.support.on_github_actions,
"Test fails regularly on iOS simulator on Github Actions - See #140702")
def test_UDPServer(self):
self.run_server(socketserver.UDPServer,
socketserver.DatagramRequestHandler,
self.dgram_examine)

@unittest.skipIf(test.support.is_apple_mobile and test.support.on_github_actions,
"Test fails regularly on iOS simulator on Github Actions - See #140702")
def test_ThreadingUDPServer(self):
self.run_server(socketserver.ThreadingUDPServer,
socketserver.DatagramRequestHandler,
Expand Down
Loading