test: add tezos-alpha-baker command in tezos-init-sandboxed-client

This commit is contained in:
Pietro 2018-03-21 15:40:13 +01:00 committed by Grégoire Henry
parent f6dbdf7ac3
commit 5399dee5ce

View File

@ -14,6 +14,7 @@ init_sandboxed_client() {
client_dirs+=("$client_dir") client_dirs+=("$client_dir")
client="$local_client -base-dir $client_dir -addr 127.0.0.1 -port $rpc" 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" admin_client="$local_admin_client -base-dir $client_dir -addr 127.0.0.1 -port $rpc"
alpha_baker="$local_alpha_baker -base-dir $client_dir -addr 127.0.0.1 -port $rpc"
} }
@ -220,10 +221,12 @@ main () {
if [ $(basename "$bin_dir") = "bin_client" ]; then if [ $(basename "$bin_dir") = "bin_client" ]; then
local_client="${local_client:-$bin_dir/../../_build/default/src/bin_client/main_client.exe}" local_client="${local_client:-$bin_dir/../../_build/default/src/bin_client/main_client.exe}"
local_admin_client="${local_admin_client:-$bin_dir/../../_build/default/src/bin_client/main_admin.exe}" local_admin_client="${local_admin_client:-$bin_dir/../../_build/default/src/bin_client/main_admin.exe}"
local_alpha_baker="${local_alpha_baker:-$bin_dir/../../_build/default/src/proto_alpha/bin_baker/main_baker_alpha.exe}"
else else
# we assume a clean install with tezos-(admin-)client in the path # we assume a clean install with tezos-(admin-)client in the path
local_client="${local_client:-$(which tezos-client)}" local_client="${local_client:-$(which tezos-client)}"
local_admin_client="${local_admin_client:-$(which tezos-admin-client)}" local_admin_client="${local_admin_client:-$(which tezos-admin-client)}"
local_alpha_baker="${local_alpha_baker:-$(which tezos-alpha-baker)}"
fi fi
if [ $# -lt 1 ] || [ "$1" -le 0 ] || [ 10 -le "$1" ]; then if [ $# -lt 1 ] || [ "$1" -le 0 ] || [ 10 -le "$1" ]; then
@ -236,13 +239,19 @@ main () {
add_sandboxed_bootstrap_identities | sed -e 's/^/## /' 1>&2 add_sandboxed_bootstrap_identities | sed -e 's/^/## /' 1>&2
mkdir -p $client_dir/bin mkdir -p $client_dir/bin
echo '#!/bin/sh' > $client_dir/bin/tezos-client echo '#!/bin/sh' > $client_dir/bin/tezos-client
echo "exec $client \"\$@\"" >> $client_dir/bin/tezos-client echo "exec $client \"\$@\"" >> $client_dir/bin/tezos-client
chmod +x $client_dir/bin/tezos-client chmod +x $client_dir/bin/tezos-client
echo '#!/bin/sh' > $client_dir/bin/tezos-admin-client echo '#!/bin/sh' > $client_dir/bin/tezos-admin-client
echo "exec $admin_client \"\$@\"" >> $client_dir/bin/tezos-admin-client echo "exec $admin_client \"\$@\"" >> $client_dir/bin/tezos-admin-client
chmod +x $client_dir/bin/tezos-admin-client chmod +x $client_dir/bin/tezos-admin-client
echo '#!/bin/sh' > $client_dir/bin/tezos-alpha-baker
echo "exec $alpha_baker \"\$@\"" >> $client_dir/bin/tezos-alpha-baker
chmod +x $client_dir/bin/tezos-alpha-baker
cat <<EOF cat <<EOF
if type tezos-client-reset >/dev/null 2>&1 ; then tezos-client-reset; fi ; if type tezos-client-reset >/dev/null 2>&1 ; then tezos-client-reset; fi ;
PATH="$client_dir/bin:\$PATH" ; export PATH ; PATH="$client_dir/bin:\$PATH" ; export PATH ;