671cf51d6d
- add support for building/running debug/release images - have one point of control (Makefile) - list all test cases Type: test Signed-off-by: Filip Tehlar <ftehlar@cisco.com> Change-Id: I97949abc2fff85d7a2b3784122be159aeec72b52
40 lines
749 B
Bash
Executable File
40 lines
749 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
source vars
|
|
|
|
args=
|
|
single_test=0
|
|
persist_set=0
|
|
|
|
for i in "$@"
|
|
do
|
|
case "${i}" in
|
|
--persist=*)
|
|
persist="${i#*=}"
|
|
if [ $persist = "true" ]; then
|
|
args="$args -persist"
|
|
persist_set=1
|
|
fi
|
|
;;
|
|
--verbose=*)
|
|
verbose="${i#*=}"
|
|
if [ $verbose = "true" ]; then
|
|
args="$args -verbose"
|
|
fi
|
|
;;
|
|
--test=*)
|
|
tc_name="${i#*=}"
|
|
if [ $tc_name != "all" ]; then
|
|
single_test=1
|
|
args="$args -run $tc_name"
|
|
fi
|
|
esac
|
|
done
|
|
|
|
if [ $single_test -eq 0 ] && [ $persist_set -eq 1 ]; then
|
|
echo "persist flag is not supperted while running all tests!"
|
|
exit 1
|
|
fi
|
|
|
|
sudo -E go test -buildvcs=false -v $args
|