1#!/bin/bash
2
3PROTOBUF_ROOT=$1
4CONFORMANCE_ROOT=$1/conformance
5CONFORMANCE_TEST_RUNNER=$CONFORMANCE_ROOT/conformance-test-runner
6
7cd $(dirname $0)
8
9if [[ $PROTOBUF_ROOT == "" ]]; then
10  echo "usage: test.sh <protobuf-root>" >/dev/stderr
11  exit 1
12fi
13
14if [[ ! -x $CONFORMANCE_TEST_RUNNER ]]; then
15  echo "SKIP: conformance test runner not installed" >/dev/stderr
16  exit 0
17fi
18
19a=$CONFORMANCE_ROOT/conformance.proto
20b=internal/conformance_proto/conformance.proto
21if [[ $(diff $a $b) != "" ]]; then
22  cp $a $b
23  echo "WARNING: conformance.proto is out of date" >/dev/stderr
24fi
25
26$CONFORMANCE_TEST_RUNNER --failure_list failure_list_go.txt ./conformance.sh
27