+ Adding option to test everything including cargo and client tests
This commit is contained in:
parent
c79cf34dfd
commit
7c95519402
@ -4,6 +4,7 @@ _help() {
|
|||||||
cat <<EOF
|
cat <<EOF
|
||||||
Usage: ./build.sh [-h|-t|-b|-r]
|
Usage: ./build.sh [-h|-t|-b|-r]
|
||||||
h Help : shows this command
|
h Help : shows this command
|
||||||
|
f Full : Runs all available tests including the cargo ones
|
||||||
t Test : Runs All tests from cargo tests to client tests
|
t Test : Runs All tests from cargo tests to client tests
|
||||||
T Test Realse : Runs tests against release build
|
T Test Realse : Runs tests against release build
|
||||||
b Build : Builds dev build with 'cargo build'
|
b Build : Builds dev build with 'cargo build'
|
||||||
@ -14,6 +15,7 @@ EOF
|
|||||||
[[ -z $1 ]] && _help && exit 0
|
[[ -z $1 ]] && _help && exit 0
|
||||||
|
|
||||||
export CARGO_BIN=$HOME/.cargo/bin/cargo
|
export CARGO_BIN=$HOME/.cargo/bin/cargo
|
||||||
|
full=
|
||||||
|
|
||||||
testing() {
|
testing() {
|
||||||
release_opt=$1
|
release_opt=$1
|
||||||
@ -23,11 +25,15 @@ testing() {
|
|||||||
echo Waiting on server to spin up && sleep 2
|
echo Waiting on server to spin up && sleep 2
|
||||||
|
|
||||||
python3 client-tests/client.py
|
python3 client-tests/client.py
|
||||||
kill -9 $server
|
kill -9 $server 2> /dev/null
|
||||||
|
if [ ! -z $full ];then
|
||||||
|
cargo test $release_opt
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
while getopts ":htTbr" arg; do
|
while getopts ":fhtTbr" arg; do
|
||||||
case ${arg} in
|
case ${arg} in
|
||||||
|
f) full=true;;
|
||||||
h) echo help command;;
|
h) echo help command;;
|
||||||
t) testing;;
|
t) testing;;
|
||||||
T) testing --release;;
|
T) testing --release;;
|
||||||
|
Loading…
Reference in New Issue
Block a user