Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

gdp / test / _internalRunPythonTests.sh @ master

History | View | Annotate | Download (944 Bytes)

1 f3dbae1e Christopher Brooks
#!/bin/bash
2 6859f675 Christopher Brooks
# Run the Python tests.
3
# Usage: runPythonTests.sh logName
4
#
5
# An alternative way is to run gdp/test/setupAndRun.sh, which will start the daemons:
6
#   ../../../test/setupAndRun.sh ./runPythonTests.sh
7
8
if [ $# -lt 1 ]; then
9
    echo "$0: Usage: $0 logName [py.test args]"
10
fi
11
# Get the last argument
12
logName="${@: -1}"
13
14
# Run the tests
15
16
failedTests=""
17
overallReturnValue=0
18
19
function runTest () {
20
    echo "#### $@"
21
    $@
22
    returnValue=$?
23
    if [ $returnValue != 0 ]; then
24
        failedTests="$failedTests $1"
25
        overallReturnValue=$returnValue
26
    fi
27
}
28
29
echo "Command: py.test ${@:1:$(($#-1))} --logName=$logName"
30 6eb8184f Christopher Brooks
runTest py.test -v ${@:1:$(($#-1))} --logName=$logName
31 6859f675 Christopher Brooks
32
#newLog=gdp.runPythonTests.newLog.$RANDOM
33
#../../../apps/gcl-create -k none -s ealmac23.local $newLog
34
#runTest ./KVstore.py $newLog
35
36
if [ $overallReturnValue != 0 ]; then
37
    exit $overallReturnValue
38
fi
39
40
# gdp/test/setupAndRun.sh will stop the daemons
41