#!/bin/bash

./bin/rest-server &
SERVER_PID=$!

# Run python script:

# Option 1: (one script per test)
$(dirname $0)/simple-rest-server-test.py
EXIT=$?

# Option 2: (one shell script and many python scripts)
python-setup  || exit 1
python-step-1 || exit 1
python-step-2 || exit 1
python-step-3 || exit 1

# Kill the server
kill $SERVER_PID

# Exit with the exit value of the Python script
exit $EXIT
