From a135ee17175f8f186e73252263b8dbc3785f3d3c Mon Sep 17 00:00:00 2001 From: Mina Farid Date: Mon, 4 Jun 2018 14:36:55 -0400 Subject: Add a new Xcode target and scheme for fuzz tests (#1364) Created `Firestore_FuzzTests_iOS` Xcode target as a duplicate of the target `Firestore_Tests_iOS`. - Added `-fsanitize-coverage=trace-pc-guard` to the compiler flags to enable code coverage by libFuzzer fuzzing driver. - Modified the files to compile to the fuzz testing ones. - Added a Principal testing class. * Modified the `Podfile` to include `LibFuzzer.podspec` as a dependency for the target `Firestore_FuzzTests_iOS`. * Added a skeleton for fuzz testing. Currently does not test any code but the fuzzing works fine and calls an empty `LLVMFuzzerTestOneInput` with different input values. - This means that fuzzing does not finish or crash. --- Firestore/Example/Podfile | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'Firestore/Example/Podfile') diff --git a/Firestore/Example/Podfile b/Firestore/Example/Podfile index 88cf93a..dc5af48 100644 --- a/Firestore/Example/Podfile +++ b/Firestore/Example/Podfile @@ -37,4 +37,10 @@ target 'Firestore_Example_iOS' do target 'SwiftBuildTest' do platform :ios, '8.0' end + + target 'Firestore_FuzzTests_iOS' do + inherit! :search_paths + + pod 'LibFuzzer', :podspec => 'LibFuzzer.podspec' + end end -- cgit v1.2.3