add tests
This commit is contained in:
parent
2882528690
commit
dd7f8c14b0
42
sbin/ctl.sh
42
sbin/ctl.sh
@ -166,8 +166,44 @@ function f_apt_intox(){
|
||||
function f_test(){
|
||||
mkdir -p $UKDI_yolo_indir
|
||||
cp testimg/* $UKDI_yolo_indir
|
||||
# echo "loading messi 1"
|
||||
wget "http://localhost:$YOLOPORT/svc_load_face/messi1/messi1.jpg"
|
||||
|
||||
case $1 in
|
||||
"1")
|
||||
echo "five friends"
|
||||
wget -q -O foo "http://localhost:$YOLOPORT/svc_init" && cat foo && echo
|
||||
wget -q -O foo "http://localhost:$YOLOPORT/svc_load_img/ff/fivepeople.jpg" && cat foo && echo
|
||||
wget -q -O foo "http://localhost:$YOLOPORT/svc_faces/ff" && cat foo && echo
|
||||
wget -q -O foo "http://localhost:$YOLOPORT/svc_ideal/ff/ff_rect/ff_crop" && cat foo && echo
|
||||
;;
|
||||
"2")
|
||||
echo "iron maiden"
|
||||
wget -q -O foo "http://localhost:$YOLOPORT/svc_init" && cat foo && echo
|
||||
wget -q -O foo "http://localhost:$YOLOPORT/svc_load_img/im/ironmaiden.jpg" && cat foo && echo
|
||||
wget -q -O foo "http://localhost:$YOLOPORT/svc_faces/im" && cat foo && echo
|
||||
wget -q -O foo "http://localhost:$YOLOPORT/svc_load_img/bd/brucedickinson.jpeg" && cat foo && echo
|
||||
wget -q -O foo "http://localhost:$YOLOPORT/svc_ideal/im/im_rect/im_crop" && cat foo && echo
|
||||
echo "find bruce dickinson"
|
||||
wget -q -O foo "http://localhost:$YOLOPORT/svc_company/im/bd" && cat foo && echo
|
||||
;;
|
||||
"3")
|
||||
echo "footballers"
|
||||
wget -q -O foo "http://localhost:$YOLOPORT/svc_load_img/r1/ronaldo.jpg" && cat foo && echo
|
||||
wget -q -O foo "http://localhost:$YOLOPORT/svc_load_imgs/m1/messi1.jpg/m2/messi2.jpg" && cat foo && echo
|
||||
echo "getting faces from messi1, messi2 and ronaldo - should find one each"
|
||||
wget -q -O foo "http://localhost:$YOLOPORT/svc_faces/m1" && cat foo && echo
|
||||
wget -q -O foo "http://localhost:$YOLOPORT/svc_faces/m2" && cat foo && echo
|
||||
wget -q -O foo "http://localhost:$YOLOPORT/svc_faces/r1" && cat foo && echo
|
||||
echo "comparing messi1 vs messi2, then messi1 vs ronaldo, then messi2 vs ronaldo"
|
||||
wget -q -O foo "http://localhost:$YOLOPORT/svc_compare/m1/m2" && cat foo && echo
|
||||
wget -q -O foo "http://localhost:$YOLOPORT/svc_compare/m1/r1" && cat foo && echo
|
||||
wget -q -O foo "http://localhost:$YOLOPORT/svc_compare/m2/r1" && cat foo && echo
|
||||
;;
|
||||
"4")
|
||||
echo "all in one service test"
|
||||
wget -q -O foo "http://localhost:$YOLOPORT/svc_facematch/m1/messi1.jpg/m2/messi2.jpg" && cat foo && echo
|
||||
;;
|
||||
esac
|
||||
|
||||
}
|
||||
|
||||
function f_start(){
|
||||
@ -201,6 +237,8 @@ case $1 in
|
||||
;;
|
||||
"stop") f_stop
|
||||
;;
|
||||
"test") f_test $2
|
||||
;;
|
||||
*) echo "Error. $1 is not a $0 command."
|
||||
;;
|
||||
esac
|
||||
|
||||
Loading…
Reference in New Issue
Block a user