+ 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
|
||||
Usage: ./build.sh [-h|-t|-b|-r]
|
||||
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 Realse : Runs tests against release build
|
||||
b Build : Builds dev build with 'cargo build'
|
||||
@ -14,6 +15,7 @@ EOF
|
||||
[[ -z $1 ]] && _help && exit 0
|
||||
|
||||
export CARGO_BIN=$HOME/.cargo/bin/cargo
|
||||
full=
|
||||
|
||||
testing() {
|
||||
release_opt=$1
|
||||
@ -23,11 +25,15 @@ testing() {
|
||||
echo Waiting on server to spin up && sleep 2
|
||||
|
||||
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
|
||||
f) full=true;;
|
||||
h) echo help command;;
|
||||
t) testing;;
|
||||
T) testing --release;;
|
||||
|
Loading…
Reference in New Issue
Block a user