-
Notifications
You must be signed in to change notification settings - Fork 127
/
runtests.sh
executable file
·37 lines (31 loc) · 953 Bytes
/
runtests.sh
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
29
30
31
32
33
34
35
36
37
#!/bin/bash
cd testapp;
# Check for the --install_deps and --install_sdk args, and pass the other args down to manage.py test
ARGS=()
for var in "$@"; do
if [ "$var" = '--install_deps' ]; then
INSTALL_DEPS=true
elif [ "$var" = '--install_sdk' ]; then
INSTALL_DEPS=true
INSTALL_SDK=true
else
ARGS[${#ARGS[@]}]="$var"
fi
done
# If the SDK doesn't exist then we want to run install_deps anyway. We don't need to pass
# install_sdk to it because it will detect that the SDK doesn't exist anyway.
if [ ! -d "libs/google_appengine" ]; then
INSTALL_DEPS=true
fi
if [ -n "$INSTALL_DEPS" ]; then
echo "Running install_deps..."
if [ -n "$INSTALL_SDK" ]; then
python install_deps.py --install_sdk
else
python install_deps.py
fi
else
echo "Not running install_deps. Pass --install_deps if you want to install dependencies."
fi
python manage.py test "${ARGS[@]}"
cd ..;