mirror of
https://github.com/tendermint/tendermint.git
synced 2026-02-10 22:10:11 +00:00
modify test scripts to use relative paths
This commit is contained in:
15
.editorconfig
Normal file
15
.editorconfig
Normal file
@@ -0,0 +1,15 @@
|
||||
# top-most EditorConfig file
|
||||
root = true
|
||||
|
||||
# Unix-style newlines with a newline ending every file
|
||||
[*]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
[Makefile]
|
||||
indent_style = tab
|
||||
|
||||
[*.sh]
|
||||
indent_style = tab
|
||||
2
Makefile
2
Makefile
@@ -30,7 +30,7 @@ lint:
|
||||
@ go get -u github.com/golang/lint/golint
|
||||
@ for file in $$(find "." -name '*.go' | grep -v '/vendor/' | grep -v '\.pb\.go'); do \
|
||||
golint -set_exit_status $${file}; \
|
||||
done;
|
||||
done;
|
||||
|
||||
test_integrations: get_vendor_deps install test
|
||||
|
||||
|
||||
@@ -3,14 +3,19 @@ set -e
|
||||
|
||||
# These tests spawn the counter app and server by execing the ABCI_APP command and run some simple client tests against it
|
||||
|
||||
ROOT=$GOPATH/src/github.com/tendermint/abci/tests/test_app
|
||||
cd $ROOT
|
||||
# Get the directory of where this script is.
|
||||
SOURCE="${BASH_SOURCE[0]}"
|
||||
while [ -h "$SOURCE" ] ; do SOURCE="$(readlink "$SOURCE")"; done
|
||||
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
|
||||
|
||||
# Change into that dir because we expect that.
|
||||
cd "$DIR"
|
||||
|
||||
# test golang counter
|
||||
ABCI_APP="counter" go run *.go
|
||||
ABCI_APP="counter" go run ./*.go
|
||||
|
||||
# test golang counter via grpc
|
||||
ABCI_APP="counter -abci=grpc" ABCI="grpc" go run *.go
|
||||
ABCI_APP="counter -abci=grpc" ABCI="grpc" go run ./*.go
|
||||
|
||||
# test nodejs counter
|
||||
# TODO: fix node app
|
||||
|
||||
@@ -1,6 +1,12 @@
|
||||
#! /bin/bash
|
||||
|
||||
cd $GOPATH/src/github.com/tendermint/abci
|
||||
# Get the root directory.
|
||||
SOURCE="${BASH_SOURCE[0]}"
|
||||
while [ -h "$SOURCE" ] ; do SOURCE="$(readlink "$SOURCE")"; done
|
||||
DIR="$( cd -P "$( dirname "$SOURCE" )/../.." && pwd )"
|
||||
|
||||
# Change into that dir because we expect that.
|
||||
cd "$DIR" || exit
|
||||
|
||||
function testExample() {
|
||||
N=$1
|
||||
@@ -10,17 +16,17 @@ function testExample() {
|
||||
echo "Example $N"
|
||||
$APP &> /dev/null &
|
||||
sleep 2
|
||||
abci-cli --verbose batch < $INPUT > "${INPUT}.out.new"
|
||||
killall "$APP"
|
||||
abci-cli --verbose batch < "$INPUT" > "${INPUT}.out.new"
|
||||
killall "$APP"
|
||||
|
||||
pre=`shasum < "${INPUT}.out"`
|
||||
post=`shasum < "${INPUT}.out.new"`
|
||||
pre=$(shasum < "${INPUT}.out")
|
||||
post=$(shasum < "${INPUT}.out.new")
|
||||
|
||||
if [[ "$pre" != "$post" ]]; then
|
||||
echo "You broke the tutorial"
|
||||
echo "Got:"
|
||||
echo "Got:"
|
||||
cat "${INPUT}.out.new"
|
||||
echo "Expected:"
|
||||
echo "Expected:"
|
||||
cat "${INPUT}.out"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user