• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/usr/bin/env bash
2
3SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )"
4cd "$SCRIPT_DIR"
5
6which wstest
7if [ $? != 0 ]; then
8  echo "Run 'pip install autobahntestsuite', maybe with 'sudo'."
9  exit 1
10fi
11which jq
12if [ $? != 0 ]; then
13  echo "Run 'brew install jq'"
14  exit 1
15fi
16
17trap 'kill $(jobs -pr)' SIGINT SIGTERM EXIT
18
19set -ex
20
21wstest -m fuzzingserver -s fuzzingserver-config.json &
22sleep 2 # wait for wstest to start
23
24java -jar target/okhttp-ws-tests-*-jar-with-dependencies.jar
25
26jq '.[] as $in | $in | keys[] | . + " " + $in[.].behavior' target/fuzzingserver-report/index.json > target/fuzzingserver-actual.txt
27
28diff fuzzingserver-expected.txt target/fuzzingserver-actual.txt
29