Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
100 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/bash | ||
|
||
HERE="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" | ||
|
||
if [[ -d venv ]]; then | ||
. $HERE/venv/bin/activate | ||
else | ||
[[ ! `command -v virtualenv` ]] && pip install virtualenv | ||
python -m virtualenv --system-site-packages venv | ||
. $HERE/venv/bin/activate | ||
pip install -r $HERE/requirements.txt | ||
fi | ||
PYTHONPATH=$HERE/RLTest python -m RLTest "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,4 @@ | |
'Env', | ||
'StandardEnv' | ||
] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
show_if_error() { | ||
[[ $SHOW == 1 ]] && echo "${@:1}" | ||
if [[ $VERBOSE == 1 ]]; then | ||
{ "${@:1}"; } | ||
else | ||
{ "${@:1}"; } > /tmp/rltest.log 2>&1 | ||
[ $? != 0 ] && cat /tmp/rltest.log | ||
rm -f /tmp/rltest.log | ||
fi | ||
} | ||
|
||
install_prerequisites() { | ||
[[ -f .installed2 ]] && return | ||
show_if_error apt-get -qq update | ||
show_if_error apt-get -q install -y python2 python-psutil | ||
show_if_error apt-get -q install -y curl ca-certificates | ||
show_if_error curl -s https://bootstrap.pypa.io/get-pip.py -o /tmp/get-pip.py | ||
show_if_error python2 /tmp/get-pip.py | ||
show_if_error pip install virtualenv | ||
touch .installed2 | ||
} | ||
|
||
is_installed() { | ||
[[ $({ dpkg -l "$*" >/dev/null 2>&1 ; echo $? ;}) == 0 ]] && echo yes | ||
} | ||
|
||
HERE="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" | ||
|
||
install_prerequisites | ||
if [[ -d venv2 ]]; then | ||
. $HERE/venv2/bin/activate | ||
else | ||
show_if_error python2 -m virtualenv --system-site-packages venv2 | ||
. $HERE/venv2/bin/activate | ||
show_if_error pip install -r $HERE/requirements.txt | ||
fi | ||
PYTHONPATH=$HERE/RLTest python2 -m RLTest "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
show_if_error() { | ||
[[ $SHOW == 1 ]] && echo "${@:1}" | ||
if [[ $VERBOSE == 1 ]]; then | ||
{ "${@:1}"; } | ||
else | ||
{ "${@:1}"; } > /tmp/rltest.log 2>&1 | ||
[ $? != 0 ] && cat /tmp/rltest.log | ||
rm -f /tmp/rltest.log | ||
fi | ||
} | ||
|
||
install_prerequisites() { | ||
[[ -f .installed3 ]] && return | ||
show_if_error apt-get -qq update | ||
show_if_error apt-get -q install -y python3 python3-distutils python3-psutil | ||
show_if_error apt-get -q install -y curl ca-certificates | ||
show_if_error curl -s https://bootstrap.pypa.io/get-pip.py -o /tmp/get-pip.py | ||
show_if_error python3 /tmp/get-pip.py | ||
show_if_error pip install virtualenv | ||
touch .installed3 | ||
} | ||
|
||
is_installed() { | ||
[[ $({ dpkg -l "$*" >/dev/null 2>&1 ; echo $? ;}) == 0 ]] && echo yes | ||
} | ||
|
||
HERE="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" | ||
|
||
install_prerequisites | ||
if [[ -d venv3 ]]; then | ||
. $HERE/venv3/bin/activate | ||
else | ||
show_if_error python3 -m virtualenv --system-site-packages venv3 | ||
. $HERE/venv3/bin/activate | ||
show_if_error pip install -r $HERE/requirements.txt | ||
fi | ||
PYTHONPATH=$HERE/RLTest python3 -m RLTest "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
redis>=2.10.5 | ||
redis >= 2.10.5, <= 2.10.6 | ||
redis-py-cluster | ||
psutil |