diff --git a/package.json b/package.json index d4fc3c7a..b60e1886 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "ciphernode:lint": "cd packages/ciphernode && cargo fmt -- --check", "ciphernode:add": "cd packages/evm && yarn ciphernode:add", "ciphernode:remove": "cd packages/evm && yarn ciphernode:remove", - "ciphernode:test": "cd packages/ciphernode && cargo test", + "ciphernode:test": "cd packages/ciphernode && ./scripts/test.sh", "ciphernode:build": "cd packages/ciphernode && cargo build --release", "preciphernode:build": "yarn evm:compile", "committee:new": "cd packages/evm && yarn committee:new", diff --git a/packages/ciphernode/evm/scripts/build_fixtures.sh b/packages/ciphernode/evm/scripts/build_fixtures.sh index c4e5f3f0..2b65360e 100755 --- a/packages/ciphernode/evm/scripts/build_fixtures.sh +++ b/packages/ciphernode/evm/scripts/build_fixtures.sh @@ -1,3 +1,7 @@ #!/usr/bin/env bash - + +set -e + +echo "Building fixtures..." + echo "{\"abi\": $(solc --abi tests/fixtures/emit_logs.sol | tail -n 1), \"bin\": \"$(solc --bin tests/fixtures/emit_logs.sol| tail -n 1)\"}" | jq '.' > tests/fixtures/emit_logs.json diff --git a/packages/ciphernode/scripts/test.sh b/packages/ciphernode/scripts/test.sh new file mode 100755 index 00000000..79de102f --- /dev/null +++ b/packages/ciphernode/scripts/test.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +set -e + +pushd ./evm && ./scripts/build_fixtures.sh && popd + +cargo test -- $@