--- /dev/null
+#!/bin/sh
+
+for arg in $@; do
+ if [ -z "$test_suite" ]; then
+ test_suite=$1
+ else
+# Tox reinterprets "olm" and "pce" by "../olm" "../pce" because of the
+# changedir directive and the presence of modules folders "olm" and pce"
+# at project root.
+ if [ "$arg" = "../olm" ]; then
+ arglist=$arglist" olm"
+ elif [ "$arg" = "../pce" ]; then
+ arglist=$arglist" pce"
+ else
+ arglist=$arglist" "$arg
+ fi
+ fi
+done
+
+scriptlist=""
+if [ -z "$arglist" ]; then
+ scriptlist="transportpce_tests/$test_suite/test[0-9][0-9]_*.py"
+else
+ for test in $arglist; do
+ scriptlist=$scriptlist" transportpce_tests/$test_suite/test[0-9][0-9]_$test.py"
+ done
+fi
+if [ -z "$LAUNCHER" ]; then
+ LAUNCHER="nosetests --with-xunit";
+fi
+
+for script in $scriptlist; do
+ echo $LAUNCHER $(ls $script)
+ $LAUNCHER $script || exit 1
+done
[testenv:testsPCE]
depends = buildcontroller
+whitelist_externals = launch_tests.sh
+passenv = LAUNCHER
commands =
- nosetests --with-xunit transportpce_tests/pce/test_pce.py
- nosetests --with-xunit transportpce_tests/pce/test_pce_400G.py
+ ./launch_tests.sh pce {posargs:}
[testenv:tests121]
depends = buildcontroller,sims121,testsPCE
#the last dependency is to avoid temporarily concurrent ressources problem to fix in parallel mode
-commands =
- nosetests --with-xunit transportpce_tests/1.2.1/test_portmapping.py
- nosetests --with-xunit transportpce_tests/1.2.1/test_topo_portmapping.py
- nosetests --with-xunit transportpce_tests/1.2.1/test_topology.py
- nosetests --with-xunit transportpce_tests/1.2.1/test_renderer_service_path_nominal.py
- nosetests --with-xunit transportpce_tests/1.2.1/test_olm.py
- nosetests --with-xunit transportpce_tests/1.2.1/test_end2end.py
+whitelist_externals = launch_tests.sh
+passenv = LAUNCHER
+commands =
+ ./launch_tests.sh 1.2.1 {posargs:}
+# By default, all tests in the folder transportpce_tests/1.2.1/ are run.
+# Though, a restricted list of tests can be passed as argument to 'tox -e tests121'.
+# For example, 'tox -e tests121 portmapping' will run only the portmapping test.
+# and 'tox -e tests121 "portmapping pce"' will run the portmapping and pce tests.
+# Additionnally, a different launcher command than 'nosetests --with-xunit' can be
+# used by exporting the variable LAUNCHER. For example 'export LAUNCHER="python3"'
+# which is more verbose than nose or 'export LAUNCHER="ls -l"' to only list script
+# files attributes.
[testenv:tests221]
depends = buildcontroller,sims221,tests121
#the last dependency is to avoid temporarily concurrent ressources problem to fix in parallel mode
+whitelist_externals = launch_tests.sh
+passenv = LAUNCHER
commands =
- nosetests --with-xunit transportpce_tests/2.2.1/test_portmapping.py
- nosetests --with-xunit transportpce_tests/2.2.1/test_topology.py
- nosetests --with-xunit transportpce_tests/2.2.1/test_otn_topology.py
- nosetests --with-xunit transportpce_tests/2.2.1/test_flex_grid.py
- nosetests --with-xunit transportpce_tests/2.2.1/test_renderer_service_path_nominal.py
- nosetests --with-xunit transportpce_tests/2.2.1/test_otn_renderer.py
- nosetests --with-xunit transportpce_tests/2.2.1/test_otn_sh_renderer.py
- nosetests --with-xunit transportpce_tests/2.2.1/test_olm.py
- nosetests --with-xunit transportpce_tests/2.2.1/test_tapi.py
- nosetests --with-xunit transportpce_tests/2.2.1/test_otn_end2end.py
- nosetests --with-xunit transportpce_tests/2.2.1/test_end2end.py
+ ./launch_tests.sh 2.2.1 {posargs:}
[testenv:tests71]
depends = buildcontroller,sims71,tests221
#the last dependency is to avoid temporarily concurrent ressources problem to fix in parallel mode
+whitelist_externals = launch_tests.sh
+passenv = LAUNCHER
commands =
- nosetests --with-xunit transportpce_tests/7.1/test_portmapping.py
+ ./launch_tests.sh 7.1 {posargs:}
[testenv:tests_hybrid]
depends = buildcontroller,sims121,sims221,sims71,tests71
#the last dependency is to avoid temporarily concurrent ressources problem to fix in parallel mode
+whitelist_externals = launch_tests.sh
+passenv = LAUNCHER
commands =
- nosetests --with-xunit transportpce_tests/hybrid/test_device_change_notifications.py
+# nosetests --with-xunit transportpce_tests/hybrid/test01_device_change_notifications.py
+ ./launch_tests.sh hybrid {posargs:}
[testenv:gnpy]
depends = buildcontroller