]> git.scottworley.com Git - hellowebpy/blame - tests/says-hello.sh
A minimal "hello world" python web server
[hellowebpy] / tests / says-hello.sh
CommitLineData
f95935ab
SW
1#!/bin/sh
2
3set -eu
4
5python3 hellowebpy.py &
6pid=$!
7
8exit_status=1
9
10for _ in $(seq 10);do
11 if curl --max-time 2 http://localhost:8080 | grep 'Hello Web';then
12 echo SUCCESS
13 exit_status=0
14 break
15 fi
16 sleep 1
17done
18
19kill "$pid"
20exit "$exit_status"