File: fuzz.sh

package info (click to toggle)
golang-github-bradenaw-juniper 0.15.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 872 kB
  • sloc: sh: 27; makefile: 2
file content (11 lines) | stat: -rw-r--r-- 388 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
#!/bin/bash

set -euxo pipefail

find . -name "*_test.go" \
    | xargs grep "func Fuzz" \
    | sed -E -e "s/^\.\/(([a-zA-Z0-9]+\/)+).+?(Fuzz[a-zA-Z0-9]+).+?$/\1 \3/g" \
    | while read package_name fuzz_test_name; do
        echo "$package_name $fuzz_test_name"
        "$GOROOT/bin/go" test --fuzz "$fuzz_test_name" --fuzztime=15s "github.com/bradenaw/juniper/$package_name"
    done