From 22562f49ebd39bb7f3d3b00f020841eb1f545934 Mon Sep 17 00:00:00 2001 From: Mina Farid Date: Mon, 16 Jul 2018 13:55:10 -0400 Subject: Fuzz testing uses protoc from a pod dependency (#1538) --- Firestore/Example/Firestore.xcodeproj/project.pbxproj | 2 ++ .../FuzzingResources/Serializer/Corpus/ConvertTextToBinary.sh | 5 +---- Firestore/Example/Podfile | 1 + 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'Firestore') diff --git a/Firestore/Example/Firestore.xcodeproj/project.pbxproj b/Firestore/Example/Firestore.xcodeproj/project.pbxproj index 35529b9..ddd9e83 100644 --- a/Firestore/Example/Firestore.xcodeproj/project.pbxproj +++ b/Firestore/Example/Firestore.xcodeproj/project.pbxproj @@ -1491,10 +1491,12 @@ ); inputPaths = ( "${SRCROOT}/Pods/Target Support Files/Pods-Firestore_FuzzTests_iOS/Pods-Firestore_FuzzTests_iOS-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/Protobuf/Protobuf.framework", "${BUILT_PRODUCTS_DIR}/LibFuzzer/LibFuzzer.framework", ); name = "[CP] Embed Pods Frameworks"; outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Protobuf.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/LibFuzzer.framework", ); runOnlyForDeploymentPostprocessing = 0; diff --git a/Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/ConvertTextToBinary.sh b/Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/ConvertTextToBinary.sh index 772e858..3d499c6 100755 --- a/Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/ConvertTextToBinary.sh +++ b/Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/ConvertTextToBinary.sh @@ -49,13 +49,10 @@ for text_proto_file in "${text_protos_dir}"/*; do fi # Run the conversion. - # TODO(minafarid): This conversion relies on protoc as built by the cmake - # build. Switch this to using a pod dependency of protoc. echo "Converting file: ${file_name} (type: ${message_type})" echo "${file_content}" \ - | "${SRCROOT}/../../build/external/protobuf/src/protobuf-build/src/protoc" \ + | "${SRCROOT}/Pods/!ProtoCompiler/protoc" \ -I"${SRCROOT}/../../Firestore/Protos/protos" \ - -I"${SRCROOT}/../../build/external/protobuf/src/protobuf/src" \ --encode=google.firestore.v1beta1."${message_type}" \ google/firestore/v1beta1/document.proto > "${binary_protos_dir}/${file_name}" done diff --git a/Firestore/Example/Podfile b/Firestore/Example/Podfile index 371a349..b0c0731 100644 --- a/Firestore/Example/Podfile +++ b/Firestore/Example/Podfile @@ -41,5 +41,6 @@ target 'Firestore_Example_iOS' do inherit! :search_paths pod 'LibFuzzer', :podspec => 'LibFuzzer.podspec' + pod '!ProtoCompiler' end end -- cgit v1.2.3