git.iko.soy/rowtype-yoga/purescript-protobuf
on master help sign in
53 lines 1.2 kB history raw
1# Protocol Buffer Conformance Testing
3## Running the conformance test
5### Running with Nix
7From the top directory of this repo,
9```shell
10nix run .#conformance
11```
13### Running from output/
15```shell
16cd conformance
17```
18```shell
19spago build
20```
21```shell
22conformance_test_runner --enforce_recommended bin/conformance-purescript
23```
25### Running from bundled executable
27```shell
28cd conformance
29```
30```shell
31spago bundle --platform=node --minify --bundle-type app --outfile conformance.mjs
32```
33```shell
34conformance_test_runner --enforce_recommended ./conformance.mjs
35```
37## About the conformance test runner
39[Conformance README](https://github.com/protocolbuffers/protobuf/tree/master/conformance)
41The derivations in `nix/protobuf.nix` will build `protoc` and the
42`conformance-test-runner`.
44## Dev
46To generate the conformance `.purs` in the dev environment:
48```shell
49protoc --purescript_out=./conformance/src/generated --proto_path=$(nix path-info .#protobuf)/conformance $(nix path-info .#protobuf)/conformance/conformance.proto
50```
51```shell
52protoc --purescript_out=./conformance/src/generated --proto_path=$(nix path-info .#protobuf)/src $(nix path-info .#protobuf)/src/google/protobuf/test_messages_proto3.proto
53```