aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMina Farid <minafarid@google.com>2018-07-16 13:55:10 -0400
committerGitHub <noreply@github.com>2018-07-16 13:55:10 -0400
commit22562f49ebd39bb7f3d3b00f020841eb1f545934 (patch)
tree2976a9c3a1a9db3b9455e8f24a772cb93f3e0e1c
parentcda87fa3afdacf20a097cf6ed90c5c2ef64e0437 (diff)
Fuzz testing uses protoc from a pod dependency (#1538)
-rw-r--r--Firestore/Example/Firestore.xcodeproj/project.pbxproj2
-rwxr-xr-xFirestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/ConvertTextToBinary.sh5
-rw-r--r--Firestore/Example/Podfile1
3 files changed, 4 insertions, 4 deletions
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