Compiler: use -hash-only in the test suite

This commit is contained in:
Grégoire Henry 2018-07-21 01:04:07 +02:00
parent 90ef97b38b
commit c1d89e3777
No known key found for this signature in database
GPG Key ID: 50D984F20BD445D2
5 changed files with 8 additions and 2 deletions

View File

@ -68,6 +68,7 @@
${bin:tezos-init-sandboxed-client.sh}
${bin:tezos-client}
${bin:tezos-admin-client}
${bin:tezos-protocol-compiler}
))))
(alias

View File

@ -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

View File

@ -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"

View File

@ -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 ]

View File

@ -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