File: simpleapp.sh

package info (click to toggle)
flask-mongoengine 0.9.3-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 396 kB
  • sloc: python: 1,155; makefile: 108; sh: 20
file content (28 lines) | stat: -rwxr-xr-x 486 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/bash

set -e

cleanup () {
    set +e
    echo "Clean up environment"
    pkill -P $PYPID
}
trap cleanup 0 2 3 15

PYPID=""

# Python 2 tests
for py in $(pyversions -i) $(py3versions -i); do
    echo "run test with $($py --version)"
    $py debian/tests/simpleapp/app.py&
    PYPID=$!

    sleep 3

    echo "Try to get one row of the sample data"
    curl -s http://localhost:4000/ | grep "Simple todo B"
    test $? -eq 0 && echo "OK" 
    sleep 1
    cleanup
    sleep 1
done