laconicd/scripts/run-solidity-tests.sh
Federico Kunze a924b20091
update chain-id format (#542)
* chain_id.go

* rpc changes

* update scripts

* additional test

* changelog

* fix tests

* update script

* rpc updates

* validate testnet command chain-id

* validate rest server chain-id

* fix lint

* rpc updates

* changelog

* comment simulations
2020-09-24 14:50:47 -03:00

63 lines
1.5 KiB
Bash
Executable File

#!/bin/bash
export GOPATH=~/go
export PATH=$PATH:$GOPATH/bin
go build -o ./build/ethermintd ./cmd/ethermintd
go build -o ./build/ethermintcli ./cmd/ethermintcli
mkdir $GOPATH/bin
cp ./build/ethermintd $GOPATH/bin
cp ./build/ethermintcli $GOPATH/bin
CHAINID="ethermint-1337"
cd tests-solidity
if command -v yarn &> /dev/null; then
yarn install
else
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt update && sudo apt install yarn
yarn install
fi
chmod +x ./init-test-node.sh
./init-test-node.sh > ethermintd.log &
sleep 5
ethermintcli rest-server --laddr "tcp://localhost:8545" --unlock-key localkey,user1,user2 --chain-id $CHAINID --trace --wsport 8546 > ethermintcli.log &
cd suites/initializable
yarn test-ethermint
ok=$?
if (( $? != 0 )); then
echo "initializable test failed: exit code $?"
fi
killall ethermintcli
killall ethermintd
echo "Script exited with code $ok"
exit $ok
# initializable-buidler fails on CI, re-add later
./../../init-test-node.sh > ethermintd.log &
sleep 5
ethermintcli rest-server --laddr "tcp://localhost:8545" --unlock-key localkey,user1,user2 --chain-id $CHAINID --trace --wsport 8546 > ethermintcli.log &
cd ../initializable-buidler
yarn test-ethermint
ok=$(($? + $ok))
if (( $? != 0 )); then
echo "initializable-buidler test failed: exit code $?"
fi
killall ethermintcli
killall ethermintd
echo "Script exited with code $ok"
exit $ok