@@ -293,7 +293,7 @@ project, and then boot and prepare the iOS simulator.
293293Debugging test failures
294294----------------------- 
295295
296- Running ``make test  `` generates a standalone version of the ``iOS/testbed ``
296+ Running ``make testios  `` generates a standalone version of the ``iOS/testbed ``
297297project, and runs the full test suite. It does this using ``iOS/testbed ``
298298itself - the folder is an executable module that can be used to create and run
299299a clone of the testbed project.
@@ -316,12 +316,26 @@ This is the equivalent of running ``python -m test -W test_os`` on a desktop
316316Python build. Any arguments after the ``-- `` will be passed to testbed as if
317317they were arguments to ``python -m `` on a desktop machine.
318318
319+ Testing in Xcode
320+ ^^^^^^^^^^^^^^^^ 
321+ 
319322You can also open the testbed project in Xcode by running::
320323
321324    $ open my-testbed/iOSTestbed.xcodeproj 
322325
323326This will allow you to use the full Xcode suite of tools for debugging.
324327
328+ The arguments used to run the test suite are defined as part of the test plan.
329+ To modify the test plan, select the test plan node of the project tree (it
330+ should be the first child of the root node), and select the "Configurations"
331+ tab. Modify the "Arguments Passed On Launch" value to change the testing
332+ arguments.
333+ 
334+ The test plan also disables parallel testing, and specifies the use of the
335+ ``iOSTestbed.lldbinit `` file for providing configuration of the debugger. The
336+ default debugger configuration disables automatic breakpoints on the
337+ ``SIGINT ``, ``SIGUSR1 ``, ``SIGUSR2 ``, and ``SIGXFSZ `` signals.
338+ 
325339Testing on an iOS device
326340^^^^^^^^^^^^^^^^^^^^^^^^ 
327341
@@ -336,40 +350,3 @@ select the root node of the project tree (labeled "iOSTestbed"), then the
336350(this will likely be your own name), and plug in a physical device to your
337351macOS machine with a USB cable. You should then be able to select your physical
338352device from the list of targets in the pulldown in the Xcode titlebar.
339- 
340- Running specific tests
341- ^^^^^^^^^^^^^^^^^^^^^^ 
342- 
343- As the test suite is being executed on an iOS simulator, it is not possible to
344- pass in command line arguments to configure test suite operation. To work
345- around this limitation, the arguments that would normally be passed as command
346- line arguments are configured as part of the ``iOSTestbed-Info.plist `` file
347- that is used to configure the iOS testbed app. In this file, the ``TestArgs ``
348- key is an array containing the arguments that would be passed to ``python -m ``
349- on the command line (including ``test `` in position 0, the name of the test
350- module to be executed).
351- 
352- Disabling automated breakpoints
353- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 
354- 
355- By default, Xcode will inserts an automatic breakpoint whenever a signal is
356- raised. The Python test suite raises many of these signals as part of normal
357- operation; unless you are trying to diagnose an issue with signals, the
358- automatic breakpoints can be inconvenient. However, they can be disabled by
359- creating a symbolic breakpoint that is triggered at the start of the test run.
360- 
361- Select "Debug > Breakpoints > Create Symbolic Breakpoint" from the Xcode menu, and
362- populate the new brewpoint with the following details:
363- 
364- * **Name **: IgnoreSignals
365- * **Symbol **: UIApplicationMain
366- * **Action **: Add debugger commands for:
367-   - ``process handle SIGINT -n true -p true -s false ``
368-   - ``process handle SIGUSR1 -n true -p true -s false ``
369-   - ``process handle SIGUSR2 -n true -p true -s false ``
370-   - ``process handle SIGXFSZ -n true -p true -s false ``
371- * Check the "Automatically continue after evaluating" box.
372- 
373- All other details can be left blank. When the process executes the
374- ``UIApplicationMain `` entry point, the breakpoint will trigger, run the debugger
375- commands to disable the automatic breakpoints, and automatically resume.
0 commit comments