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:
parent
0d4ff7d34d
commit
507d11d00b
14
run_tests.sh
14
run_tests.sh
@ -11,6 +11,7 @@ usage() {
|
|||||||
echo " -p, --pep8 Just run pep8"
|
echo " -p, --pep8 Just run pep8"
|
||||||
echo " -P, --no-pep8 Don't run pep8"
|
echo " -P, --no-pep8 Don't run pep8"
|
||||||
echo " -l, --pylint Just run pylint"
|
echo " -l, --pylint Just run pylint"
|
||||||
|
echo " -i, --integrated Run integrated test"
|
||||||
echo " -v, --verbose Run verbose pylint analysis"
|
echo " -v, --verbose Run verbose pylint analysis"
|
||||||
echo " -h, --help Print this usage message"
|
echo " -h, --help Print this usage message"
|
||||||
echo ""
|
echo ""
|
||||||
@ -29,6 +30,7 @@ process_option() {
|
|||||||
-p|--pep8) just_pep8=1; never_venv=1; always_venv=0;;
|
-p|--pep8) just_pep8=1; never_venv=1; always_venv=0;;
|
||||||
-P|--no-pep8) no_pep8=1;;
|
-P|--no-pep8) no_pep8=1;;
|
||||||
-l|--pylint) just_pylint=1;;
|
-l|--pylint) just_pylint=1;;
|
||||||
|
-i|--integrated) integrated=1;;
|
||||||
-c|--coverage) coverage=1;;
|
-c|--coverage) coverage=1;;
|
||||||
-v|--verbose) verbose=1;;
|
-v|--verbose) verbose=1;;
|
||||||
-*) noseopts="$noseopts $1";;
|
-*) noseopts="$noseopts $1";;
|
||||||
@ -43,6 +45,7 @@ never_venv=0
|
|||||||
just_pep8=0
|
just_pep8=0
|
||||||
no_pep8=0
|
no_pep8=0
|
||||||
just_pylint=0
|
just_pylint=0
|
||||||
|
integrated=0
|
||||||
force=0
|
force=0
|
||||||
noseargs=
|
noseargs=
|
||||||
wrapper=""
|
wrapper=""
|
||||||
@ -106,6 +109,12 @@ run_pep8() {
|
|||||||
${wrapper} pep8 $PEP8_OPTIONS $PEP8_INCLUDE | tee $PEP8_LOG
|
${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="nosetests $noseopts $noseargs"
|
||||||
NOSETESTS="python ./ryu/tests/run_tests.py $noseopts $noseargs"
|
NOSETESTS="python ./ryu/tests/run_tests.py $noseopts $noseargs"
|
||||||
|
|
||||||
@ -158,6 +167,11 @@ if [ $just_pylint -eq 1 ]; then
|
|||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ $integrated -eq 1 ]; then
|
||||||
|
run_integrated
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
run_tests
|
run_tests
|
||||||
RV=$?
|
RV=$?
|
||||||
if [ $no_pep8 -eq 0 ]; then
|
if [ $no_pep8 -eq 0 ]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user