-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
23 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,21 @@ | ||
load("@rules_pkg//:pkg.bzl", "pkg_tar") | ||
load("@rules_oci//oci:defs.bzl", "oci_image", "oci_push", "oci_tarball") | ||
|
||
load("@rules_mayhem//mayhem:mayhem.bzl", "mayhem") | ||
|
||
pkg_tar( | ||
name = "fuzz_calculator_tar", | ||
genrule( | ||
name = "mayhem_package", | ||
srcs = ["//fuzz:fuzz_calculator_bin"], | ||
mode = "0755", | ||
testonly = True, | ||
) | ||
|
||
oci_image( | ||
name = "fuzz_calculator_image", | ||
base = "@ubuntu", | ||
entrypoint = ["/fuzz_calculator_bin"], | ||
tars = [":fuzz_calculator_tar"], | ||
testonly = True, | ||
user = "root", | ||
workdir = "/", | ||
outs = ["fuzz_calculator_root"], | ||
cmd = "mayhem package -o ./fuzz_calculator_root $(location: //fuzz:fuzz_calculator_bin)" | ||
) | ||
|
||
oci_tarball( | ||
name = "fuzz_calculator_tarball", | ||
image = ":fuzz_calculator_image", | ||
repo_tags = ["mayhem-bazel-example:latest"], | ||
testonly = True, | ||
) | ||
|
||
oci_push( | ||
name = "push_fuzz_calculator_image", | ||
image = ":fuzz_calculator_image", | ||
remote_tags = ["latest"], | ||
#repository = "$(MAYHEM_URL):5000/mayhem-bazel-example", | ||
repository = "ghcr.io/forallsecure/mayhem-bazel-example", | ||
testonly = True, | ||
) | ||
|
||
mayhem( | ||
name = "mayhem_fuzz_calculator", | ||
run = True, | ||
project = "mayhem-bazel-example", | ||
target = "fuzz_calculator", | ||
command = "/fuzz_calculator_bin @@", | ||
target = "fuzz_calculator_win", | ||
command = "$(location: //fuzz:fuzz_calculator_bin) @@", | ||
duration = "90", | ||
sanitizer = "true", | ||
libfuzzer = "false", | ||
#image = "$MAYHEM_DOCKER_REGISTRY/mayhem-bazel-example:latest", | ||
image = "ghcr.io/forallsecure/mayhem-bazel-example:latest", | ||
sanitizer = "false", | ||
libfuzzer = "true", | ||
) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,13 @@ | ||
project: mayhem-bazel-example | ||
|
||
# Target name (should be unique within the project) | ||
target: fuzz-calculator | ||
|
||
# Base image to run the binary in. | ||
image: ghcr.io/<YOUR_ORG>/mayhem-bazel-example | ||
target: fuzz-calculator-win | ||
|
||
# Turns on extra test case processing (completing a run will take longer) | ||
advanced_triage: false | ||
|
||
# List of commands used to test the target | ||
cmds: | ||
- cmd: /fuzz_calculator_libfuzzer | ||
- cmd: /fuzz_calculator_libfuzzer.exe | ||
libfuzzer: true | ||
sanitizer: true | ||
- cmd: /fuzz_calculator_uninstrumented @@ | ||
libfuzzer: false | ||
sanitizer: false | ||
|