Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 5 additions & 8 deletions Client/run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,11 @@

set -x

# Use Python 2 version if BKR_PY3 is not defined
if [[ -z ${BKR_PY3} ]]; then
pytest_command="py.test-2";
elif [[ ${BKR_PY3} == 1 ]]; then
pytest_command="pytest-3";
# if BKR_PY3 is present and defined use pytest-3
if [[ -z ${BKR_PY3} ]] || [[ ${BKR_PY3} != 1 ]]; then
test_command="nosetests ${*:--v --traverse-namespace bkr.client.tests}";
else
pytest_command="py.test-2";
test_command="pytest-3";
fi

env PYTHONPATH=../Client/src:../Common${PYTHONPATH:+:$PYTHONPATH} \
$pytest_command
env PYTHONPATH=../Client/src:../Common${PYTHONPATH:+:$PYTHONPATH} ${test_command}
14 changes: 6 additions & 8 deletions Common/run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,12 @@

set -x

# Use Python 2 version if BKR_PY3 is not defined
if [[ -z ${BKR_PY3} ]]; then
pytest_command="py.test-2";
elif [[ ${BKR_PY3} == 1 ]]; then
pytest_command="pytest-3";
# if BKR_PY3 is not present and NOT python3
if [[ -z ${BKR_PY3} ]] || [[ ${BKR_PY3} != 1 ]]; then
test_command="nosetests ${*:--v bkr}";
else
pytest_command="py.test-2";
test_command="pytest-3";
fi

env PYTHONPATH=../Client/src:../Common${PYTHONPATH:+:$PYTHONPATH} \
$pytest_command
env PYTHONPATH=../Client/src:../Common${PYTHONPATH:+:$PYTHONPATH} ${test_command}