This commit is contained in:
Zach Ramsay 2017-10-18 15:32:34 -04:00
parent f9e14ad61b
commit 631844895f
3 changed files with 27 additions and 29 deletions

View File

@ -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.
Multiple example apps are included:
- the `counter` application, which illustrates nonce checking in txs
- the `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 counter` application, which illustrates nonce checking in txs
- the `abci-cli dummy` application, which illustrates a simple key-value merkle tree
- the `abci-cli dummy --persistent` application, which augments the dummy with persistence and validator set changes
## Specification

View File

@ -24,30 +24,28 @@ make tools
# Get VENDORED dependencies
make get_vendor_deps
BINARIES=( "abci-cli" "dummy" "counter" )
BINARY="abci-cli"
for binary in ${BINARIES[@]}; do
# Build!
echo "==> Building..."
"$(which gox)" \
-os="${XC_OS}" \
-arch="${XC_ARCH}" \
-osarch="!darwin/arm !solaris/amd64 !freebsd/amd64" \
-ldflags "-X ${GIT_IMPORT}.GitCommit='${GIT_COMMIT}' -X ${GIT_IMPORT}.GitDescribe='${GIT_DESCRIBE}'" \
-output "build/pkg/{{.OS}}_{{.Arch}}/$binary" \
-tags="${BUILD_TAGS}" \
github.com/tendermint/abci/cmd/$binary
# Build!
echo "==> Building..."
"$(which gox)" \
-os="${XC_OS}" \
-arch="${XC_ARCH}" \
-osarch="!darwin/arm !solaris/amd64 !freebsd/amd64" \
-ldflags "-X ${GIT_IMPORT}.GitCommit='${GIT_COMMIT}' -X ${GIT_IMPORT}.GitDescribe='${GIT_DESCRIBE}'" \
-output "build/pkg/{{.OS}}_{{.Arch}}/$BINARY" \
-tags="${BUILD_TAGS}" \
github.com/tendermint/abci/cmd/$BINARY
# Zip all the files.
echo "==> Packaging..."
for PLATFORM in $(find ./build/pkg -mindepth 1 -maxdepth 1 -type d); do
OSARCH=$(basename "${PLATFORM}")
echo "--> ${OSARCH}"
# Zip all the files.
echo "==> Packaging..."
for PLATFORM in $(find ./build/pkg -mindepth 1 -maxdepth 1 -type d); do
OSARCH=$(basename "${PLATFORM}")
echo "--> ${OSARCH}"
pushd "$PLATFORM" >/dev/null 2>&1
zip "../${OSARCH}.zip" ./*
popd >/dev/null 2>&1
done
pushd "$PLATFORM" >/dev/null 2>&1
zip "../${OSARCH}.zip" ./*
popd >/dev/null 2>&1
done

View File

@ -11,13 +11,13 @@ cd "$DIR" || exit
function testExample() {
N=$1
INPUT=$2
APP=$3
APP="$3 $4"
echo "Example $N"
echo "Example $N: $APP"
$APP &> /dev/null &
sleep 2
abci-cli --verbose batch < "$INPUT" > "${INPUT}.out.new"
killall "$APP"
killall $3
pre=$(shasum < "${INPUT}.out")
post=$(shasum < "${INPUT}.out.new")
@ -34,8 +34,8 @@ function testExample() {
rm "${INPUT}".out.new
}
testExample 1 tests/test_cli/ex1.abci dummy
testExample 2 tests/test_cli/ex2.abci counter
testExample 1 tests/test_cli/ex1.abci abci-cli dummy
testExample 2 tests/test_cli/ex2.abci abci-cli counter
echo ""
echo "PASS"