@@ -293,7 +293,7 @@ project, and then boot and prepare the iOS simulator.
293
293
Debugging test failures
294
294
-----------------------
295
295
296
- Running ``make test `` generates a standalone version of the ``iOS/testbed ``
296
+ Running ``make testios `` generates a standalone version of the ``iOS/testbed ``
297
297
project, and runs the full test suite. It does this using ``iOS/testbed ``
298
298
itself - the folder is an executable module that can be used to create and run
299
299
a clone of the testbed project.
@@ -316,12 +316,26 @@ This is the equivalent of running ``python -m test -W test_os`` on a desktop
316
316
Python build. Any arguments after the ``-- `` will be passed to testbed as if
317
317
they were arguments to ``python -m `` on a desktop machine.
318
318
319
+ Testing in Xcode
320
+ ^^^^^^^^^^^^^^^^
321
+
319
322
You can also open the testbed project in Xcode by running::
320
323
321
324
$ open my-testbed/iOSTestbed.xcodeproj
322
325
323
326
This will allow you to use the full Xcode suite of tools for debugging.
324
327
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
+
325
339
Testing on an iOS device
326
340
^^^^^^^^^^^^^^^^^^^^^^^^
327
341
@@ -336,40 +350,3 @@ select the root node of the project tree (labeled "iOSTestbed"), then the
336
350
(this will likely be your own name), and plug in a physical device to your
337
351
macOS machine with a USB cable. You should then be able to select your physical
338
352
device 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