File: fuzzingserver-test.sh

package info (click to toggle)
libokhttp-java 3.13.1-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,352 kB
  • sloc: java: 60,087; xml: 1,869; sh: 41; makefile: 12
file content (28 lines) | stat: -rwxr-xr-x 673 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/usr/bin/env bash

SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )"
cd "$SCRIPT_DIR"

which wstest
if [ $? != 0 ]; then
  echo "Run 'pip install autobahntestsuite', maybe with 'sudo'."
  exit 1
fi
which jq
if [ $? != 0 ]; then
  echo "Run 'brew install jq'"
  exit 1
fi

trap 'kill $(jobs -pr)' SIGINT SIGTERM EXIT

set -ex

wstest -m fuzzingserver -s fuzzingserver-config.json &
sleep 2 # wait for wstest to start

java -jar target/okhttp-tests-*-jar-with-dependencies.jar

jq '.[] as $in | $in | keys[] | . + " " + $in[.].behavior' target/fuzzingserver-report/index.json > target/fuzzingserver-actual.txt

diff fuzzingserver-expected.txt target/fuzzingserver-actual.txt