run_tests.sh: support integrated tests

Signed-off-by: YAMADA Hideki <yamada.hideki@po.ntts.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
This commit is contained in:
YAMADA Hideki 2013-04-25 20:25:58 +09:00 committed by FUJITA Tomonori
parent 0d4ff7d34d
commit 507d11d00b

View File

@ -11,6 +11,7 @@ usage() {
echo " -p, --pep8 Just run pep8"
echo " -P, --no-pep8 Don't run pep8"
echo " -l, --pylint Just run pylint"
echo " -i, --integrated Run integrated test"
echo " -v, --verbose Run verbose pylint analysis"
echo " -h, --help Print this usage message"
echo ""
@ -29,6 +30,7 @@ process_option() {
-p|--pep8) just_pep8=1; never_venv=1; always_venv=0;;
-P|--no-pep8) no_pep8=1;;
-l|--pylint) just_pylint=1;;
-i|--integrated) integrated=1;;
-c|--coverage) coverage=1;;
-v|--verbose) verbose=1;;
-*) noseopts="$noseopts $1";;
@ -43,6 +45,7 @@ never_venv=0
just_pep8=0
no_pep8=0
just_pylint=0
integrated=0
force=0
noseargs=
wrapper=""
@ -106,6 +109,12 @@ run_pep8() {
${wrapper} pep8 $PEP8_OPTIONS $PEP8_INCLUDE | tee $PEP8_LOG
}
run_integrated() {
echo "Running integrated test ..."
INTEGRATED_TEST_RUNNER="./ryu/tests/integrated/run_tests_with_ovs12.py"
sudo PYTHONPATH=. nosetests -s $INTEGRATED_TEST_RUNNER
}
#NOSETESTS="nosetests $noseopts $noseargs"
NOSETESTS="python ./ryu/tests/run_tests.py $noseopts $noseargs"
@ -158,6 +167,11 @@ if [ $just_pylint -eq 1 ]; then
exit
fi
if [ $integrated -eq 1 ]; then
run_integrated
exit
fi
run_tests
RV=$?
if [ $no_pep8 -eq 0 ]; then