Граф коммитов

32 Коммитов

Автор SHA1 Сообщение Дата
Lawrence Lomax 6477f0de87 Use Unisgned Integer (unsigned long long) for enumerations
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
2016-04-18 02:50:23 -07:00
Lawrence Lomax ab16dba4a6 Rename FBProcessQuery to FBProcessFetcher
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
2016-04-14 08:15:34 -07:00
Lawrence Lomax 7d3fc472ad Remove FBJSONSerializationDescribeable
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
2016-04-08 03:00:20 -07:00
Marek Cirkos 56b8037fb3 Replaced loading Xcode3Core.ideplugin with DevTools*.frameworks
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
2016-04-06 07:45:59 -07:00
Marek Cirkos 6b21c8e8c5 Removed static bool from +[FBWeakFrameworkLoader loadPrivateFrameworks:...]
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
2016-04-06 07:45:59 -07:00
Marek Cirkos 8c2c26504b Removed definition of unused DVTiPhoneSimulatorRemoteClient framework
Reviewed By: nqmtuan

Differential Revision: D3144329

fb-gh-sync-id: 86f094b7420868aac3cff5449b51405254a3ed62
fbshipit-source-id: 86f094b7420868aac3cff5449b51405254a3ed62
2016-04-06 07:45:59 -07:00
Marek Cirkos 2834eb3f77 Fix failing Travis
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
2016-04-06 02:25:22 -07:00
Marek Cirkos d3feec9ecd Handling missing framework image error, when loading FBWeakFramework
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
2016-04-05 07:20:21 -07:00
Lawrence Lomax 5e8a340591 Improve Human Readable Representations
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
2016-04-05 02:55:28 -07:00
Marek Cirkos 787b7cbbb8 Added missing header to umbrella header
Summary: Added FBWeakFramework+ApplePrivateFrameworks.h to umbrella header

Reviewed By: phyllipecesar

Differential Revision: D3126190

fb-gh-sync-id: 0373f07e0ad3a77a03897c7a691b4abbb7ba8b5b
fbshipit-source-id: 0373f07e0ad3a77a03897c7a691b4abbb7ba8b5b
2016-04-03 11:40:23 -07:00
Marek Cirkos 50d7194104 Resolved private framework and plugins linking
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
2016-04-01 02:35:23 -07:00
Lawrence Lomax d37a88cd97 Connect FBSimulatorBridge for Simulator.app launches
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
2016-03-31 03:35:31 -07:00
Lawrence Lomax 2e9315b235 Restore true xcode cross-linking
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
2016-03-24 08:20:22 -07:00
Lawrence Lomax 8887a1ed05 Move Weak Framework Loading to FBControlCore
Summary: This will allow Framework loading by XCTBootstrap & Others.

Reviewed By: marekcirkos

Differential Revision: D3092590

fb-gh-sync-id: c69645f21aa0d602e267fb76fc2d1e0cfe0aada7
shipit-source-id: c69645f21aa0d602e267fb76fc2d1e0cfe0aada7
2016-03-24 03:40:26 -07:00
Lawrence Lomax 72f976a573 Upload Arbitrary Files to Simulator
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
2016-03-24 02:50:36 -07:00
Lawrence Lomax afa9a1c1a5 'diagnose' output switches for path or content output.
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
2016-03-16 05:25:51 -07:00
Lawrence Lomax b38356a0e1 Fetch Video/Screenshot from Default Location
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
2016-03-15 21:04:17 +00:00
Lawrence Lomax 8070714dce Non-Historical App Crash Fetching
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
2016-03-15 05:30:27 -07:00
Lawrence Lomax 0975142e98 Add -[FBBatchSearchResult allMatches]
Summary: Handy wrapper for clients

Reviewed By: marekcirkos

Differential Revision: D3049577

fb-gh-sync-id: cc3dc6bfb8234c1e5e5ab951066b38cb7143cfe6
shipit-source-id: cc3dc6bfb8234c1e5e5ab951066b38cb7143cfe6
2016-03-15 03:25:25 -07:00
Lawrence Lomax 7b51cb38fc Match Multiple Lines
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
2016-03-15 03:25:21 -07:00
Lawrence Lomax 433d1b8792 Add Diagnostic Fetching by App ID & Filename
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
2016-03-14 10:20:25 -07:00
Marek Cirkos 1bbf0ab059 Fix license headers
Summary: Added proper license headers for XCTestBootstrap

Reviewed By: mmmulani, lawrencelomax

Differential Revision: D3041484

fb-gh-sync-id: a1b8ac7699c03967357e1d867f02876f21ef832b
shipit-source-id: a1b8ac7699c03967357e1d867f02876f21ef832b
2016-03-14 09:10:48 -07:00
Lawrence Lomax 5f126df855 FBDiagnostic conforms to FBJSONDeserializable
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
2016-03-14 07:55:26 -07:00
Lawrence Lomax b067962e5d FBSimulatorError inherits from FBControlCoreError
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
2016-03-11 09:25:24 -08:00
Lawrence Lomax 4217b2db62 Remove files that have migrated to FBControlCore
Summary: These classes have moved on, so should we.

Reviewed By: nqmtuan

Differential Revision: D3040846

fb-gh-sync-id: b2d6f96ae231084f8d4edfd62ceae254d4820598
shipit-source-id: b2d6f96ae231084f8d4edfd62ceae254d4820598
2016-03-11 05:35:25 -08:00
Lawrence Lomax b2e2ef836c Add FBBatchLogSearchResult Model
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
2016-03-11 04:00:39 -08:00
Lawrence Lomax fa3c2bc959 Add Extract-Based Log Searching
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
2016-03-11 02:25:28 -08:00
Lawrence Lomax 09c348945f Fix Build Breaker
Summary: Messed up the rebase

Reviewed By: migchez

Differential Revision: D3035378

fb-gh-sync-id: 506398ddd187d8397f7aa1c3df7d2dac6f1a2bb9
shipit-source-id: 506398ddd187d8397f7aa1c3df7d2dac6f1a2bb9
2016-03-10 06:30:22 -08:00
Lawrence Lomax 884ac8d2d5 Add FBLogSearch
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
2016-03-10 05:05:33 -08:00
Lawrence Lomax ace4073ea7 Add Concurrent Filter
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
2016-03-10 03:30:45 -08:00
Lawrence Lomax 1599977ba0 Improve FBDiagnostic Semantics
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
2016-03-10 03:30:39 -08:00
Marek Cirkos 02445751d9 Extracted FBControlCore
Summary: Extracts FBControlCore for further integration with FBDeviceControl

Reviewed By: lawrencelomax

Differential Revision: D3023706

fb-gh-sync-id: 149fd233da04c6551e0296eb0146b87bf48fea1a
shipit-source-id: 149fd233da04c6551e0296eb0146b87bf48fea1a
2016-03-09 10:42:43 -08:00