diff --git a/src/bin_client/test/jbuild b/src/bin_client/test/jbuild index e097f70bb..52d7e17fc 100644 --- a/src/bin_client/test/jbuild +++ b/src/bin_client/test/jbuild @@ -68,6 +68,7 @@ ${bin:tezos-init-sandboxed-client.sh} ${bin:tezos-client} ${bin:tezos-admin-client} + ${bin:tezos-protocol-compiler} )))) (alias diff --git a/src/bin_client/test/test_injection.sh b/src/bin_client/test/test_injection.sh index aad2320f4..d9ddc0f60 100755 --- a/src/bin_client/test/test_injection.sh +++ b/src/bin_client/test/test_injection.sh @@ -30,8 +30,7 @@ done sleep 2 -# autogenerated from the demo source -protocol_version="PshuejubNkeGc5nU2xwF7uGzCdujcZY7ZV3duFfffmG4z5SoMAM" +protocol_version=`$compiler -hash-only "$test_dir/demo"` $admin_client inject protocol "$test_dir/demo" $admin_client list protocols diff --git a/src/bin_client/test/test_lib.inc.sh b/src/bin_client/test/test_lib.inc.sh index 0ba0875eb..2db469132 100755 --- a/src/bin_client/test/test_lib.inc.sh +++ b/src/bin_client/test/test_lib.inc.sh @@ -14,6 +14,7 @@ local_node="${2:-$test_dir/../../../_build/default/src/bin_node/main.exe}" tezos_init_sandboxed_client="${3:-$test_dir/../../bin_client/tezos-init-sandboxed-client.sh}" local_client="${4:-$test_dir/../../../_build/default/src/bin_client/main_client.exe}" local_admin_client="${5:-$test_dir/../../../_build/default/src/bin_client/main_admin.exe}" +local_compiler="${6:-$test_dir/../../../_build/default/src/lib_protocol_compiler/main_native.exe}" contract_dir="contracts" diff --git a/src/bin_client/tezos-client.opam b/src/bin_client/tezos-client.opam index 11347c51c..9bc411b99 100644 --- a/src/bin_client/tezos-client.opam +++ b/src/bin_client/tezos-client.opam @@ -19,6 +19,7 @@ depends: [ "tezos-client-base-unix" "tezos-signer-backends" "tezos-node" { test } + "tezos-protocol-compiler" { test } ] build: [ [ "jbuilder" "build" "-p" name "-j" jobs ] diff --git a/src/bin_client/tezos-init-sandboxed-client.sh b/src/bin_client/tezos-init-sandboxed-client.sh index 9e34960cb..920190616 100755 --- a/src/bin_client/tezos-init-sandboxed-client.sh +++ b/src/bin_client/tezos-init-sandboxed-client.sh @@ -17,10 +17,12 @@ init_sandboxed_client() { client="$local_client -S -base-dir $client_dir -addr 127.0.0.1 -port $rpc" admin_client="$local_admin_client -S -base-dir $client_dir -addr 127.0.0.1 -port $rpc" signer="$local_signer -S -base-dir $client_dir -addr 127.0.0.1 -port $rpc" + compiler="$local_compiler" else client="$local_client -base-dir $client_dir -addr 127.0.0.1 -port $rpc" admin_client="$local_admin_client -base-dir $client_dir -addr 127.0.0.1 -port $rpc" signer="$local_signer -base-dir $client_dir -addr 127.0.0.1 -port $rpc" + compiler="$local_compiler" fi parameters_file="${parameters_file:-$client_dir/protocol_parameters.json}" @@ -172,11 +174,13 @@ main () { local_admin_client="${local_admin_client:-$bin_dir/../../_build/default/src/bin_client/main_admin.exe}" local_signer="${local_signer:-$bin_dir/../../_build/default/src/bin_signer/main_signer.exe}" parameters_file="${parameters_file:-$bin_dir/../../scripts/protocol_parameters.json}" + local_compiler="${local_compiler:-$bin_dir/../../_build/default/src/lib_protocol_compiler/main_native.exe}" else # we assume a clean install with tezos-(admin-)client in the path local_client="${local_client:-$(which tezos-client)}" local_admin_client="${local_admin_client:-$(which tezos-admin-client)}" local_signer="${local_signer:-$(which tezos-signer)}" + local_compiler="${local_compiler:-$(which tezos-protocol-compiler)}" fi if [ $# -lt 1 ] || [ "$1" -le 0 ] || [ 10 -le "$1" ]; then