|
| 1 | +#!/bin/bash -eu |
| 2 | +# Copyright 2025 Google LLC. |
| 3 | +# |
| 4 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | +# you may not use this file except in compliance with the License. |
| 6 | +# You may obtain a copy of the License at |
| 7 | +# |
| 8 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | +# |
| 10 | +# Unless required by applicable law or agreed to in writing, software |
| 11 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | +# See the License for the specific language governing permissions and |
| 14 | +# limitations under the License. |
| 15 | +# |
| 16 | +################################################################################ |
| 17 | + |
| 18 | +cd /tmp |
| 19 | +export GOROOT=/root/.go |
| 20 | +wget https://go.dev/dl/go1.25.3.linux-amd64.tar.gz |
| 21 | + |
| 22 | +mkdir temp-go |
| 23 | +tar -C temp-go/ -xzf go1.25.3.linux-amd64.tar.gz |
| 24 | + |
| 25 | +rm -r /root/.go |
| 26 | +mkdir /root/.go/ |
| 27 | +mv temp-go/go/* /root/.go/ |
| 28 | +rm -rf temp-go |
| 29 | + |
| 30 | + |
| 31 | +cd $SRC/go-118-fuzz-build |
| 32 | +go build |
| 33 | +mv go-118-fuzz-build $GOPATH/bin/go-118-fuzz-build_v2 |
| 34 | +pushd cmd/convertLibFuzzerTestcaseToStdLibGo |
| 35 | + go build . && mv convertLibFuzzerTestcaseToStdLibGo $GOPATH/bin/ |
| 36 | +popd |
| 37 | +pushd cmd/addStdLibCorpusToFuzzer |
| 38 | + go build . && mv addStdLibCorpusToFuzzer $GOPATH/bin/ |
| 39 | +popd |
| 40 | +cd $SRC/openfga |
| 41 | + |
| 42 | + |
| 43 | +cp $SRC/cncf-fuzzing/projects/openfga/authorization_models_advanced_fuzz_test.go $SRC/openfga/tests/ |
| 44 | + |
| 45 | +compile_native_go_fuzzer_v2 github.com/openfga/openfga/tests FuzzCheckWithExclusion FuzzCheckWithExclusion |
| 46 | +compile_native_go_fuzzer_v2 github.com/openfga/openfga/tests FuzzCheckWithIntersection FuzzCheckWithIntersection |
| 47 | +compile_native_go_fuzzer_v2 github.com/openfga/openfga/tests FuzzCheckWithComputedUserset FuzzCheckWithComputedUserset |
| 48 | +compile_native_go_fuzzer_v2 github.com/openfga/openfga/tests FuzzCheckWithPublicAccess FuzzCheckWithPublicAccess |
| 49 | +compile_native_go_fuzzer_v2 github.com/openfga/openfga/tests FuzzCheckWithMultipleRestrictions FuzzCheckWithMultipleRestrictions |
| 50 | +compile_native_go_fuzzer_v2 github.com/openfga/openfga/tests FuzzCheckWithConditions FuzzCheckWithConditions |
| 51 | +compile_native_go_fuzzer_v2 github.com/openfga/openfga/tests FuzzCheckWithParentChild FuzzCheckWithParentChild |
0 commit comments