Skip to content

Commit

Permalink
change base-build to base-builder-go
Browse files Browse the repository at this point in the history
  • Loading branch information
mpherman2 committed Oct 7, 2021
1 parent 13e2044 commit bbd4e9b
Show file tree
Hide file tree
Showing 5 changed files with 70 additions and 3 deletions.
18 changes: 16 additions & 2 deletions .clusterfuzzlite/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
FROM gcr.io/oss-fuzz-base/base-builder
# Copyright 2021 The Kubernetes Authors.
#
# 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.

FROM gcr.io/oss-fuzz-base/base-builder-go

COPY . $SRC/test-infra
WORKDIR test-infra
COPY .clusterfuzzlite/build.sh $SRC/
COPY .clusterfuzzlite/build.sh $SRC/
16 changes: 15 additions & 1 deletion .clusterfuzzlite/build.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,2 +1,16 @@
# Copyright 2021 The Kubernetes Authors.
#
# 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.

#! /bin/bash
compile_go_fuzzer $SRC/test-infra/experiment/cifuzz_test Fuzz fuzzer
compile_go_fuzzer $SRC/test-infra/experiment/cifuzz_test Fuzz fuzzer
1 change: 1 addition & 0 deletions experiment/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ filegroup(
"//experiment/aws-stockout:all-srcs",
"//experiment/bumpmonitoring:all-srcs",
"//experiment/ci-janitor:all-srcs",
"//experiment/cifuzz_test:all-srcs",
"//experiment/cluster-upgrader:all-srcs",
"//experiment/clustersecretbackup:all-srcs",
"//experiment/coverage:all-srcs",
Expand Down
22 changes: 22 additions & 0 deletions experiment/cifuzz_test/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
load("@io_bazel_rules_go//go:def.bzl", "go_library")

go_library(
name = "go_default_library",
srcs = ["fuzz.go"],
importpath = "k8s.io/test-infra/experiment/cifuzz_test",
visibility = ["//visibility:public"],
)

filegroup(
name = "package-srcs",
srcs = glob(["**"]),
tags = ["automanaged"],
visibility = ["//visibility:private"],
)

filegroup(
name = "all-srcs",
srcs = [":package-srcs"],
tags = ["automanaged"],
visibility = ["//visibility:public"],
)
16 changes: 16 additions & 0 deletions experiment/cifuzz_test/fuzz.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/*
Copyright 2021 The Kubernetes Authors.
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.
*/

package fuzztest

func Fuzz(data []byte) int {
Expand Down

0 comments on commit bbd4e9b

Please sign in to comment.