Skip to content

Commit 5bb0450

Browse files
committed
use fuzzing utils for docker example
1 parent 3b85bf8 commit 5bb0450

2 files changed

Lines changed: 13 additions & 9 deletions

File tree

mayhem/config/Dockerfile

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,18 @@ RUN mkdir out
3030
ENV PYTHON_BIN_PATH=/usr/bin/python3.9
3131

3232
#Build libFuzzer target
33-
RUN bazel build --repo_contents_cache= --config=asan-libfuzzer //fuzz:fuzz_calculator_run
34-
RUN cp ./bazel-bin/fuzz/fuzz_calculator_bin ./out/fuzz_calculator_libfuzzer
33+
# RUN bazel build --config=asan-libfuzzer //fuzz:fuzz_calculator_run
34+
# RUN cp ./bazel-bin/fuzz/fuzz_calculator_bin ./out/fuzz_calculator_libfuzzer
3535

3636
#Build uninst target
37-
RUN bazel clean --repo_contents_cache=
38-
RUN bazel build --repo_contents_cache= --config=uninstrumented //fuzz:fuzz_calculator_run
39-
RUN cp ./bazel-bin/fuzz/fuzz_calculator_bin ./out/fuzz_calculator_uninstrumented
37+
# RUN bazel clean
38+
# RUN bazel build --config=uninstrumented //fuzz:fuzz_calculator_run
39+
# RUN cp ./bazel-bin/fuzz/fuzz_calculator_bin ./out/fuzz_calculator_uninstrumented
40+
41+
#Build test target
42+
RUN bazel clean
43+
RUN bazel build //test:fuzzing_utils_test_calculator
44+
RUN cp ./bazel-bin/test/fuzzing_utils_test_calculator ./out/fuzzing_utils_test_calculator
4045

4146
FROM ubuntu
4247
COPY --from=builder /workspace/out/* /

mayhem/config/Mayhemfile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
project: mayhem-bazel-example
22

33
# Target name (should be unique within the project)
4-
target: fuzz-calculator
4+
target: fuzzing-utils-test-calculator
55

66
# Base image to run the binary in.
77
image: ghcr.io/<YOUR_ORG>/mayhem-bazel-example
@@ -11,7 +11,6 @@ advanced_triage: false
1111

1212
# List of commands used to test the target
1313
cmds:
14-
- cmd: /calculator @@
14+
- cmd: /fuzzing_utils_test_calculator @@
1515
libfuzzer: false
16-
sanitizer: false
17-
16+
sanitizer: false

0 commit comments

Comments
 (0)