forked from bufbuild/protobuf-conformance
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.sh
More file actions
executable file
·40 lines (35 loc) · 1.08 KB
/
test.sh
File metadata and controls
executable file
·40 lines (35 loc) · 1.08 KB
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
29
30
31
32
33
34
35
36
37
38
39
40
#!/usr/bin/env bash
set -euo pipefail
# install dependencies
npm ci
# protoc-gen-js is not available via NPM. we download it from the GitHub
# release page https://github.com/protocolbuffers/protobuf-javascript/releases
version="3.21.2"
platform=""
case $(uname -s) in
Darwin) platform="osx";;
Linux) platform="linux";;
*) >&2 echo "unknown OS $(uname -s) - don't know how to get protoc-gen-js"; exit 1
esac
case $(uname -m) in
arm64)
platform="${platform}-aarch_64"
;;
x86_64)
platform="${platform}-x86_64"
;;
*)
>&2 echo "unknown architecture $(uname -m) - don't know how to get protoc-gen-js"
exit 1
esac
curl -sSL \
"https://github.com/protocolbuffers/protobuf-javascript/releases/download/v${version}/protobuf-javascript-${version}-${platform}.tar.gz" \
| tar xz -C . --strip-components 1
# generate code
rm -rf gen/*
npx buf generate ../../proto
# finally, run the tests
conformance_test_runner --enforce_recommended \
--failure_list failing_tests.txt \
--text_format_failure_list failing_tests_text_format.txt \
--output_dir . runner.js