fork of go-git with some jj specific features
1#!/bin/bash -eu
2# Copyright 2023 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
19go mod download
20go get github.com/AdamKorcz/go-118-fuzz-build/testing
21
22if [ "$SANITIZER" != "coverage" ]; then
23 sed -i '/func (s \*DecoderSuite) TestDecode(/,/^}/ s/^/\/\//' plumbing/format/config/decoder_test.go
24 sed -n '35,$p' plumbing/format/packfile/common_test.go >> plumbing/format/packfile/delta_test.go
25 sed -n '20,53p' plumbing/object/object_test.go >> plumbing/object/tree_test.go
26 sed -i 's|func Test|// func Test|' plumbing/transport/common_test.go
27fi
28
29compile_native_go_fuzzer $(pwd)/internal/revision FuzzParser fuzz_parser
30compile_native_go_fuzzer $(pwd)/plumbing/format/config FuzzDecoder fuzz_decoder_config
31compile_native_go_fuzzer $(pwd)/plumbing/format/packfile FuzzPatchDelta fuzz_patch_delta
32compile_native_go_fuzzer $(pwd)/plumbing/object FuzzParseSignedBytes fuzz_parse_signed_bytes
33compile_native_go_fuzzer $(pwd)/plumbing/object FuzzDecode fuzz_decode
34compile_native_go_fuzzer $(pwd)/plumbing/protocol/packp FuzzDecoder fuzz_decoder_packp
35compile_native_go_fuzzer $(pwd)/plumbing/transport FuzzNewEndpoint fuzz_new_endpoint