File tree Expand file tree Collapse file tree 1 file changed +23
-1
lines changed
Expand file tree Collapse file tree 1 file changed +23
-1
lines changed Original file line number Diff line number Diff line change 11import os
2+ import sys
23import tempfile
4+ import time
35from pathlib import Path
46
57import pytest
@@ -23,10 +25,30 @@ def run_tests():
2325 ]
2426 )
2527
26- print (f">>>>>>>>>> EXIT { returncode } <<<<<<<<<<" )
28+ # On iOS and macOS, Briefcase needs to use a log streamer. However, this
29+ # streamer can drop lines of test output due to system load. If the log
30+ # result sentinel isn't seen in streamed output, the test will fail because
31+ # the exit status of the test isn't known. As a safety measure on iOS and
32+ # macOS, output the log sentinel multiple times to decrease the chance of
33+ # this happening.
34+ if sys .platform in {"darwin" , "ios" }:
35+ for i in range (0 , 6 ):
36+ time .sleep (0.5 )
37+ print (f">>>>>>>>>> EXIT { returncode } <<<<<<<<<<" )
38+ else :
39+ print (f">>>>>>>>>> EXIT { returncode } <<<<<<<<<<" )
2740
2841
2942if __name__ == "__main__" :
43+ # On iOS and macOS, Briefcase needs to use a log streamer. However, this
44+ # streamer takes time to start up. As a safety measure, wait a couple of seconds
45+ # at app start, and output some lines to minimize the impact of the streamer
46+ # startup.
47+ if sys .platform in {"darwin" , "ios" }:
48+ print ("Waiting for log streamer..." )
49+ time .sleep (2.0 )
50+ print ("Log streamer should be ready." )
51+
3052 # Run the app main to stimulate app creation and logging of test conditions.
3153 app_main ()
3254 # Run the actual test suite.
You can’t perform that action at this time.
0 commit comments