forked from hiero-ledger/hiero-sdk-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·32 lines (26 loc) · 744 Bytes
/
Copy pathbuild.sh
File metadata and controls
executable file
·32 lines (26 loc) · 744 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/bash -eu
PROJECT_DIR="$SRC/hiero-sdk-python"
cd "$PROJECT_DIR"
python3 -m pip install --upgrade pip
pip3 install grpcio-tools
python3 generate_proto.py
pip3 install .
pip3 install atheris pyinstaller
for fuzzer in "$PROJECT_DIR"/.clusterfuzzlite/*_fuzzer.py; do
fuzzer_basename=$(basename -s .py "$fuzzer")
fuzzer_package="${fuzzer_basename}.pkg"
pyinstaller \
--distpath "$OUT" \
--workpath /tmp/pyinstaller-work \
--specpath /tmp/pyinstaller-spec \
--onefile \
--name "$fuzzer_package" \
"$fuzzer"
cat > "$OUT/$fuzzer_basename" <<EOF
#!/bin/sh
# LLVMFuzzerTestOneInput for fuzzer detection.
this_dir=\$(dirname "\$0")
"\$this_dir/$fuzzer_package" "\$@"
EOF
chmod +x "$OUT/$fuzzer_basename"
done