mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #4325 from ethereum/rename-aleth
Rename eth to aleth in testing scripts
This commit is contained in:
commit
e028d25ed3
@ -56,7 +56,6 @@ fi
|
|||||||
function printError() { echo "$(tput setaf 1)$1$(tput sgr0)"; }
|
function printError() { echo "$(tput setaf 1)$1$(tput sgr0)"; }
|
||||||
function printTask() { echo "$(tput bold)$(tput setaf 2)$1$(tput sgr0)"; }
|
function printTask() { echo "$(tput bold)$(tput setaf 2)$1$(tput sgr0)"; }
|
||||||
|
|
||||||
|
|
||||||
printTask "Running commandline tests..."
|
printTask "Running commandline tests..."
|
||||||
"$REPO_ROOT/test/cmdlineTests.sh" &
|
"$REPO_ROOT/test/cmdlineTests.sh" &
|
||||||
CMDLINE_PID=$!
|
CMDLINE_PID=$!
|
||||||
@ -70,58 +69,58 @@ then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
function download_eth()
|
function download_aleth()
|
||||||
{
|
{
|
||||||
if [[ "$OSTYPE" == "darwin"* ]]; then
|
if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||||
ETH_PATH="$REPO_ROOT/eth"
|
ALETH_PATH="$REPO_ROOT/aleth"
|
||||||
elif [ -z $CI ]; then
|
elif [ -z $CI ]; then
|
||||||
ETH_PATH="eth"
|
ALETH_PATH="aleth"
|
||||||
else
|
else
|
||||||
mkdir -p /tmp/test
|
mkdir -p /tmp/test
|
||||||
if grep -i trusty /etc/lsb-release >/dev/null 2>&1
|
if grep -i trusty /etc/lsb-release >/dev/null 2>&1
|
||||||
then
|
then
|
||||||
# built from d661ac4fec0aeffbedcdc195f67f5ded0c798278 at 2018-06-20
|
# built from d661ac4fec0aeffbedcdc195f67f5ded0c798278 at 2018-06-20
|
||||||
ETH_BINARY=aleth_2018-06-20_trusty
|
ALETH_BINARY=aleth_2018-06-20_trusty
|
||||||
ETH_HASH="54b8a5455e45b295e3a962f353ff8f1580ed106c"
|
ALETH_HASH="54b8a5455e45b295e3a962f353ff8f1580ed106c"
|
||||||
else
|
else
|
||||||
# built from d661ac4fec0aeffbedcdc195f67f5ded0c798278 at 2018-06-20
|
# built from d661ac4fec0aeffbedcdc195f67f5ded0c798278 at 2018-06-20
|
||||||
ETH_BINARY=aleth_2018-06-20_artful
|
ALETH_BINARY=aleth_2018-06-20_artful
|
||||||
ETH_HASH="02e6c4b3d98299885e73f7db6c9e3fbe3d66d444"
|
ALETH_HASH="02e6c4b3d98299885e73f7db6c9e3fbe3d66d444"
|
||||||
fi
|
fi
|
||||||
wget -q -O /tmp/test/eth https://github.com/ethereum/cpp-ethereum/releases/download/solidityTester/$ETH_BINARY
|
ALETH_PATH="/tmp/test/aleth"
|
||||||
test "$(shasum /tmp/test/eth)" = "$ETH_HASH /tmp/test/eth"
|
wget -q -O $ALETH_PATH https://github.com/ethereum/cpp-ethereum/releases/download/solidityTester/$ALETH_BINARY
|
||||||
|
test "$(shasum $ALETH_PATH)" = "$ALETH_HASH $ALETH_PATH"
|
||||||
sync
|
sync
|
||||||
chmod +x /tmp/test/eth
|
chmod +x $ALETH_PATH
|
||||||
sync # Otherwise we might get a "text file busy" error
|
sync # Otherwise we might get a "text file busy" error
|
||||||
ETH_PATH="/tmp/test/eth"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# $1: data directory
|
# $1: data directory
|
||||||
# echos the PID
|
# echos the PID
|
||||||
function run_eth()
|
function run_aleth()
|
||||||
{
|
{
|
||||||
$ETH_PATH --test -d "$1" >/dev/null 2>&1 &
|
$ALETH_PATH --test -d "$1" >/dev/null 2>&1 &
|
||||||
echo $!
|
echo $!
|
||||||
# Wait until the IPC endpoint is available.
|
# Wait until the IPC endpoint is available.
|
||||||
while [ ! -S "$1"/geth.ipc ] ; do sleep 1; done
|
while [ ! -S "$1"/geth.ipc ] ; do sleep 1; done
|
||||||
sleep 2
|
sleep 2
|
||||||
}
|
}
|
||||||
|
|
||||||
function check_eth() {
|
function check_aleth() {
|
||||||
printTask "Running IPC tests with $ETH_PATH..."
|
printTask "Running IPC tests with $ALETH_PATH..."
|
||||||
if ! hash $ETH_PATH 2>/dev/null; then
|
if ! hash $ALETH_PATH 2>/dev/null; then
|
||||||
printError "$ETH_PATH not found"
|
printError "$ALETH_PATH not found"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ "$IPC_ENABLED" = true ];
|
if [ "$IPC_ENABLED" = true ];
|
||||||
then
|
then
|
||||||
download_eth
|
download_aleth
|
||||||
check_eth
|
check_aleth
|
||||||
ETH_PID=$(run_eth /tmp/test)
|
ALETH_PID=$(run_aleth /tmp/test)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
progress="--show-progress"
|
progress="--show-progress"
|
||||||
@ -166,7 +165,7 @@ fi
|
|||||||
|
|
||||||
if [ "$IPC_ENABLED" = true ]
|
if [ "$IPC_ENABLED" = true ]
|
||||||
then
|
then
|
||||||
pkill "$ETH_PID" || true
|
pkill "$ALETH_PID" || true
|
||||||
sleep 4
|
sleep 4
|
||||||
pgrep "$ETH_PID" && pkill -9 "$ETH_PID" || true
|
pgrep "$ALETH_PID" && pkill -9 "$ALETH_PID" || true
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user