From 2b4ac9b580dcde28a428be2c5e662dc6c88ac054 Mon Sep 17 00:00:00 2001 From: Přemysl Eric Janouch Date: Wed, 27 Dec 2023 02:16:49 +0100 Subject: Make the test script more robust --- test.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/test.sh b/test.sh index a51aeb2..0f69676 100755 --- a/test.sh +++ b/test.sh @@ -15,6 +15,8 @@ cp -ra $HOME/Pictures/Anime $input ./gallery web $target :8080 & web=$! +trap "kill $web; wait $web" EXIT INT +sleep 0.25 call() (curl http://localhost:8080/api/$1 -X POST --data-binary @-) @@ -24,6 +26,3 @@ echo '{}' | call duplicates echo '{}' | call orphans echo '{"sha1":"d53fc82162fd19a6e7b92b401b08b7505dbf3dfd"}' | call info echo '{"sha1":"9539d9895ab8c25d76c321b23b8a327801a496bb"}' | call similar - -kill $web || : -wait $web -- cgit v1.2.3-70-g09d2