aboutsummaryrefslogtreecommitdiffhomepage
path: root/projects/dragonfly/build.sh
diff options
context:
space:
mode:
authorGravatar AdamKorcz <44787359+AdamKorcz@users.noreply.github.com>2020-05-13 20:21:20 +0100
committerGravatar GitHub <noreply@github.com>2020-05-13 12:21:20 -0700
commit76509c1e98d2dc4a61e37461fd9d89f8d7683596 (patch)
treedbc46e28ba14b3ea21600d9f94ff1d333fcd2994 /projects/dragonfly/build.sh
parent2a40f3a777827369505a0a70a776812dc3abc899 (diff)
[dragonfly] initial integration (#3790)
Diffstat (limited to 'projects/dragonfly/build.sh')
-rwxr-xr-xprojects/dragonfly/build.sh30
1 files changed, 30 insertions, 0 deletions
diff --git a/projects/dragonfly/build.sh b/projects/dragonfly/build.sh
new file mode 100755
index 00000000..432d7651
--- /dev/null
+++ b/projects/dragonfly/build.sh
@@ -0,0 +1,30 @@
+#/bin/bash -eu
+# Copyright 2020 Google Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+################################################################################
+function compile_fuzzer {
+ path=$1
+ function=$2
+ fuzzer=$3
+
+ go-fuzz -func $function -o $fuzzer.a $path
+
+ $CXX $CXXFLAGS $LIB_FUZZING_ENGINE $fuzzer.a -o $OUT/$fuzzer
+}
+mkdir $GOPATH/src/github.com/dragonflyoss
+cp -r $SRC/Dragonfly $GOPATH/src/github.com/dragonflyoss/
+
+compile_fuzzer github.com/dragonflyoss/Dragonfly/dfget/core/uploader FuzzParseParams uploader_fuzz
+compile_fuzzer github.com/dragonflyoss/Dragonfly/supernode/daemon/mgr/cdn Fuzz cdn_fuzz