fixes
This commit is contained in:
parent
f9e14ad61b
commit
631844895f
|
@ -60,9 +60,9 @@ The `abci-cli` tool wraps any ABCI client and can be used for probing/testing an
|
||||||
See [the documentation](http://tendermint.readthedocs.io/en/master/) for more details.
|
See [the documentation](http://tendermint.readthedocs.io/en/master/) for more details.
|
||||||
|
|
||||||
Multiple example apps are included:
|
Multiple example apps are included:
|
||||||
- the `counter` application, which illustrates nonce checking in txs
|
- the `abci-cli counter` application, which illustrates nonce checking in txs
|
||||||
- the `dummy` application, which illustrates a simple key-value merkle tree
|
- the `abci-cli dummy` application, which illustrates a simple key-value merkle tree
|
||||||
- the `dummy --persistent` application, which augments the dummy with persistence and validator set changes
|
- the `abci-cli dummy --persistent` application, which augments the dummy with persistence and validator set changes
|
||||||
|
|
||||||
## Specification
|
## Specification
|
||||||
|
|
||||||
|
|
|
@ -24,30 +24,28 @@ make tools
|
||||||
# Get VENDORED dependencies
|
# Get VENDORED dependencies
|
||||||
make get_vendor_deps
|
make get_vendor_deps
|
||||||
|
|
||||||
BINARIES=( "abci-cli" "dummy" "counter" )
|
BINARY="abci-cli"
|
||||||
|
|
||||||
for binary in ${BINARIES[@]}; do
|
# Build!
|
||||||
# Build!
|
echo "==> Building..."
|
||||||
echo "==> Building..."
|
"$(which gox)" \
|
||||||
"$(which gox)" \
|
|
||||||
-os="${XC_OS}" \
|
-os="${XC_OS}" \
|
||||||
-arch="${XC_ARCH}" \
|
-arch="${XC_ARCH}" \
|
||||||
-osarch="!darwin/arm !solaris/amd64 !freebsd/amd64" \
|
-osarch="!darwin/arm !solaris/amd64 !freebsd/amd64" \
|
||||||
-ldflags "-X ${GIT_IMPORT}.GitCommit='${GIT_COMMIT}' -X ${GIT_IMPORT}.GitDescribe='${GIT_DESCRIBE}'" \
|
-ldflags "-X ${GIT_IMPORT}.GitCommit='${GIT_COMMIT}' -X ${GIT_IMPORT}.GitDescribe='${GIT_DESCRIBE}'" \
|
||||||
-output "build/pkg/{{.OS}}_{{.Arch}}/$binary" \
|
-output "build/pkg/{{.OS}}_{{.Arch}}/$BINARY" \
|
||||||
-tags="${BUILD_TAGS}" \
|
-tags="${BUILD_TAGS}" \
|
||||||
github.com/tendermint/abci/cmd/$binary
|
github.com/tendermint/abci/cmd/$BINARY
|
||||||
|
|
||||||
# Zip all the files.
|
# Zip all the files.
|
||||||
echo "==> Packaging..."
|
echo "==> Packaging..."
|
||||||
for PLATFORM in $(find ./build/pkg -mindepth 1 -maxdepth 1 -type d); do
|
for PLATFORM in $(find ./build/pkg -mindepth 1 -maxdepth 1 -type d); do
|
||||||
OSARCH=$(basename "${PLATFORM}")
|
OSARCH=$(basename "${PLATFORM}")
|
||||||
echo "--> ${OSARCH}"
|
echo "--> ${OSARCH}"
|
||||||
|
|
||||||
pushd "$PLATFORM" >/dev/null 2>&1
|
pushd "$PLATFORM" >/dev/null 2>&1
|
||||||
zip "../${OSARCH}.zip" ./*
|
zip "../${OSARCH}.zip" ./*
|
||||||
popd >/dev/null 2>&1
|
popd >/dev/null 2>&1
|
||||||
done
|
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -11,13 +11,13 @@ cd "$DIR" || exit
|
||||||
function testExample() {
|
function testExample() {
|
||||||
N=$1
|
N=$1
|
||||||
INPUT=$2
|
INPUT=$2
|
||||||
APP=$3
|
APP="$3 $4"
|
||||||
|
|
||||||
echo "Example $N"
|
echo "Example $N: $APP"
|
||||||
$APP &> /dev/null &
|
$APP &> /dev/null &
|
||||||
sleep 2
|
sleep 2
|
||||||
abci-cli --verbose batch < "$INPUT" > "${INPUT}.out.new"
|
abci-cli --verbose batch < "$INPUT" > "${INPUT}.out.new"
|
||||||
killall "$APP"
|
killall $3
|
||||||
|
|
||||||
pre=$(shasum < "${INPUT}.out")
|
pre=$(shasum < "${INPUT}.out")
|
||||||
post=$(shasum < "${INPUT}.out.new")
|
post=$(shasum < "${INPUT}.out.new")
|
||||||
|
@ -34,8 +34,8 @@ function testExample() {
|
||||||
rm "${INPUT}".out.new
|
rm "${INPUT}".out.new
|
||||||
}
|
}
|
||||||
|
|
||||||
testExample 1 tests/test_cli/ex1.abci dummy
|
testExample 1 tests/test_cli/ex1.abci abci-cli dummy
|
||||||
testExample 2 tests/test_cli/ex2.abci counter
|
testExample 2 tests/test_cli/ex2.abci abci-cli counter
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echo "PASS"
|
echo "PASS"
|
||||||
|
|
Loading…
Reference in New Issue