Summary: `FBSimulatorState` puports to mirror the values of `CoreSimulator` but this isn't completely true as there is a difference in signedness. The dissasembly for CoreSimulator shows the `Invalid` state as being anything greater than `0x4` rather than `-1`. This means that Index Sets can be used as a more efficient way of storing collections of enumerated types, since the states can't be stored in a bitmask.
Reviewed By: marekcirkos
Differential Revision: D3184146
fb-gh-sync-id: 1ffe744611da91cb224b5c9b4cec6d8b9acfd408
fbshipit-source-id: 1ffe744611da91cb224b5c9b4cec6d8b9acfd408
Summary: `Query` objects should be consistent within the Framework, this means that a Query object should be a serializable representation of what should be fetched. `FBProcessFetcher` becomes a facade around the mechanics of getting to Process Info, a higher level API can then be built called `FBProcessQuery`.
Reviewed By: marekcirkos
Differential Revision: D3178745
fb-gh-sync-id: babd108772bb9ad30bcc88a15b5dfca2977295cf
fbshipit-source-id: babd108772bb9ad30bcc88a15b5dfca2977295cf
Summary: This is an artifact that should have been removed when `FBJSONConversion` was introduced.
Reviewed By: marekcirkos
Differential Revision: D3155608
fb-gh-sync-id: 239f11971884125d6346302c4dc14d220097a57c
fbshipit-source-id: 239f11971884125d6346302c4dc14d220097a57c
Summary: It will readuce amount of code loaded into runtime. This is because we need DevTool* frameworks that Xcode3Core loads, not Xcode3Core it self.
Reviewed By: lawrencelomax
Differential Revision: D3144332
fb-gh-sync-id: 636dc1d1da55458c167eaa96c6176f39bfcbbd3a
fbshipit-source-id: 636dc1d1da55458c167eaa96c6176f39bfcbbd3a
Summary:This method is used by FBSimulatorControl and XCTestBoostrap so we can't used static BOOL inside it to prevent multiple loads.
Added dispatch_once in FBSimulatorControl when calling it instead.
Reviewed By: nqmtuan
Differential Revision: D3144331
fb-gh-sync-id: 0822386d20a0fa9d0c4fd23e220d86d6e4369ee3
fbshipit-source-id: 0822386d20a0fa9d0c4fd23e220d86d6e4369ee3
Summary:Process environment variables are mutable so we should not use it to determine equality.
Closes https://github.com/facebook/FBSimulatorControl/pull/252
Reviewed By: lawrencelomax
Differential Revision: D3144145
Pulled By: marekcirkos
fb-gh-sync-id: 36d693ebbe4b6490c54bfbb560d4480fbaa28e12
fbshipit-source-id: 36d693ebbe4b6490c54bfbb560d4480fbaa28e12
Summary:We can fail to load private frameworks due to missing image of third library that is needed by loaded framework.
Added error handling that will try to load missing framework image from given directory list.
Reviewed By: migchez, lawrencelomax
Differential Revision: D3138802
fb-gh-sync-id: 21710a38b9baf1fce981e81e42e342e4fa0085fa
fbshipit-source-id: 21710a38b9baf1fce981e81e42e342e4fa0085fa
Summary: There are a number of reasons that the `fbsimctl` CLI is hard to use, one of them is that the output in the human-readable case is very inconsistent and verbose. This fixes these issues and simplifies the reporting mechanism.
Reviewed By: marekcirkos
Differential Revision: D3138428
fb-gh-sync-id: b8c9fab5af1c55df4fda7a356652fea76691bfed
fbshipit-source-id: b8c9fab5af1c55df4fda7a356652fea76691bfed
Summary:Added support for linking frameworks that requires other frameworks to link beforehand.
This is required to link 'IDEiOSSupportCore.plugin' (used by XCTestBootstrap).
Also added check for multiple classes to confirm successful framework load.
Reviewed By: lawrencelomax
Differential Revision: D3120290
fb-gh-sync-id: 95f1c064406a6965d583c85d4b16b674e68f543b
fbshipit-source-id: 95f1c064406a6965d583c85d4b16b674e68f543b
Summary: We can't connect the Framebuffer to an application that has been launched by Simulator.app, but it is possible to connect the bridge. This consolidates a lot of the startup path and means that Simulator.app launches can benefit from the SimulatorBridge interactions. This will also enable connecting a Bridge to a running simulator.
Reviewed By: marekcirkos
Differential Revision: D3116151
fb-gh-sync-id: 7da224d7dc39bb25259029941066f21d47dec38c
fbshipit-source-id: 7da224d7dc39bb25259029941066f21d47dec38c
Summary: With the inclusion of `XCTBoostrap` the `LD_RUNPATH_SEARCH_PATHS` was getting burned in with the current xcode version to the framework binaries, this meant that the executables were loaded before the dynamic framework loading. This is problematic as a different `DEVELOPER_DIR` or `xcode-select` default for a previously built binary could result in Frameworks failing to load at runtime as there is an xcode version conflict.
Reviewed By: marekcirkos
Differential Revision: D3092735
fb-gh-sync-id: 0724b46a3de0635170154707af3106844df6d786
shipit-source-id: 0724b46a3de0635170154707af3106844df6d786
Summary: Uploading of abitrary files is useful if you wish to pass a parameter to an Application based on the existence of a local file. If the Simulator is remotely launched with idb, this can provide a handy way of getting the file onto the Simulator host.
Reviewed By: marekcirkos
Differential Revision: D3081303
fb-gh-sync-id: 50e41b0ce3650cabaa62955cefb1999677abb08c
shipit-source-id: 50e41b0ce3650cabaa62955cefb1999677abb08c
Summary: It should be possible to control the output of the fbsimctl `diagnose` command depending on if the caller wants the content or just the file paths. Additional switches allows us to control this
Reviewed By: nqmtuan
Differential Revision: D3058163
fb-gh-sync-id: bded8fa2603eb3bdae95f1167e35cf91cf819d00
shipit-source-id: bded8fa2603eb3bdae95f1167e35cf91cf819d00
Summary: We weren't getting video output since the video was never fetched from it's default location. This will now re-fetch when appropriate.
Reviewed By: phyllipecesar
Differential Revision: D3054646
fb-gh-sync-id: a6d2730e605416800833a42eb56a84d1fb8d119f
shipit-source-id: a6d2730e605416800833a42eb56a84d1fb8d119f
Summary: Adds the ability to search for crash logs by the kind of process. Adds this into `FBCrashLogInfo` along with some unit tests. This makes it possible to find only app crash logs.
Reviewed By: mmmulani
Differential Revision: D3052635
fb-gh-sync-id: 54654c041675db0aa58bb28b6b6e7007e3852c8a
shipit-source-id: 54654c041675db0aa58bb28b6b6e7007e3852c8a
Summary: Counting matches or matching within results is sometimes desirable. The implementation fetches multiple lines anyway so they may as well be exposed in the interface
Reviewed By: marekcirkos
Differential Revision: D3049123
fb-gh-sync-id: ef8b816514f924b4fa080f1f7a2a30dbd5e773a2
shipit-source-id: ef8b816514f924b4fa080f1f7a2a30dbd5e773a2
Summary: This adds the fetching of arbitrary diagnostics by a filename. This is handy if for instance an application has some special logging functionality and you want to extract these files as diagnostics.
Reviewed By: mmmulani
Differential Revision: D3047484
fb-gh-sync-id: e503cb529641ccf4a9c1d4dc13a78a2a0c176ca4
shipit-source-id: e503cb529641ccf4a9c1d4dc13a78a2a0c176ca4
Summary: This will allow wiring of diagnostics to a remote machine. By using the read-into-memory method on the builder it makes it possible to distinguish between json encodings of a local file, or a payload that can be transmitted to a remote machine.
Reviewed By: marekcirkos
Differential Revision: D3047137
fb-gh-sync-id: f4b8e559291b88dd266a8157c0fce4039f4d8d6e
shipit-source-id: f4b8e559291b88dd266a8157c0fce4039f4d8d6e
Summary: Avoid the evils of duplication by inheriting and threading the error domain through
Reviewed By: marekcirkos
Differential Revision: D3040863
fb-gh-sync-id: 03691c404cd04c53f7652736a9833c845bf60b2c
shipit-source-id: 03691c404cd04c53f7652736a9833c845bf60b2c
Summary: These classes have moved on, so should we.
Reviewed By: nqmtuan
Differential Revision: D3040846
fb-gh-sync-id: b2d6f96ae231084f8d4edfd62ceae254d4820598
shipit-source-id: b2d6f96ae231084f8d4edfd62ceae254d4820598
Summary: Adding a Model for the Search result allows for easy serialization/deserializaiton and therefore wiring over a http server in `fbsimctl` land.
Reviewed By: marekcirkos
Differential Revision: D3040629
fb-gh-sync-id: 3a8caa6be6e945668e98a0c91bd99ba3aa3d973d
shipit-source-id: 3a8caa6be6e945668e98a0c91bd99ba3aa3d973d
Summary: Some log readers care about the substring rather than the entire line, so fetching an entire line is optional.
Reviewed By: nqmtuan, marekcirkos
Differential Revision: D3035471
fb-gh-sync-id: d7727817f650a4c87dbfff59be6b7fe6136693de
shipit-source-id: d7727817f650a4c87dbfff59be6b7fe6136693de
Summary: Messed up the rebase
Reviewed By: migchez
Differential Revision: D3035378
fb-gh-sync-id: 506398ddd187d8397f7aa1c3df7d2dac6f1a2bb9
shipit-source-id: 506398ddd187d8397f7aa1c3df7d2dac6f1a2bb9
Summary: Adds Simple and Batched Log Searching. Log Searches are serializable so they can be wired to a remote host.
Reviewed By: nqmtuan
Differential Revision: D3035095
fb-gh-sync-id: 6b1ea53f493291b383d05ef0e0d8d31fd84f86c9
shipit-source-id: 6b1ea53f493291b383d05ef0e0d8d31fd84f86c9
Summary: We have `filterMap` and `mapFilter` but also just want `filter`
Reviewed By: nqmtuan
Differential Revision: D3035084
fb-gh-sync-id: 7e3dd323733b59e6621b53145c5ee635f890b696
shipit-source-id: 7e3dd323733b59e6621b53145c5ee635f890b696
Summary: There were a bunch of changes from an earlier PR that needed to be brought in. These include the ability to define when diagnostics are brought into memory.
Reviewed By: nqmtuan
Differential Revision: D3031329
fb-gh-sync-id: e788d8b06915c82a77779dac26ab6d01722e067a
shipit-source-id: e788d8b06915c82a77779dac26ab6d01722e067a